Prerequisites#

Before you begin using GenMol NIM, ensure the following requirements are met.

Hardware and Software#

Verify that your container runtime can see the GPU:

docker run --rm --runtime=nvidia --gpus=all ubuntu nvidia-smi

NGC Account and API Key#

To generate and use an API key:

  1. Create an account on NGC

  2. Generate a personal API key

  3. Export the API key in your shell:

export NGC_API_KEY=<your_api_key>

To persist the key across sessions, add the export to your shell startup file:

# bash
echo 'export NGC_API_KEY=<your_api_key>' >> ~/.bashrc

# zsh
echo 'export NGC_API_KEY=<your_api_key>' >> ~/.zshrc
  1. Log in to nvcr.io with the API key:

echo "$NGC_API_KEY" | docker login nvcr.io --username '$oauthtoken' --password-stdin

Optional: NGC CLI#

The NGC CLI is useful for inspecting container and model metadata.

ngc config set

Storage#

Create a writable cache directory on the host before launching the container:

export LOCAL_NIM_CACHE=~/.cache/nim/genmol
mkdir -p "$LOCAL_NIM_CACHE"