1、安装必要的依赖
先安装
sudo apt install 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 libgstreamer-plugins-base1.0-dev libgstreamer1.0-dev libgstrtspserver-1.0-dev libx11-dev libgstrtspserver-1.0-dev gstreamer1.0-rtsp
2、安装librdkafka
git clone https://github.com/edenhill/librdkafka.git
cd librdkafka
git reset --hard 7101c2310341ab3f4675fc565f64f0967e135a6a
./configure
make -j8
sudo make install
将生成的库复制到deepstream目录:
sudo mkdir -p /opt/nvidia/deepstream/deepstream-5.1/lib
sudo cp /usr/local/lib/librdkafka* /opt/nvidia/deepstream/deepstream-5.1/lib
3、deepstream安装
下载deepstream5.1的.tar文件,
https://developer.nvidia.com/deepstream-sdk-v510-x86-64tbz2
进行安装。
将文件解压并移动到系统目录
安装deepstream:
sudo cp /usr/local/lib/librdkafka* /opt/nvidia/deepstream/deepstream-5.1/lib
cd /opt/nvidia/deepstream/deepstream-5.1/
sudo ./install.sh
sudo ldconfig
sudo rm -rf ~/.cache/gstreamer-1.0/
4、验证安装
至此deepstream5.1安装完成,输入deepstream-app --version-all 来查看安装的版本,得到输出如下:
deepstream-app version 5.1.0
DeepStreamSDK 5.1.0
CUDA Driver Version: 11.3
CUDA Runtime Version: 11.1
TensorRT Version: 7.2
cuDNN Version: 8.0
libNVWarp360 Version: 2.0.1d3
如果运行时报错提示找不到一些库,如libnvdsgst_meta.so,则需要把deepstream-5.1/lib添加到系统lib路径中,如下:
sudo vi /etc/ld.so.conf
/opt/nvidia/deepstream/deepstream-5.1/lib/ //在文本后边添加该路径
sudo ldconfig //执行ldconfig立即生效
然后再执行就可以了。
5、python示例安装
下载地址(选择Python Sample Apps & Bindings):https://developer.nvidia.com/deepstream-getting-started
下载后解压,ds_pybind_v0.9.tbz2安装包:
安装DS 5.1 python package:
tar xf ds_pybind_v0.9.tbz2 -C <DeepStream 5.1 ROOT>/sources
安装的python示例将在下面文件夹下创建:
<DeepStream 5.1 ROOT>/sources/python
一起开启新世界的大门吧😊