Error from deepstream sample apps

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson TX2)
• DeepStream Version 5.0
• JetPack Version 4.3(valid for Jetson only)
• TensorRT Version 6.0.1 and CUDA 10.0
• NVIDIA GPU Driver Version (valid for GPU only)
• Issue Type( troubleshooting)

Not sure if this helps but when i do apt-cache show nvidia-jetpack, i get

Package: nvidia-jetpack
Version: 4.3-b134
Architecture: arm64
Maintainer: NVIDIA Corporation
Installed-Size: 194
Depends: nvidia-container-csv-cuda (= 10.0.326-1), libopencv-python (= 4.1.1-2-gd5a58aa75), libvisionworks-sfm-dev (= 0.90.4), libvisionworks-dev (= 1.6.0.500n), libvisionworks-samples (= 1.6.0.500n), libnvparsers6 (= 6.0.1-1+cuda10.0), libnvinfer-plugin6 (= 6.0.1-1+cuda10.0), libcudnn7-doc (= 7.6.3.28-1+cuda10.0), libcudnn7-dev (= 7.6.3.28-1+cuda10.0), libnvinfer-samples (= 6.0.1-1+cuda10.0), libnvinfer-bin (= 6.0.1-1+cuda10.0), nvidia-container-csv-cudnn (= 7.6.3.28-1+cuda10.0), libvisionworks-tracking-dev (= 0.88.2), vpi-samples (= 0.1.0), tensorrt (= 6.0.1.10-1+cuda10.0), libopencv (= 4.1.1-2-gd5a58aa75), libnvinfer-doc (= 6.0.1-1+cuda10.0), libnvparsers-dev (= 6.0.1-1+cuda10.0), libcudnn7 (= 7.6.3.28-1+cuda10.0), libnvidia-container0 (= 0.9.0~beta.1), cuda-toolkit-10-0 (= 10.0.326-1), nvidia-container-csv-visionworks (= 1.6.0.500n), graphsurgeon-tf (= 6.0.1-1+cuda10.0), libopencv-samples (= 4.1.1-2-gd5a58aa75), python-libnvinfer-dev (= 6.0.1-1+cuda10.0), libnvinfer-plugin-dev (= 6.0.1-1+cuda10.0), libvisionworks (= 1.6.0.500n), nvidia-container-toolkit (= 1.0.1-1), libnvinfer-dev (= 6.0.1-1+cuda10.0), nvidia-l4t-jetson-multimedia-api (= 32.3.1-20191209230245), libopencv-dev (= 4.1.1-2-gd5a58aa75), vpi-dev (= 0.1.0), vpi (= 0.1.0), python3-libnvinfer (= 6.0.1-1+cuda10.0), python3-libnvinfer-dev (= 6.0.1-1+cuda10.0), opencv-licenses (= 4.1.1-2-gd5a58aa75), nvidia-container-csv-tensorrt (= 6.0.1.10-1+cuda10.0), libnvinfer6 (= 6.0.1-1+cuda10.0), libnvonnxparsers-dev (= 6.0.1-1+cuda10.0), libnvonnxparsers6 (= 6.0.1-1+cuda10.0), uff-converter-tf (= 6.0.1-1+cuda10.0), nvidia-docker2 (= 2.2.0-1), libvisionworks-sfm (= 0.90.4), libnvidia-container-tools (= 0.9.0~beta.1), nvidia-container-runtime (= 3.1.0-1), python-libnvinfer (= 6.0.1-1+cuda10.0), libvisionworks-tracking (= 0.88.2)
Homepage: http://developer.nvidia.com/jetson
Priority: standard
Section: metapackages
Filename: pool/main/n/nvidia-jetpack/nvidia-jetpack_4.3-b134_arm64.deb
Size: 29746
SHA256: 958c32d872e11fef50737f6f38f93dd2c737f5d68886cb964d3da63151405337
SHA1: 32aa5a29be86550fbe9f4c249f2640bdfce596cd
MD5sum: 2b2590855299af3030509e55d9135c2d
Description: NVIDIA Jetpack Meta Package
Description-md5: ad1462289bdbc54909ae109d1d32c0a8

Basically i ran into an error when trying to run a sample TLT model trafficcamnet. I ran the inference deepstream-app -c deepstream_app_source1_trafficcamnet.txt
but i got an error
deepstream-app: error while loading shared libraries: libnvinfer.so.7: cannot open shared object file: No such file or directory

I am not really sure what is going on but it may be a linking problem(?). Previously i had deepstream 4.0 and i had to install 5.0 and uninstall 4.0 using the .sh script provided. I went on to do ldconfig but maybe something went wrong(?)

Similar problem arised when i tried to run using python3.
I tried a sample app from python with
python3 deepstream_test_1.py /opt/nvidia/deepstream/deepstream-5.0/samples/streams/sample_720p.mp4

and i got similar error

(gst-plugin-scanner:20374): GStreamer-WARNING **: 16:08:29.304: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_osd.so': libnvinfer.so.7: cannot open shared object file: No such file or directory

(gst-plugin-scanner:20374): GStreamer-WARNING **: 16:08:29.308: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_infer.so': libnvparsers.so.7: cannot open shared object file: No such file or directory

(gst-plugin-scanner:20374): GStreamer-WARNING **: 16:08:29.313: Failed to load plugin '/usr/lib/aarch64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so': libnvinfer.so.7: cannot open shared object file: No such file or directory
Creating Pipeline 
 
Creating Source 
 
Creating H264Parser 

Creating Decoder 

 Unable to create pgie 
 Unable to create nvosd 
Creating EGLSink 

Playing file /opt/nvidia/deepstream/deepstream-5.0/samples/streams/sample_720p.mp4 
Traceback (most recent call last):
  File "deepstream_test_1.py", line 266, in <module>
    sys.exit(main(sys.argv))
  File "deepstream_test_1.py", line 203, in main
    pgie.set_property('config-file-path', "dstest1_pgie_config.txt")
AttributeError: 'NoneType' object has no attribute 'set_property'

Please update Jetpack to latest, you can install deepstream by Jetpack.
except deepstream library, it also have some other dependency libraries, just upgrade deepstream is not enough.

After updating jetpack, i am able to run deepstream-app -c source4_1080p_dec_infer-resnet_tracker_sgie_tiled_display_int8.txt from the samples.

But for the pre-trained tlt models still, i am unable to run them. This is the error i get when i run deepstream-app -c deepstream_app_source1_trafficcamnet.txt

Using winsys: x11 
gstnvtracker: Loading low-level lib at /opt/nvidia/deepstream/deepstream-5.0/lib/libnvds_mot_klt.so
gstnvtracker: Optional NvMOT_RemoveStreams not implemented
gstnvtracker: Batch processing is OFF
ERROR: Deserialize engine failed because file path: /opt/nvidia/deepstream/deepstream-5.0/samples/configs/tlt_pretrained_models/../../models/tlt_pretrained_models/trafficcamnet/resnet18_trafficcamnet_pruned.etlt_b1_gpu0_int8.engine open error
0:00:01.319835849  3738     0x23a84800 WARN                 nvinfer gstnvinfer.cpp:599:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:1566> [UID = 1]: deserialize engine from file :/opt/nvidia/deepstream/deepstream-5.0/samples/configs/tlt_pretrained_models/../../models/tlt_pretrained_models/trafficcamnet/resnet18_trafficcamnet_pruned.etlt_b1_gpu0_int8.engine failed
0:00:01.319912233  3738     0x23a84800 WARN                 nvinfer gstnvinfer.cpp:599:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Warning from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:1673> [UID = 1]: deserialize backend context from engine from file :/opt/nvidia/deepstream/deepstream-5.0/samples/configs/tlt_pretrained_models/../../models/tlt_pretrained_models/trafficcamnet/resnet18_trafficcamnet_pruned.etlt_b1_gpu0_int8.engine failed, try rebuild
0:00:01.319938825  3738     0x23a84800 INFO                 nvinfer gstnvinfer.cpp:602:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1591> [UID = 1]: Trying to create engine from model files
WARNING: INT8 not supported by platform. Trying FP16 mode.
parseModel: Failed to open TLT encoded model file /opt/nvidia/deepstream/deepstream-5.0/samples/configs/tlt_pretrained_models/../../models/tlt_pretrained_models/trafficcamnet/resnet18_trafficcamnet_pruned.etlt
ERROR: failed to build network since parsing model errors.
ERROR: Failed to create network using custom network creation function
ERROR: Failed to get cuda engine from custom library API
0:00:01.320389960  3738     0x23a84800 ERROR                nvinfer gstnvinfer.cpp:596:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Error in NvDsInferContextImpl::buildModel() <nvdsinfer_context_impl.cpp:1611> [UID = 1]: build engine file failed
Bus error (core dumped)

How do i fix this? And just to check, is there any guides/tutorials for how deepstream works(the config files and its parameters?)

Did you download the models?

the models came along when i installed jetpack right? Under deepstream 5.0.

You need to download tlt models

Hi! My system is Ubuntu 18.04, TRT 7.0.0.11, CUDA 10.2, cudnn 7.6.5, Nvidia driver 440 on GeForce 940M with Deepstream SDK 5.

I checked the cuda, TRT, cudnn and other installations before installing deepstream. I have followed the Documentation perfectly. I have used tar file to install TRT.

When I enter the samples directory and execute
deepstream-app -c ./configs/deepstream-app/source30_1080p_dec_infer-resnet_tiled_display_int8.txt

I get the error
deepstream-app: error while loading shared libraries: libnvinfer.so.7: cannot open shared object file: No such file or directory

Please help!! I’m a beginner and barely know of cuda or TRT.

Where did you install TensorRT?
if you did not install to system path, you need to explicitly specify dynamic link path,
export LD_LIBRARY_PATH=/your TRT library path/:$LD_LIBRARY_PATH