Installation
This guide covers the installation of NVIDIA DeepStream SDK on different platforms.
Prerequisites
Hardware Requirements
For NVIDIA Jetson Devices:
- Jetson Nano, Xavier NX, Xavier AGX, Orin Nano, Orin NX, or Orin AGX
- Minimum 4GB RAM (8GB+ recommended)
- MicroSD card (32GB+ recommended) or NVMe SSD
For x86_64 Systems:
- NVIDIA GPU with compute capability 6.0 or higher
- Minimum 8GB RAM (16GB+ recommended)
- 20GB free disk space
Software Requirements
- Ubuntu: 20.04 or 22.04 LTS
- NVIDIA Driver: 470.x or higher
- NVIDIA CUDA: 11.4 or higher (12.x recommended)
- TensorRT: 8.5 or higher
- GStreamer: 1.16.2 or higher
Installation Methods
Method 1: Using NVIDIA SDK Manager (Jetson Only)
The easiest way to install DeepStream on Jetson devices:
- Download and install SDK Manager
- Connect your Jetson device via USB
- Select DeepStream SDK during component selection
- Follow the installation wizard
Method 2: Using Debian Package (Recommended)
Step 1: Install Dependencies
# Update package lists
sudo apt update
# Install GStreamer and dependencies
sudo apt install -y \
libgstreamer1.0-dev \
libgstreamer-plugins-base1.0-dev \
libgstreamer-plugins-bad1.0-dev \
gstreamer1.0-plugins-base \
gstreamer1.0-plugins-good \
gstreamer1.0-plugins-bad \
gstreamer1.0-plugins-ugly \
gstreamer1.0-libav \
gstreamer1.0-tools \
gstreamer1.0-x \
gstreamer1.0-alsa \
gstreamer1.0-gl \
gstreamer1.0-gtk3 \
gstreamer1.0-qt5 \
gstreamer1.0-pulseaudio
Step 2: Install CUDA and TensorRT
For x86_64:
# Download CUDA toolkit from NVIDIA website
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt update
sudo apt install cuda-toolkit-12-2
# Install TensorRT
sudo apt install tensorrt
For Jetson:
CUDA and TensorRT are included in JetPack. Skip this step if using SDK Manager.
Step 3: Download and Install DeepStream
For x86_64:
# Download DeepStream 6.4 (check for latest version)
cd /tmp
wget https://developer.nvidia.com/downloads/deepstream-sdk-v6.4-x86_64-deb
# Install DeepStream
sudo apt install ./deepstream-6.4_6.4.0-1_amd64.deb
For Jetson:
# Download DeepStream 6.4 for Jetson
cd /tmp
wget https://developer.nvidia.com/downloads/deepstream-sdk-v6.4-jetson-deb
# Install DeepStream
sudo apt install ./deepstream-6.4_6.4.0-1_arm64.deb
Step 4: Install Additional Dependencies
# Install librdkafka for message broker support
git clone https://github.com/edenhill/librdkafka.git
cd librdkafka
git checkout v1.9.2
./configure
make
sudo make install
sudo ldconfig
# Copy librdkafka to DeepStream lib directory
sudo mkdir -p /opt/nvidia/deepstream/deepstream/lib
sudo cp /usr/local/lib/librdkafka* /opt/nvidia/deepstream/deepstream/lib
Method 3: Using Docker (Cross-Platform)
Docker provides a containerized environment for DeepStream:
Pull DeepStream Docker Image
# For x86_64 with dGPU
docker pull nvcr.io/nvidia/deepstream:6.4-gc-triton-devel
# For Jetson
docker pull nvcr.io/nvidia/deepstream-l4t:6.4-samples
Run DeepStream Container
# For x86_64
docker run -it --rm \
--gpus all \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
nvcr.io/nvidia/deepstream:6.4-gc-triton-devel
# For Jetson
sudo docker run -it --rm \
--runtime nvidia \
--network host \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
nvcr.io/nvidia/deepstream-l4t:6.4-samples
Python Bindings Installation
Prerequisites for Python Bindings
sudo apt install -y python3-gi python3-dev python3-gst-1.0 \
python-gi-dev git python-dev \
python3 python3-pip python3.10-dev \
cmake g++ build-essential \
libglib2.0-dev libglib2.0-dev-bin \
libgstreamer1.0-dev libtool m4 autoconf automake \
libgirepository1.0-dev libcairo2-dev
Install Python Bindings
# Clone DeepStream Python bindings
cd /opt/nvidia/deepstream/deepstream/sources
git clone https://github.com/NVIDIA-AI-IOT/deepstream_python_apps.git
# Navigate to bindings
cd deepstream_python_apps/bindings
# Build and install
mkdir build && cd build
cmake ..
make
pip3 install ./pyds-*.whl
Install Python Dependencies
pip3 install \
numpy \
opencv-python \
pycairo \
PyGObject
Verification
Verify DeepStream Installation
# Check DeepStream version
deepstream-app --version
# Run sample application
cd /opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app
deepstream-app -c source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt
Verify Python Bindings
import sys
sys.path.append('/opt/nvidia/deepstream/deepstream/lib')
import pyds
print(f"DeepStream Python bindings version: {pyds.__version__}")
Common Installation Issues
Issue: Missing CUDA libraries
Solution:
# Add CUDA to PATH and LD_LIBRARY_PATH
echo 'export PATH=/usr/local/cuda/bin:$PATH' >> ~/.bashrc
echo 'export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH' >> ~/.bashrc
source ~/.bashrc
Issue: GStreamer plugins not found
Solution:
# Set GStreamer plugin path
export GST_PLUGIN_PATH=/opt/nvidia/deepstream/deepstream/lib/gst-plugins:$GST_PLUGIN_PATH
Issue: Python bindings import error
Solution:
# Add DeepStream lib to Python path
export PYTHONPATH=/opt/nvidia/deepstream/deepstream/lib:$PYTHONPATH
Issue: Display not available in Docker
Solution:
# Allow X server access
xhost +local:docker
# Run container with proper display settings
docker run -it --rm \
--gpus all \
-e DISPLAY=$DISPLAY \
-v /tmp/.X11-unix:/tmp/.X11-unix \
-v $HOME/.Xauthority:/root/.Xauthority \
--net=host \
nvcr.io/nvidia/deepstream:6.4-gc-triton-devel
Environment Setup
Create a setup script for easy environment configuration:
setup_deepstream.sh
#!/bin/bash
# CUDA paths
export PATH=/usr/local/cuda/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/cuda/lib64:$LD_LIBRARY_PATH
# DeepStream paths
export DEEPSTREAM_DIR=/opt/nvidia/deepstream/deepstream
export LD_LIBRARY_PATH=$DEEPSTREAM_DIR/lib:$LD_LIBRARY_PATH
export GST_PLUGIN_PATH=$DEEPSTREAM_DIR/lib/gst-plugins:$GST_PLUGIN_PATH
# Python bindings
export PYTHONPATH=$DEEPSTREAM_DIR/lib:$PYTHONPATH
echo "DeepStream environment configured!"
Save and source the script:
chmod +x setup_deepstream.sh
source setup_deepstream.sh
# Add to .bashrc for automatic loading
echo "source ~/setup_deepstream.sh" >> ~/.bashrc
Next Steps
- Quick Start: Run your first DeepStream application
- Basic Usage: Learn core concepts
- Python Bindings: Start with Python API