> This page is for version 0.2.0 (Latest) (default).
> For other versions, use one of these documentation indexes:
> - 0.2.0 (Latest) (default): https://docs.nvidia.com/nim/computer-vision/semantic-split/0.2.0/llms.txt
> - 0.1.0: https://docs.nvidia.com/nim/computer-vision/semantic-split/0.1.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/computer-vision/semantic-split/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/nim/computer-vision/semantic-split/_mcp/server.

# Configure The NIM at Runtime

## GPU Selection

On a system with a single NVIDIA GPU, you can use the `--gpus device=0` option in docker command to start the service.

In heterogeneous environments with a combination of GPUs, such as L40S and a GeForce display GPU, you should only run workload on the L40S GPU. Use the `--gpus device=<GPU ID>` option in docker command to start the service.

Use the `nvidia-smi -L` command to get the device ID(s) to use as input(s). This command should return information similar to the following:

```bash
GPU 0: NVIDIA GeForce RTX 3080

GPU 1: L40S
```

For more information, see [NVIDIA Container Toolkit documentation](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/docker-specialized.html#gpu-enumeration).

## Environment Variables

You can pass the following environment variables into a NIM by adding the `-e` flag to the docker run command.

| ENV                       | Required? | Default | Notes                                                                                                                              |
| ------------------------- | --------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------- |
| NGC_API_KEY             | Yes       | None    | Your NGC API key with read access to the model registry for the model profile you are using.                                       |
| NV_SCRATCH_SPACE        | Yes       | None    | You should provide the same mount path as used in the service launch command. NIM uses this space to store intermediate artifacts. |
| NIM_LOG_LEVEL           | Optional  | None    | You can pass `DEBUG` value to enable extra logging.                                                                                |
| NIM_TRITON_LOG_VERBOSE | Optional  | None    | You can pass verbosity level \[1,2,3,4,5\] to enable extra logging from the triton server backend.                                 |
| S3_ENDPOINT_URL         | Optional  | None    | S3 endpoint URL required to establish connection.                                                                                  |
| S3_TEAM_NAME            | Optional  | None    | S3 Team name required to establish connection.                                                                                     |
| S3_ACCESS_KEY           | Optional  | None    | S3 access key required to establish connection.                                                                                    |
| S3_REGION_NAME          | Optional  | None    | S3 region name required to establish connection.                                                                                   |