> This page is for GenMol, version 2.0.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 2.0.0 (Latest) (default): https://docs.nvidia.com/nim/bionemo/genmol/2.0.0/llms.txt
> - 1.0.1: https://docs.nvidia.com/nim/bionemo/genmol/1.0.1/llms.txt
> - 1.0.0: https://docs.nvidia.com/nim/bionemo/genmol/1.0.0/llms.txt

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/nim/bionemo/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nim/bionemo/_mcp/server.

# Configure NIM

This section provides additional details for launching and operating the GenMol NIM container.

## View NIM Container Information

```bash
ngc registry image info nvcr.io/nim/nvidia/genmol:2.0.0
```


## Pull the Container Image

```bash
docker pull nvcr.io/nim/nvidia/genmol:2.0.0
```


## Runtime Parameters for the Container

```bash
export LOCAL_NIM_CACHE=~/.cache/nim/genmol
mkdir -p "$LOCAL_NIM_CACHE"
chmod 777 "$LOCAL_NIM_CACHE"
```


```bash
docker run --rm -it --name genmol-nim \
  --runtime=nvidia --gpus=all \
  -e NVIDIA_VISIBLE_DEVICES=0 \
  -e NGC_API_KEY=$NGC_API_KEY \
  -e NIM_HTTP_API_PORT=8000 \
  -v "$LOCAL_NIM_CACHE:/opt/nim/.cache" \
  -p 8000:8000 \
  nvcr.io/nim/nvidia/genmol:2.0.0
```


Important parameters:

- `--runtime=nvidia` enables GPU access for the container.
- `--gpus=all` exposes GPUs to the NVIDIA runtime.
- `NVIDIA_VISIBLE_DEVICES=0` restricts a container instance to one GPU.
- `NGC_API_KEY` authenticates model asset downloads from NGC.
- `NIM_HTTP_API_PORT=8000` sets the service port inside the container.
- `-v "$LOCAL_NIM_CACHE:/opt/nim/.cache"` persists model artifacts across restarts.
- `-p 8000:8000` publishes the service port to the host.

## Run Multiple Instances on the Same Host

Each container instance should be pinned to a different GPU and a different host port.

```bash
# Launch instance #1
docker run --rm -it --name genmol-nim-1 \
  --runtime=nvidia --gpus=all \
  -e NVIDIA_VISIBLE_DEVICES=0 \
  -e NGC_API_KEY=$NGC_API_KEY \
  -e NIM_HTTP_API_PORT=8000 \
  -v "$LOCAL_NIM_CACHE:/opt/nim/.cache" \
  -p 60001:8000 \
  nvcr.io/nim/nvidia/genmol:2.0.0
```


```bash
# Launch instance #2
docker run --rm -it --name genmol-nim-2 \
  --runtime=nvidia --gpus=all \
  -e NVIDIA_VISIBLE_DEVICES=1 \
  -e NGC_API_KEY=$NGC_API_KEY \
  -e NIM_HTTP_API_PORT=8000 \
  -v "$LOCAL_NIM_CACHE:/opt/nim/.cache" \
  -p 60002:8000 \
  nvcr.io/nim/nvidia/genmol:2.0.0
```


## Model Checkpoint Caching

On initial startup, the container downloads model assets from NGC. To avoid repeated downloads, create and mount a persistent cache directory:

```bash
export LOCAL_NIM_CACHE=~/.cache/nim/genmol
mkdir -p "$LOCAL_NIM_CACHE"
chmod 777 "$LOCAL_NIM_CACHE"
```


## Environment Variables

The following environment variables can be passed as `-e` arguments to `docker run`:

| ENV | Required? | Default | Notes |
| --- | --------- | ------- | ----- |
| `NGC_API_KEY` | Yes | None | Personal NGC API key used to authenticate model asset downloads. |
| `NIM_CACHE_PATH` | No | `/opt/nim/.cache` | Location inside the container where model artifacts are cached. |
| `NIM_HTTP_API_PORT` | No | `8000` | Port the NIM HTTP server listens on inside the container. Adjust the `-p` flag to match (for example, `-p 8000:8000`). |
| `NIM_LOG_LEVEL` | No | `INFO` | Logging verbosity. Options: `DEBUG`, `INFO`, `WARNING`, `ERROR`, `CRITICAL`. |
| `NIM_TELEMETRY_MODE` | No | `0` | Telemetry collection. Set to `0` to disable (default) or `1` to enable. Refer to the [NVIDIA Privacy Policy](https://www.nvidia.com/en-us/about-nvidia/privacy-policy/) and [NIM Telemetry Settings](https://developer.nvidia.com/docs/nim-tools/latest/templates/nimlib/nim-telemetry.html). |

## Volumes

| Container path | Required | Notes | Docker argument example |
| -------------- | -------- | ----- | ----------------------- |
| `/opt/nim/.cache` (or `NIM_CACHE_PATH` if set) | No, but without it the container re-downloads model assets on every start. | The directory must be readable and writable by the container. Run `chmod 777 $LOCAL_NIM_CACHE` on the host path before mounting. | `-v "$LOCAL_NIM_CACHE:/opt/nim/.cache"` |

## Logging

The following examples show how to start the container with different logging levels.

### Standard Logging

```bash
docker run --rm -it --name genmol-nim \
  --runtime=nvidia --gpus=all \
  -e NVIDIA_VISIBLE_DEVICES=0 \
  -e NGC_API_KEY=$NGC_API_KEY \
  -e NIM_HTTP_API_PORT=8000 \
  -e NIM_LOG_LEVEL=INFO \
  -v "$LOCAL_NIM_CACHE:/opt/nim/.cache" \
  -p 8000:8000 \
  nvcr.io/nim/nvidia/genmol:2.0.0
```


### Debug Logging

```bash
docker run --rm -it --name genmol-nim \
  --runtime=nvidia --gpus=all \
  -e NVIDIA_VISIBLE_DEVICES=0 \
  -e NGC_API_KEY=$NGC_API_KEY \
  -e NIM_HTTP_API_PORT=8000 \
  -e NIM_LOG_LEVEL=DEBUG \
  -v "$LOCAL_NIM_CACHE:/opt/nim/.cache" \
  -p 8000:8000 \
  nvcr.io/nim/nvidia/genmol:2.0.0
```


## Stop the Container

```bash
docker stop genmol-nim
```