Skip to navigation

Getting Started

View as MarkdownOpen in Claude

Authenticate with NGC, launch the Synthetic Video Detector NIM container, and set environment variables and runtime flags before you send inference requests.

Prerequisites

To ensure that you have the supported hardware and software stack, check the Support Matrix.

  • NVIDIA GPU with Tensor cores and supported NVDEC (for hardware decoding).
  • Recent NVIDIA driver and NVIDIA Container Toolkit correctly installed.
  • Docker Engine installed and configured to access GPUs.

NGC Authentication

An NGC API key is required to pull the container image and download models. Complete the following steps to create the key, export it, and log in to the NVIDIA Container Registry.

Generate an API Key

NVIDIA Synthetic Video Detector NIM is available only through the AI for Media Private Access Program. Joining the Private Access Program gives you an NGC API key with the permissions required for this NIM.

You can generate a key at NGC API Keys after joining the Private Access Program.

When creating an NGC API Personal key, ensure that at least NGC Catalog is selected from the Services Included dropdown. You can include more services if this key is to be reused for other purposes.

Personal keys allow you to configure an expiration date, revoke or delete the key using an action button, and rotate the key as needed. For more information about key types, refer to NGC API Keys in the NGC User Guide.

Export the API Key

Pass the value of the API key to the docker run command in the next section as the NGC_API_KEY environment variable to download the appropriate models and resources when starting the NIM.

If you are not familiar with how to create the NGC_API_KEY environment variable, the simplest way is to export it in your terminal:

export NGC_API_KEY=<value>

Run one of the following commands to make the key available at startup:

# If using bash
echo "export NGC_API_KEY=<value>" >> ~/.bashrc
# If using zsh
echo "export NGC_API_KEY=<value>" >> ~/.zshrc

Other, more secure options include saving the value in a file, so that you can retrieve with cat $NGC_API_KEY_FILE, or using a password manager.

Docker Login to NGC

To pull the NIM container image from NGC, first authenticate with the NVIDIA Container Registry with the following command:

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

Use $oauthtoken as the username and NGC_API_KEY as the password. The $oauthtoken username is a special name that indicates that you will authenticate with an API key and not a user name and password.

Before pulling the container image, you must accept the Governing Terms on the Synthetic Video Detector NIM container page in NGC. This page is accessible only after enrollment in the AI for Media Private Access Program.

Launching the Container (Synthetic Video Detector NIM)

The following command launches the Synthetic Video Detector NIM container with the gRPC service. For a list of parameters, refer to Runtime Parameters for the Container.

By default, the NIM detects the host GPU architecture and downloads the matching model profile automatically. To pin a specific profile instead, refer to Overriding the Model Profile.

# Run the container
docker run -it --rm --name=synthetic-video-detector-nim \
--runtime=nvidia \
--gpus all \
--shm-size=8GB \
-e NGC_API_KEY=$NGC_API_KEY \
-p 8000:8000 \
-p 8001:8001 \
nvcr.io/nim/nvidia/synthetic-video-detector:latest

You can also cache the model manifest locally. For more details, refer to Model Caching.

The flag --gpus all assigns all available GPUs to the Docker container. To assign specific GPUs to the Docker container (in case of multiple GPUs available in your machine), use --gpus '"device=0,1,2..."'.

On bare-metal Linux systems with PCIe topology and multiple GPUs, the NIM pins each request to one GPU by default. To let Triton schedule across GPUs instead, set IOMMU to passthrough and NV_AI4M_SVD_PIN_MODEL_TO_SHM_GPU=false. Refer to PCIe Multi-GPU Systems.

If the docker run command runs successfully, you get a response similar to the following.

[INFO AI4M BASE LOGGER 2025-12-08 06:49:53.779 PID:1] SUCCESS: DINOv2+v3 TensorRT inference engine initialized!
[INFO AI4M BASE LOGGER 2025-12-08 06:49:53.779 PID:1] Service initialization complete
[INFO AI4M BASE LOGGER 2025-12-08 06:49:53.779 PID:1] Using threading mode for gRPC service
[INFO AI4M BASE LOGGER 2025-12-08 06:49:53.779 PID:1] Starting threading gRPC service with 1 threads
[INFO AI4M BASE LOGGER 2025-12-08 06:49:53.787 PID:1] Using Insecure Server Credentials
[INFO AI4M BASE LOGGER 2025-12-08 06:49:53.789 PID:1] Listening to 0.0.0.0:8001

By default, the Synthetic Video Detector gRPC service is hosted on port 8001. You must use this port for inferencing requests.

Environment Variables

The following table describes the environment variables that can be passed into a NIM as a -e argument added to a docker run command:

ENVRequired?DefaultNotes
NGC_API_KEYYesNoneYou must set this variable to the value of your personal NGC API key.
NIM_CACHE_PATHOptional/opt/nim/.cacheLocation (in container) where the container caches model artifacts.
NIM_HTTP_API_PORTNo8000Publish the NIM service to the prescribed port inside the container. Be sure to adjust the port passed to the -p/--publish flag of docker run to reflect that (for example, -p $NIM_HTTP_API_PORT:$NIM_HTTP_API_PORT). The left side of the colon (:) is the port of your host address and does not need to match $NIM_HTTP_API_PORT. The right side of the colon (:) is the port inside the container, which must match NIM_HTTP_API_PORT (or 8000 if not set). Supported endpoints are /v1/license (returns the license information), /v1/metadata (returns metadata, including asset information, license information, model information, and version), and /v1/metrics (exposes Prometheus metrics through an ASGI app endpoint).
NIM_MODEL_PROFILEOptionalNoneOverride automatic profile selection with a compatible model profile ID. Omit this variable to let the NIM select a profile. For more information, refer to Overriding the Model Profile.
NIM_SSL_MODENodisabledSet SSL security on the endpoints to tls or mtls. Defaults to unsecured endpoint.
NIM_SSL_CA_CERTS_PATHNoNoneSet the path to CA root certificate inside the NIM. This is required only when NIM_SSL_MODE is mtls. For example, if the SSL certificates are mounted at /opt/nim/crt in the NIM, NIM_SSL_CA_CERTS_PATH can be set to /opt/nim/crt/ssl_ca_cert.pem.
NIM_SSL_CERT_PATHNoNoneSet the path to the server’s public SSL certificate inside the NIM. This is required only when an SSL mode is enabled. For example, if the SSL certificates are mounted at /opt/nim/crt in the NIM, NIM_SSL_CERT_PATH can be set to /opt/nim/crt/ssl_cert_server.pem.
NIM_SSL_KEY_PATHNoNoneSet the path to the server’s private key inside the NIM. This is required only when an SSL mode is enabled. For example, if the SSL certificates are mounted at /opt/nim/crt in the NIM, NIM_SSL_KEY_PATH can be set to /opt/nim/crt/ssl_key_server.pem.
NV_AI4M_MAX_CONCURRENCY_PER_GPUNo4Number of concurrent streams per GPU. Sizes the gRPC frontend worker pool (per-GPU x GPUs). Higher values consume more GPU memory and can cause out-of-memory errors.
NV_AI4M_SVD_PIN_MODEL_TO_SHM_GPUNotrueCreates one model instance per GPU and keeps each request’s shared memory pool and inference on the allotted GPU, which reduces memory transfer operations. Enabled by default and does not require IOMMU passthrough. Set to false, 0, no, or off (case-insensitive) to use Triton’s dynamic scheduling, which can involve cross-GPU transfers and requires the host to enable IOMMU passthrough (iommu=pt); without passthrough the NIM logs a warning and falls back to pinned mode. Refer to Multi-GPU.
NIM_GRPC_API_PORTNo8001Port that the gRPC inference frontend listens on inside the container. Adjust the -p/--publish flag of docker run to match.
GRPC_MESSAGE_SIZENo67108864 (64 MiB)Maximum gRPC message size, in bytes.
NV_AI4M_SVD_GPU_TELEMETRYNofalseEnable periodic GPU utilization and VRAM telemetry logging. Accepts 1/true/yes/on (case-insensitive) as true.
NV_AI4M_SVD_GPU_TELEMETRY_INTERVAL_SNo10GPU telemetry sampling interval, in seconds. Used only when NV_AI4M_SVD_GPU_TELEMETRY is enabled.

Runtime Parameters for the Container

The following table describes Docker flags used in the launch command:

FlagsDescription
-it--interactive + --tty (see docker container run in Docker Docs).
--rmDelete the container after it stops (see docker container run in Docker Docs).
--name=container-nameGive a name to the NIM container. Use any preferred value.
--runtime=nvidiaEnsure NVIDIA drivers are accessible in the container.
--gpus allExpose NVIDIA GPUs inside the container. If you are running on a host with multiple GPUs, you need to specify which GPU to use. You can also specify multiple GPUs. For more information about mounting specific GPUs, refer to GPU Enumeration.
--shm-size=8GBAllocate host memory for multi-process communication.
-e NGC_API_KEY=$NGC_API_KEYProvide the container with the token necessary to download adequate models and resources from NGC. Refer to NGC Authentication.
-e AI4M_MAX_INPUT_FILE_SIZE_MBOptional maximum input file size, in MB. Unset by default (no size limit is enforced); when set, uploads larger than this value are rejected.
-p <host_port>:<container_port>Ports published by the container are directly accessible on the host port.

Stopping the Container

The following commands can be used to stop the container.

docker stop $CONTAINER_NAME
docker rm $CONTAINER_NAME