本文主要是介绍ubuntu安装deepstream的方案-宿主机安装方法,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
ubuntu安装deepstream的方案-宿主机安装方法
- 参考网站:
- 安装的包:
- 1) 前期准备:
- 2) 安装显卡驱动(连接外网)
- 3) 安装cuda-11.8,.run安装方式
- 4) 安装cudnn-8.7.0.84,.deb安装方式
- 5) 安装TensorRT-8.5.3,.deb安装方式
- 6) 安装librdkafka
- 7) 安装deepstream-6.2.0,.deb安装方式
- 遇到的问题:
ubuntu20.04安装deepstream的方案(宿主机安装):
参考网站:
https://docs.nvidia.com/metropolis/deepstream/dev-guide/text/DS_Quickstart.html#dgpu-setup-for-ubuntu
安装的包:
nvidia-driver-535
cuda-11.8
cudnn-8.7.0.84
TensorRT-8.5.3
deepstream-6.2.0
1) 前期准备:
删除:
sudo rm -rf /usr/local/deepstream
sudo rm -rf /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libgstnv*
sudo rm -rf /usr/bin/deepstream*
sudo rm -rf /usr/lib/x86_64-linux-gnu/gstreamer-1.0/libnvdsgst*
sudo rm -rf /usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream*
sudo rm -rf /opt/nvidia/deepstream/deepstream*
sudo rm -rf /usr/lib/x86_64-linux-gnu/libv41/plugins/libcuvidv4l2_plugin.so
安装依赖:
sudo apt install libssl1.1
sudo apt install libgstreamer1.0-0
sudo apt install gstreamer1.0-tools
sudo apt install gstreamer1.0-plugins-good
sudo apt install gstreamer1.0-plugins-bad
sudo apt install gstreamer1.0-plugins-ugly
sudo apt install gstreamer1.0-libav
sudo apt install libgstreamer-plugins-base1.0-dev
sudo apt install libgstrtspserver-1.0-0
sudo apt install libjansson4
sudo apt install libyaml-cpp-dev
sudo apt install libjsoncpp-dev
sudo apt install protobuf-compiler
sudo apt install gcc
sudo apt install make
sudo apt install git
sudo apt install python3
安装:gstreamer-rtsp-server
git clone https://github.com/GStreamer/gst-rtsp-server.git -b 1.8 //下载源码
cd gst-rtsp-server
./autogen.sh
sudo make
sudo make install
2) 安装显卡驱动(连接外网)
step1 查看本机适合匹配的驱动
执行:ubuntu-drivers devices
输出:
== /sys/devices/pci0000:00/0000:00:01.0/0000:01:00.0 ==
modalias : pci:v000010DEd00002204sv00001028sd00003880bc03sc00i00
vendor : NVIDIA Corporation
driver : nvidia-driver-470-server - distro non-free
driver : nvidia-driver-535 - distro non-free
driver : nvidia-driver-525-server - distro non-free
driver : nvidia-driver-535-server-open - distro non-free recommended
driver : nvidia-driver-525 - distro non-free
driver : nvidia-driver-535-open - distro non-free
driver : nvidia-driver-525-open - distro non-free
driver : nvidia-driver-535-server - distro non-free
driver : nvidia-driver-470 - distro non-free
driver : nvidia-driver-520 - third-party free
driver : xserver-xorg-video-nouveau - distro free builtin== /sys/devices/pci0000:00/0000:00:1f.4 ==
modalias : pci:v00008086d000043A3sv00001028sd00000A58bc0Csc05i00
vendor : Intel Corporation
driver : oem-somerville-weedle-meta - distro free
step2 选择适合自己的进行安装驱动
执行: sudo apt-get install nvidia-driver-535
step3 卸载驱动(如果需要的话)
执行:
sudo apt-get --purge remove nvidia-*
sudo apt-get purge nvidia*
sudo apt-get autoremove
3) 安装cuda-11.8,.run安装方式
sudo chmod +x cuda_11.8.0_520.61.05_linux.run
sudo ./cuda_11.8.0_520.61.05_linux.run
4) 安装cudnn-8.7.0.84,.deb安装方式
sudo dpkg -i cudnn-local-repo-ubuntu2004-8.7.0.84_1.0-1_amd64.deb
sudo cp /var/cudnn-local-repo-*/cudnn-local-*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get install libcudnn8=8.7.0.84-1+cuda11.8
sudo apt-get install libcudnn8-dev=8.7.0.84-1+cuda11.8
sudo apt-get install libcudnn8-samples=8.7.0.84-1+cuda11.8
验证是否成功
cp -r /usr/src/cudnn_samples_v8/ $HOME
cd $HOME/cudnn_samples_v8/mnistCUDNN
make clean && make
./mnistCUDNN
5) 安装TensorRT-8.5.3,.deb安装方式
sudo dpkg -i nv-tensorrt-local-repo-ubuntu2004-8.5.3-cuda-11.8_1.0-1_amd64.deb
sudo cp /var/nv-tensorrt-local-repo-ubuntu2004-8.5.3-cuda-11.8/*-keyring.gpg /usr/share/keyrings/
sudo apt-get update
sudo apt-get install tensorrt
6) 安装librdkafka
git clone https://github.com/edenhill/librdkafka.git
cd librdkafka
git reset --hard 7101c2310341ab3f4675fc565f64f0967e135a6a
./configure
make
sudo make install
sudo mkdir -p /opt/nvidia/deepstream/deepstream-6.2/lib
sudo cp /usr/local/lib/librdkafka* /opt/nvidia/deepstream/deepstream-6.2/lib
7) 安装deepstream-6.2.0,.deb安装方式
sudo apt-get install ./deepstream-6.2_6.2.0-1_amd64.deb
NOTE: sources and samples folders will be found in /opt/nvidia/deepstream/deepstream-6.2
遇到的问题:
1)警告,不用管
(gst-plugin-scanner:21132): GStreamer-WARNING **: 16:44:32.674: 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
(gst-plugin-scanner:21132): GStreamer-WARNING **: 16:44:33.094: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_inferserver.so': libtritonserver.so: cannot open shared object file: No such file or directory
(gst-plugin-scanner:21132): GStreamer-WARNING **: 16:44:33.113: Failed to load plugin '/usr/lib/x86_64-linux-gnu/gstreamer-1.0/deepstream/libnvdsgst_ucx.so': libucs.so.0: cannot open shared object file: No such file or directory
这篇关于ubuntu安装deepstream的方案-宿主机安装方法的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!