Skip to navigation

Configure The NIM at Runtime

View as Markdown

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:

GPU 0: NVIDIA GeForce RTX 3080
GPU 1: L40S

For more information, see NVIDIA Container Toolkit documentation.

Environment Variables

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

ENVRequired?DefaultNotes
NGC_API_KEYYesNoneYour NGC API key with read access to the model registry for the model profile you are using.
NV_SCRATCH_SPACEYesNoneYou should provide the same mount path as used in the service launch command. NIM uses this space to store intermediate artifacts.
NIM_LOG_LEVELOptionalNoneYou can pass DEBUG value to enable extra logging.
NIM_TRITON_LOG_VERBOSEOptionalNoneYou can pass verbosity level [1,2,3,4,5] to enable extra logging from the triton server backend.
S3_ENDPOINT_URLOptionalNoneS3 endpoint URL required to establish connection.
S3_TEAM_NAMEOptionalNoneS3 Team name required to establish connection.
S3_ACCESS_KEYOptionalNoneS3 access key required to establish connection.
S3_REGION_NAMEOptionalNoneS3 region name required to establish connection.