I am trying to execute the example here deepstream_python_apps/apps/deepstream-imagedata-multistream at master · NVIDIA-AI-IOT/deepstream_python_apps · GitHub . After your suggestion here Deserialize engine failed because file path: .../resnet10.caffemodel_b1_gpu0_int8.engine open error I tried to run the sample within the official deepstream container.
Gstreamer is giving me errors reporting that it cannot load plugins because their files do not exists. How do I get them?
I am running on a T4.
Output:
Frames will be saved in frames
(gst-plugin-scanner:22): GStreamer-WARNING **: 20:59:31.873: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so': librivermax.so.0: cannot open shared object file: No such file or directory
(gst-plugin-scanner:22): GStreamer-WARNING **: 20:59:31.938: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so': libtritonserver.so: cannot open shared object file: No such file or directory
Creating Pipeline
Creating streamux
Creating source_bin 0
Creating source bin
source-bin-00
Creating Pgie
Creating nvvidconv1
Creating filter1
Creating tiler
Creating nvvidconv
Creating nvosd
Creating EGLSink
Atleast one of the sources is live
Adding elements to Pipeline
Linking elements in the Pipeline
Now playing...
1 : rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
Starting pipeline
^CExiting app
In order to reproduce the issue you can create the two following files in the same directory.
Dockerfile:
FROM nvcr.io/nvidia/deepstream:6.0-samples
ENV GIT_SSL_NO_VERIFY=1
RUN apt install -y git python-dev python3 python3-pip python3.6-dev python3.8-dev cmake g++ build-essential \
libglib2.0-dev libglib2.0-dev-bin python-gi-dev libtool m4 autoconf automake wget
RUN apt install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
RUN pip3 install --upgrade pip
RUN pip3 install numpy opencv-python
RUN echo '/usr/local/lib/gstreamer-1.0' >> /etc/ld.so.conf
RUN ldconfig
RUN cd /opt/nvidia/deepstream/deepstream-6.0/sources && \
git clone https://github.com/NVIDIA-AI-IOT/deepstream_python_apps.git
RUN cd /opt/nvidia/deepstream/deepstream-6.0/sources/deepstream_python_apps && \
git submodule update --init
RUN wget https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/releases/download/v1.1.0/pyds-1.1.0-py3-none-linux_x86_64.whl
RUN pip3 install pyds-1.1.0-py3-none-linux_x86_64.whl
COPY start_example.sh start_example.sh
RUN rm -rf ~/.cache/gstreamer-1.0/
start_example.sh :
cd /opt/nvidia/deepstream/deepstream-6.0/sources/deepstream_python_apps/apps/deepstream-imagedata-multistream
python3 deepstream_imagedata-multistream.py rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov frames
Then run:
docker build . -t deepstream-custom
docker run --gpus '"'device=0'"' -it --rm -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY deepstream-custom sh start_example.sh
Files librivermax.so.0
and libtritonserver.so
can’t be find in the system.
EDIT: I even tried changing base image to use the deepstream:6.0-triton
but then I got the following errors:
Frames will be saved in frames
deepstream_imagedata-multistream.py:271: PyGIDeprecationWarning: Since version 3.11, calling threads_init is no longer needed. See: https://wiki.gnome.org/PyGObject/Threading
GObject.threads_init()
(gst-plugin-scanner:87): GStreamer-WARNING **: 22:23:47.397: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_udp.so': librivermax.so.0: cannot open shared object file: No such file or directory
(gst-plugin-scanner:87): GLib-GObject-WARNING **: 22:23:47.873: specified class size for type 'GstCompositor' is smaller than the parent type's 'GstVideoAggregator' class size
(gst-plugin-scanner:87): GLib-GObject-CRITICAL **: 22:23:47.873: g_type_add_interface_static: assertion 'G_TYPE_IS_INSTANTIATABLE (instance_type)' failed
(gst-plugin-scanner:87): GLib-CRITICAL **: 22:23:47.873: g_once_init_leave: assertion 'result != 0' failed
(gst-plugin-scanner:87): GStreamer-CRITICAL **: 22:23:47.873: gst_element_register: assertion 'g_type_is_a (type, GST_TYPE_ELEMENT)' failed
Creating Pipeline
Creating streamux
Creating source_bin 0
Creating source bin
source-bin-00
Creating Pgie
Creating nvvidconv1
Creating filter1
Creating tiler
Creating nvvidconv
Creating nvosd
Creating EGLSink
Atleast one of the sources is live
Adding elements to Pipeline
Linking elements in the Pipeline
deepstream_imagedata-multistream.py:407: PyGIDeprecationWarning: GObject.MainLoop is deprecated; use GLib.MainLoop instead
loop = GObject.MainLoop()
Now playing...
1 : rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov
Starting pipeline
The corresponding dockerfile is:
FROM nvcr.io/nvidia/deepstream:6.0-triton
ENV GIT_SSL_NO_VERIFY=1
#RUN apt install -y python3-pip wget python-gi-dev
RUN add-apt-repository -y ppa:deadsnakes/ppa && apt update && apt install -y git python-dev python3 python3-pip python3.6-dev python3.8-dev cmake g++ build-essential \
libglib2.0-dev libglib2.0-dev-bin python-gi-dev libtool m4 autoconf automake
#RUN apt install -y python3-pip python-gi-dev python3.6-dev libpython3.6-dev python3.8-dev
RUN apt install -y libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev wget
RUN pip3 install --upgrade pip
RUN pip3 install numpy opencv-python
#ENV GST_PLUGIN_PATH="/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream:${GST_PLUGIN_PATH}"
#ENV GST_PLUGIN_PATH="/opt/nvidia/deepstream/deepstream-6.0/lib/gst-plugins:${GST_PLUGIN_PATH}"
#ENV LD_LIBRARY="/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream:${LD_LIBRARY}"
#ENV LD_LIBRARY="/opt/nvidia/deepstream/deepstream-6.0/lib/gst-plugins:${LD_LIBRARY}"
RUN echo '/usr/local/lib/gstreamer-1.0' >> /etc/ld.so.conf
RUN ldconfig
RUN cd /opt/nvidia/deepstream/deepstream-6.0/sources && \
git clone https://github.com/NVIDIA-AI-IOT/deepstream_python_apps.git
RUN cd /opt/nvidia/deepstream/deepstream-6.0/sources/deepstream_python_apps && \
git submodule update --init
RUN cd /opt/nvidia/deepstream/deepstream-6.0/sources/deepstream_python_apps/3rdparty/gst-python/ && \
./autogen.sh && \
make && \
make install
RUN cd /opt/nvidia/deepstream/deepstream-6.0/sources/deepstream_python_apps/bindings && \
mkdir build && \
cd build && \
cmake -DPYTHON_MAJOR_VERSION=3 -DPYTHON_MINOR_VERSION=8 -DPIP_PLATFORM=linux_x86_64 -DDS_PATH=/opt/nvidia/deepstream/deepstream-6.0 .. && \
make && \
pip3 install pyds-1.1.0-py3-none-linux_x86_64.whl
#RUN wget https://github.com/NVIDIA-AI-IOT/deepstream_python_apps/releases/download/v1.1.0/pyds-1.1.0-py3-none-linux_x86_64.whl
#RUN pip3 install pyds-1.1.0-py3-none-linux_x86_64.whl
COPY start_example.sh start_example.sh
RUN rm -rf ~/.cache/gstreamer-1.0/