Question about the docker local deployment

Dear Staff in Nvidia,

I have the following two questions.

  1. If I pull the docker image of NIM to my local computer. When I do API call to my server, will it cost my credit?

  2. Confused about the API key in docker run options.

$ docker login nvcr.io
Username: $oauthtoken
Password: <PASTE_API_KEY_HERE>

This password should be generated in ngc API_key side rather than the control panel in build.nvidia.com

And the what’s the NGC_API_KEY? Can I set this key by myself like 111111.


export NGC_API_KEY=<PASTE_API_KEY_HERE>
export LOCAL_NIM_CACHE=~/.cache/nim
mkdir -p "$LOCAL_NIM_CACHE"
docker run -it --rm \
    --runtime=nvidia \
    -e NVIDIA_VISIBLE_DEVICES=0 \
    -e NGC_API_KEY=$NGC_API_KEY \
    --shm-size=2G \
    --ulimit memlock=-1 \
    --ulimit stack=67108864 \
    -p 8000:8000 \
    nvcr.io/nim/nvidia/molmim:1.0.0

Hi there,

  1. If I pull the docker image of NIM to my local computer. When I do API call to my server, will it cost my credit?

No, this will not cost any credits

  1. Confused about the API key in docker run options.

It should not matter whether your personal key was generated in the control panel on build.nvidia.com or on NGC. For example, if you’d like to generate one via NGC, go to the NGC Personal Key Manager, and select Generate Personal Key

You cannot set the NGC_API_KEY variable to something like 111111 yourself. Instead, once you have your personal key generated, use it as the password when running docker login nvcr.io. Then, set the environment variable NGC_API_KEY to your personal key (it should be a string starting with nvapi-). This environment variable will be used inside the NIM container.

Then, you should be able to run the docker run command successfully.

Let me know if this solves your issue and if you have any more questions!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.