Jetson Nano( 六)Deepstream5.0環境安裝

爬山的鹹魚發表於2020-11-26

Jetson Nano 下安裝Deepstream

軟硬體版本

Jetson Nano 4G
JP 4.4.1
CUDA 10.2
TensorRT 7.1.3.0

由官網查得系統為JP4.4對應的deepstream版本為5.0。

https://developer.nvidia.com/zh-cn/embedded/jetpack

安裝依賴

sudo apt-get install libssl1.0.0  libgstreamer1.0-0 gstreamer1.0-tools gstreamer1.0-plugins-good gstreamer1.0-plugins-bad  gstreamer1.0-plugins-ugly gstreamer1.0-libav libgstrtspserver-1.0-0 libjansson4

sudo apt-get install libgstreamer1.0-0 gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-bad gstreamer1.0-plugins-ugly gstreamer1.0-libav gstreamer1.0-doc gstreamer1.0-tools gstreamer1.0-x gstreamer1.0-alsa gstreamer1.0-gl gstreamer1.0-gtk3 gstreamer1.0-qt5 gstreamer1.0-pulseaudio libgstrtspserver-1.0-dev gstreamer1.0-rtsp

sudo apt-get install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev

sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libgstrtspserver-1.0-dev libx11-dev libgstrtspserver-1.0-dev gstreamer1.0-rtsp ffmpeg

sudo apt-get install libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libgstrtspserver-1.0-dev libx11-dev libjson-glib-dev

官網下載對應安裝包

下載對應jetson的sdk的tar包

https://developer.nvidia.com/deepstream-getting-started

安裝

sudo tar -jxvf deepstream_sdk_v5.0.1_jetson.tbz2 -C /
cd /opt/nvidia/deepstream/deepstream-5.0/
sudo ./install.sh
sudo ldconfig

新增環境變數

sudo vim /etc/ld.so.conf
#新增下行在檔案最後
/opt/nvidia/deepstream/deepstream-5.0/lib/    
   
sudo ldconfig    #立即生效

為了避免報錯 No EGL Display 環境變數下新增unset DISPLAY。

#還要新增
sudo vim ~/.bashrc
#最後面新增
unset DISPLAY

#儲存退出,生效一下
source ~/.bashrc

檢視deepstearm安裝情況

deepstream-app --version-all

在這裡插入圖片描述
執行案例:

cd /opt/nvidia/deepstream/deepstream
#測試案例
deepstream-app -c samples/configs/deepstream-app/source8_1080p_dec_infer-resnet_tracker_tiled_display_fp16_nano.txt

如果如下錯誤:
在這裡插入圖片描述
需要刪除緩衝檔案

sudo rm ~/.cache/gstreamer-1.0/*

正常執行輸出為:
在這裡插入圖片描述

至此安裝結束,接下來會跑下yolov4-tiny,yolov5s等模型試試。

參考

https://blog.csdn.net/zong596568821xp/article/details/105966383
https://blog.csdn.net/symuamua/article/details/104786626

相關文章