Can't load nvinfer module in docker image based on nvcr.io/nvidia/deepstream:6.2-triton

SetUp Info:

• Hardware Platform (Jetson / GPU) RTX 2080ti
• NVIDIA GPU Driver Version (valid for GPU only) 560.94
• Running on Docker via WSL2 docker 4.41.2 (191736) (i can see the GPU from the WSL machine)

Dear all,

I’m trying to run a the python app example of deepstream in docker, however the during loading Gstreamer give me an error in loading a library necessary for nvinfer to work.

I’m stuck to deepstream 6.2 since I need to use some custom modification of the nvmsgconv module which we build upon the deepstream 6.2 c++ APIs.

That said this is the actual docker composed used:

FROM nvcr.io/nvidia/deepstream:6.2-triton


RUN apt update
RUN apt install -y python3-gi python3-dev python3-gst-1.0 
RUN apt install -y python3-opencv python3-numpy libgstrtspserver-1.0-0 gstreamer1.0-rtsp libgirepository1.0-dev  gobject-introspection gir1.2-gst-rtsp-server-1.0

############################
## Install Deepstream-PY ###
############################
WORKDIR /opt/nvidia/deepstream/deepstream-6.2
RUN chmod 777 ./user_deepstream_python_apps_install.sh
RUN ./user_deepstream_python_apps_install.sh --version 1.1.6

# Python stuff
RUN pip3 install cuda-python

WORKDIR /opt/nvidia/deepstream/deepstream-6.2/sources/deepstream_python_apps/apps/deepstream-test1

while this is the warning I receive during the execution of the python script, which cause the failure of the system:

(gst-plugin-scanner:7): GStreamer-WARNING **: 11:03:09.815: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_preprocess.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_preprocess.so: undefined symbol: cuGraphicsEGLRegisterImage
detection-1  | 
detection-1  | (gst-plugin-scanner:7): GStreamer-WARNING **: 11:03:09.884: 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
detection-1  | 
detection-1  | (gst-plugin-scanner:7): GStreamer-WARNING **: 11:03:09.956: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_infer.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_infer.so: undefined symbol: cuGraphicsEGLRegisterImage
detection-1  | 
detection-1  | (gst-plugin-scanner:7): GStreamer-WARNING **: 11:03:09.977: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_deepstream_bins.so': /usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_infer.so: undefined symbol: cuGraphicsEGLRegisterImage
detection-1  | Creating Pipeline
detection-1  | 
detection-1  | Creating Source
detection-1  | 
detection-1  | Creating H264Parser
detection-1  | 
detection-1  | Creating Decoder
detection-1  | 
detection-1  |  Unable to create pgie
detection-1  | Is it Integrated GPU? : 0
detection-1  | Creating EGLSink
detection-1  |
detection-1  | Playing file /app/media/DJI_0804_0001_30m_1.mp4
detection-1  | Traceback (most recent call last):
detection-1  |   File "./deepstream_test_1.py", line 263, in <module>
detection-1  |     sys.exit(main(sys.argv))
detection-1  |   File "./deepstream_test_1.py", line 206, in main
detection-1  |     pgie.set_property('config-file-path', "dstest1_pgie_config.txt")
detection-1  | AttributeError: 'NoneType' object has no attribute 'set_property'
detection-1 exited with code 1

If someone could provide me some help inf fixing this issue it would be amazing.
Best,
MA

It’s probably a issue with the driver not being installed properly. Please refer to this link for DeepStream On WSL.

DeepStream On WSL is alpha release, there are some issues not fixed now. Native linux is recommended.

Thanks @junshengy!

I will give a try, since the WSL machine is only a develop machine for the time being I moved the development in a VM on Azure. I will test the fix and reach back to the post for updates!