Getting Started
Authenticate with NGC, launch the Active Speaker Detection 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.
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
An NGC API key is required to access NGC resources. You can generate a key at https://org.ngc.nvidia.com/setup/api-keys.
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 NGC API Key
To download the appropriate models and resources when starting the NIM, use the NGC_API_KEY environment variable to pass the value of the API key to the docker run command in the next section.
The simplest way to create the NGC_API_KEY environment variable is to export it in your terminal:
Run one of the following commands to make the key available at startup:
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:
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.
Launching the NIM Container
The following command launches the Active Speaker Detection NIM container with the gRPC service. For a list of parameters, refer to Runtime Parameters for the Container.
The flag --gpus all is used to assign all available GPUs to the NIM container.
To assign specific GPUs to the NIM 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, we recommend setting IOMMU to passthrough. Refer to PCIe Multi-GPU Systems.
If the NIM launch is successful, you get a response similar to the following.
By default, the Active Speaker Detection NIM gRPC service is hosted on port 8001. You must use this port for inferencing requests. The port is configurable through the NIM_GRPC_API_PORT environment variable.
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:
Runtime Parameters for the Container
The following table describes Docker flags used in the launch command:
Stopping the Container
Use the following commands to stop the container: