Cant run deepstream python on docker container

Please provide complete information as applicable to your setup.

  • Hardware Platform (Jetson / GPU): Jetson
  • DeepStream Version: 7.1
  • JetPack Version: 6.1
  • TensorRT Version: 10.3.0.30

I am trying to use deepstream with python inside a docker container.

When i try to run the sample app deepstream_test_1.py

I get the error "No module named ‘cuda’ "

Here my DockerFile:

FROM nvcr.io/nvidia/deepstream:7.1-samples-multiarch AS builder

RUN apt-get update

RUN apt-get install -y --reinstall libflac8 libmp3lame0 libxvidcore4 ffmpeg

RUN apt-get install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev

RUN apt-get install -y gstreamer-1.0

RUN apt-get install -y python-gi-dev

RUN apt-get install -y libgirepository1.0-dev libcairo2-dev

WORKDIR /opt/nvidia/deepstream/deepstream/sources

RUN git clone --branch v1.2.0 GitHub - NVIDIA-AI-IOT/deepstream_python_apps: DeepStream SDK Python bindings and sample applications

RUN curl -L -o pyds-1.2.0-cp310-cp310-linux_aarch64.whl https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/releases/download/v1.2.0/pyds-1.2.0-cp310-cp310-linux_aarch64.whl

RUN pip install pyds-1.2.0-cp310-cp310-linux_aarch64.whl

WORKDIR /opt/nvidia/deepstream/deepstream/

RUN ./install.sh

RUN ./user_additional_install.sh

RUN ./update_rtpmanager.sh

what am I missing?

Please follow this link to install dependencies.

Or run this script in docker to automatically compile and install pyds

/opt/nvidia/deepstream/deepstream/user_deepstream_python_apps_install.sh -b -r 1.2.0