• Hardware Platform (Jetson / GPU) : GPU
• DeepStream Version : 6.1
• TensorRT Version :
• NVIDIA GPU Driver Version : 510.108.03
• Issue Type : Question
• How to reproduce the issue ? : Use a custom plugin along with gst-dsexample and start execution from outside the container.
Hi
I am using deepstream container and have a python codebase inside it which uses deepstream pipeline for real time video analytics. Inside this pipeline gst-dsexample plugin is used. I have customized the gst-dsexample plugin to use a custom plugin called as gaze plugin which is used for the facial recognition.
Base path of plugin:
/opt/nvidia/deepstream/deepstream/sources/gst-plugins
On the above path both gst-dsexample and gaze plugin are there.
When we run this code base from inside the container the codebase works but when we run it from outside the container the dsexample fails to initialize.
I am not getting any clue from docker logs or custom logs I have added to the dsexample plugin. Is there some runtime environmental difference between running the codebase from outside the container (using docker entrypoint or docker exec command) and codebase from inside the container?
Yes. When you use docker entrypoint outside the docker, you need to pay attention to some paths of included modules. Could you attach the log when it runs failed?
You can try using any third party module in the dsexample plugin and use this plugin into any sample app like “deepstream-rtsp-in-rtsp-out” and try running this sample app using docker exec or docker entry point.
The sample app logs are as follows:
Blockquote
Creating Pipeline
Creating Source
Creating H264Parser
Creating Decoder
Creating H264 Encoder
Creating H264 rtppay
Playing file /opt/nvidia/deepstream/deepstream-6.1/samples/streams/sample_720p.h264 DSExample object is none
Current working directory /opt/nvidia/deepstream/deepstream-6.1/sources/deepstream_python_apps/apps
Adding elements to Pipeline
Linking elements in the Pipeline
*** DeepStream: Launched RTSP Streaming at rtsp://localhost:8554/ds-test ***
Starting pipeline
Frame Number=0 Number of Objects=13 Vehicle_count=9 Person_count=4
Frame Number=1 Number of Objects=11 Vehicle_count=8 Person_count=3
Frame Number=2 Number of Objects=11 Vehicle_count=7 Person_count=4
Frame Number=3 Number of Objects=11 Vehicle_count=7 Person_count=4
Frame Number=4 Number of Objects=11 Vehicle_count=8 Person_count=3
Frame Number=5 Number of Objects=12 Vehicle_count=8 Person_count=4
Frame Number=6 Number of Objects=11 Vehicle_count=7 Person_count=4
Frame Number=7 Number of Objects=11 Vehicle_count=7 Person_count=4
Frame Number=8 Number of Objects=10 Vehicle_count=6 Person_count=4
Frame Number=9 Number of Objects=12 Vehicle_count=8 Person_count=4
Frame Number=10 Number of Objects=14 Vehicle_count=10 Person_count=4
Blockquote
Please refer to the bold log line, which defines the plugin object is none. I think when we run it from outside the container the custom plugin fails to find the custom codebase.
Could you provide us with a simple demo based on “deepstream-rtsp-in-rtsp-out”? Also could you provide a detailed description of your operation step by step?
I can’t share the custom code I am calling from dsexample codebase. But I can try generate a sample code that can be shared.
The steps are:
Modify dsexample plugin source code to use any sample code which is kept in the same directory of plugins. which is /opt/nvidia/deepstream/deepstream/sources/gst-plugins
initialize dsexample plugin inside any sample app while creating pipeline using:
try:
#create the instance of custom plugin dsexample
dsexample = Gst.ElementFactory.make("dsexample","custom-plugin")
if dsexample:
print("*************************\ndsexample has some data\n*****************")
else:
print("DSExample object is none")
print("Current working directory {}".format(os.getcwd()))
except Exception as ex:
print("Excpetion while trying to create dsexample object")
Call this sample app using docker exec(assuming sample app and plugins are inside container) this may reproduce the issue.
When I run the codebase from outside the container one warning I received is:
(python3:1624): GStreamer-WARNING **: 18:34:05.933: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_dsexample.so': libnvcv_faciallandmarks.so: cannot open shared object file: No such file or directory
(python3:1624): GStreamer-WARNING **: 18:34:05.933: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_dsexample.so': libnvcv_faciallandmarks.so: cannot open shared object file: No such file or directory
OK. Just from the log you attached libnvcv_faciallandmarks.so: cannot open shared object file: No such file or directory. You should set the env variable below to use the lib. Did you set it before run your demo?
There is no update from you for a period, assuming this is not an issue anymore. Hence we are closing this topic. If need further support, please open a new one. Thanks
OK. Could you attach your whole dockerfile and the docker run command? You can also attach the modify of our open source code. If you don’t want to publish it on public, you can just message me. Thanks