Running Python Applications in Docker

I’m creating a docker container for to run the python samples in deepstream_python_apps
As far as I can see, the docker conatiners here ( do not have python support. So I’m trying to add that to the docker file.

This is my dockerfile:

COPY myapp /root/apps/myapp

RUN apt-get update &&
apt-get upgrade -y

RUN apt-get install -y --force-yes git build-essential autotools-dev automake autoconf
libtool python3-dev libpython3-dev libgstreamer1.0-dev


RUN apt-get install python-gi-dev -y &&
export GST_LIBS="-lgstreamer-1.0 -lgobject-2.0 -lglib-2.0" &&
export GST_CFLAGS="-pthread -I/usr/include/gstreamer-1.0 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include" &&
git clone &&
cd gst-python &&
git checkout 1a8f48a &&
./ PYTHON=python3 &&
./configure PYTHON=python3 &&
make &&
make install

RUN cd /opt/nvidia/deepstream/deepstream-5.0/sources && git clone


When I try to run the python samples I get:

python3 /opt/nvidia/deepstream/deepstream-5.0/samples/streams/sample_720p.h264
Traceback (most recent call last):
File “”, line 33, in
import pyds
ModuleNotFoundError: No module named ‘pyds’

Then when trying to setup the pyds module
cd /opt/nvidia/deepstream/deepstream/lib
python3 install
There is no setup file in the directory and no file

What am I doing wrong?
How can I get this working?

Hi @g4ussian,
Could you use docker or other 5.0.1 dockers under ?

5.0-dp is old release, and its pyds is needed to be downlaoded from, but it was removed now.
From 5.0-GA, pyds is integrated into DeepStream release, so if you use the latest release - 5.0.1 or its docker, there is pyds integrated.

I do find pyds integrated from 5.0-GA onwards on devel and triton branches. But I can’t find pyds in the base container. What do I do now?

Refer to Python Sample Apps Source Details — DeepStream 5.1 Release documentation to install the python binding and run the python sample for DS5.x