DeepStream Docker Containers Reference
Overview
DeepStream Docker images are hosted on the NVIDIA NGC container registry (nvcr.io). They package all SDK dependencies (GStreamer, TensorRT, CUDA, models, sample streams) and require the NVIDIA Container Toolkit (nvidia-container-toolkit) for GPU access.
- NGC catalog page: https://catalog.ngc.nvidia.com/orgs/nvidia/containers/deepstream
- Official docs: https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_docker_containers.html
Available Containers
dGPU (x86_64)
| Container | Pull Command | Description |
|---|---|---|
| Samples | docker pull nvcr.io/nvidia/deepstream:9.1-samples-multiarch |
Runtime libraries, GStreamer plugins, reference apps, sample streams, models, configs. Best for running demos and deploying applications. |
| Triton | docker pull nvcr.io/nvidia/deepstream:9.1-triton-multiarch |
Everything in samples + Triton Inference Server and dependencies + development environment. Use when Triton-based inference is needed or building custom DeepStream applications. |
Jetson (ARM64/aarch64)
| Container | Pull Command | Description |
|---|---|---|
| Samples | docker pull nvcr.io/nvidia/deepstream:9.1-samples-multiarch |
Runtime libraries, GStreamer plugins, reference apps, sample streams, models, configs. Deployment only — does not support development inside the container. |
| Triton | docker pull nvcr.io/nvidia/deepstream:9.1-triton-multiarch |
Samples contents + devel libraries + Triton Inference Server backends. |
dGPU on ARM (GH200, GB200, SBSA)
| Container | Pull Command | Description |
|---|---|---|
| Triton ARM SBSA | docker pull nvcr.io/nvidia/deepstream:9.1-triton-sbsa-dgx-spark |
Triton Inference Server + development environment for ARM SBSA platforms. |
Choosing the Right Image
| Use Case | Recommended Image |
|---|---|
| Running sample apps / demos | 9.1-samples-multiarch |
| pyservicemaker Python applications | 9.1-triton-multiarch |
| Triton Inference Server required | 9.1-triton-multiarch |
| Custom Dockerfile base image | 9.1-samples-multiarch (minimal) or 9.1-triton-multiarch (with Triton) |
NGC Authentication
Pulling images requires NGC authentication:
# 1. Get an API key from https://ngc.nvidia.com
# 2. Log in to the NGC registry
docker login nvcr.io
# Username: $oauthtoken
# Password: <YOUR_NGC_API_KEY>Installing pyservicemaker Inside the Container
The pyservicemaker Python wheel is bundled in the container but NOT pre-installed. You must install it explicitly:
pip install /opt/nvidia/deepstream/deepstream/service-maker/python/pyservicemaker*.whl \
pyyamlIn a Dockerfile:
RUN pip install --break-system-packages \
/opt/nvidia/deepstream/deepstream/service-maker/python/pyservicemaker*.whl \
pyyamlNote: The
--break-system-packagesflag is needed on Ubuntu 24.04 (Python 3.12) to install into the system Python environment. Alternatively, use a virtual environment.
Installing pyservicemaker in a Python Virtual Environment
If pyservicemaker code runs from a venv, install the bundled wheel into that venv first:
python3 -m venv venv
source venv/bin/activate
pip install /opt/nvidia/deepstream/deepstream/service-maker/python/pyservicemaker*.whl \
pyyaml
pip install -r requirements.txtRunning Containers
Prerequisites
- Docker: Install
docker-cevia official instructions - NVIDIA Container Toolkit: Install via install guide
- NVIDIA Driver: 590+ for dGPU
Basic Run (with display)
export DISPLAY=:0
xhost +si:localuser:root
docker run -it --rm \
--gpus all \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix/:/tmp/.X11-unix \
nvcr.io/nvidia/deepstream:9.1-triton-multiarchHeadless Run (no display)
docker run -it --rm \
--gpus all \
nvcr.io/nvidia/deepstream:9.1-triton-multiarchFor headless mode, use
fakesinkinstead ofnveglglessink/nv3dsinkin your pipeline, or output to a file withfilesink.
Run with Custom Video File
docker run -it --rm \
--gpus all \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix/:/tmp/.X11-unix \
-v /path/to/videos:/data \
nvcr.io/nvidia/deepstream:9.1-triton-multiarchBuilding Custom Docker Images
Use a DeepStream image as the base for your application:
FROM nvcr.io/nvidia/deepstream:9.1-triton-multiarch
# Install pyservicemaker
RUN pip install --break-system-packages \
/opt/nvidia/deepstream/deepstream/service-maker/python/pyservicemaker*.whl \
pyyaml
# Copy application files
WORKDIR /app
COPY my_app.py .
COPY my_config.yml .
# Enable video driver libraries at runtime (encode/decode)
ENV NVIDIA_DRIVER_CAPABILITIES=${NVIDIA_DRIVER_CAPABILITIES},video
ENTRYPOINT ["python3", "my_app.py"]Build and Run
# Build
docker build -t my-ds-app .
# Run with display
docker run --rm --gpus all \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
my-ds-app
# Run with RTSP source (no display needed)
docker run --rm --gpus all \
my-ds-app rtsp://camera-ip/streamAdditional Packages
DeepStream containers do not include certain multimedia libraries by default. Install them if needed:
Audio/Codec Support
# Run the bundled install script for common multimedia packages
/opt/nvidia/deepstream/deepstream/user_additional_install.sh
# Or install specific packages manually
apt-get install -y gstreamer1.0-libav gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad gstreamer1.0-plugins-uglyffmpeg (for sample video preparation scripts)
apt-get install --reinstall libflac8 libmp3lame0 libxvidcore4 ffmpegKafka Support (librdkafka)
apt-get install -y librdkafka-devTracker Support (libmosquitto)
apt-get install -y libmosquitto1Important Paths Inside the Container
| Path | Contents |
|---|---|
/opt/nvidia/deepstream/deepstream/ |
DeepStream SDK root |
/opt/nvidia/deepstream/deepstream/samples/models/ |
Sample models (Primary_Detector, Secondary_*, etc.) |
/opt/nvidia/deepstream/deepstream/samples/streams/ |
Sample video streams (e.g., sample_1080p_h264.mp4) |
/opt/nvidia/deepstream/deepstream/samples/configs/ |
Sample configuration files |
/opt/nvidia/deepstream/deepstream/lib/ |
DeepStream libraries (GStreamer plugins, protocol adapters) |
/opt/nvidia/deepstream/deepstream/lib/gst-plugins/ |
GStreamer plugin .so files |
/opt/nvidia/deepstream/deepstream/service-maker/python/ |
pyservicemaker wheel file |
Environment Variables
| Variable | Purpose | Example |
|---|---|---|
GST_PLUGIN_PATH |
GStreamer plugin search path | /opt/nvidia/deepstream/deepstream/lib/gst-plugins |
LD_LIBRARY_PATH |
Shared library search path | /opt/nvidia/deepstream/deepstream/lib:$LD_LIBRARY_PATH |
GST_DEBUG |
GStreamer debug log level | 3 (INFO) or nvinfer:5 (plugin-specific) |
NVIDIA_DRIVER_CAPABILITIES |
GPU capabilities exposed | ${NVIDIA_DRIVER_CAPABILITIES},video |
DISPLAY |
X11 display for rendering sinks | :0 |
Common Docker Issues
ModuleNotFoundError: No module named 'pyservicemaker'
Cause: The wheel is bundled but not installed.
Fix: Add to Dockerfile:
RUN pip install --break-system-packages \
/opt/nvidia/deepstream/deepstream/service-maker/python/pyservicemaker*.whl \
pyyamlDisplay sinks fail with Could not open display
Cause: X11 forwarding not configured.
Fix: Pass display environment and socket:
docker run --rm --gpus all \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
my-ds-appOr use fakesink / filesink for headless operation.
Pipeline exits early during non-interactive docker exec
Cause: Running without stdin can attach /dev/null; the GLib main loop may observe EOF and
stop after the first frames.
Fix: Use docker exec -i for non-interactive pipeline scripts:
docker exec -i ds python3 /app/pipeline.py http://localhost:8080/sample.mp4If the application must run without inherited stdin, install a pipe before importing
pyservicemaker:
import os
_pipe_r, _pipe_w = os.pipe()
os.dup2(_pipe_r, 0)
os.close(_pipe_r)Failed to load plugin ... libnvds_kafka_proto.so
Cause: librdkafka not installed (not bundled in the container).
Fix: Add to Dockerfile:
RUN apt-get update && apt-get install -y librdkafka-dev && rm -rf /var/lib/apt/lists/*Warning about audio decoder not available
Cause: Multimedia codec packages removed in DeepStream containers.
Fix:
RUN /opt/nvidia/deepstream/deepstream/user_additional_install.sh