Runtime Parameters for Speech NIM Containers#
When you run a Speech NIM container with docker run, the following flags and environment variables are commonly used. Service-specific examples are in the ASR, TTS, and NMT tutorials.
API Protocols and Ports#
Each Speech NIM container exposes two ports. Multiple protocols share the HTTP port. Clients pick a protocol by the path or upgrade they request, not by connecting to a different port. Use this table to point each client at the correct port before running the deploy command:
Protocol |
Default Port |
Container Environment Variable |
Used By |
|---|---|---|---|
HTTP/REST |
|
|
|
WebSocket |
|
|
Realtime TTS streaming ( |
gRPC |
|
|
The Riva Python, C++, and Go clients and any other gRPC consumer. |
Publish both ports in docker run (-p 9000:9000 -p 50051:50051). Targeting a WebSocket client at 50051, or a gRPC client at 9000, is the most common cause of connection refused on first run.
Triton’s internal ports (8000, 8001, 8002) are used by the inference stack inside the container and do not need to be published.
Common Flags and Variables#
Flag or variable |
Description |
|---|---|
|
Interactive + TTY (refer to Docker docs). |
|
Remove the container when it stops (refer to Docker docs). |
|
Name for the container. Use any value you prefer; often set using |
|
Make NVIDIA drivers available inside the container. |
|
Expose GPU 0. On multi-GPU hosts, specify the device. Refer to GPU enumeration. |
|
Shared memory for multi-GPU communication. |
|
Token for downloading models and resources from NGC. Refer to NGC Access Setup. |
|
HTTP API port inside the container. Default 9000. Avoid 8000. |
|
gRPC API port inside the container. Default 50051. |
|
Map host port (left) to container HTTP port (right). |
|
Map host port (left) to container gRPC port (right). |
|
Select a model/profile. Key-value pairs, for example, |
Optional: TLS/mTLS#
Some NIMs support HTTPS using environment variables:
Variable |
When required |
Description |
|---|---|---|
|
Optional |
|
|
When SSL is enabled |
Path to the server TLS private key. |
|
When SSL is enabled |
Path to the server certificate. |
|
When |
Path to the CA certificate. |
Check the support matrix and service docs for which images support SSL.