安装deepstream流程
1、安装NVIDIA驱动和CUDA 12.4
安装NVIDIA驱动
- 打开终端并更新包列表:
sudo apt-get update
- 安装NVIDIA驱动程序:
sudo apt-get install -y nvidia-driver-525
- 重启系统:
sudo reboot
安装CUDA 12.4 (根据自己显卡的版本)
- 下载CUDA 12.4安装包:
wget https://developer.download.nvidia.com/compute/cuda/12.4/local_installers/cuda-repo-ubuntu2004-12-4-local_12.4.0-470.57.02-1_amd64.deb
- 安装CUDA 12.4:执行下面指令
wget https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2204/x86_64/cuda-keyring_1.1-1_all.deb
sudo dpkg -i cuda-keyring_1.1-1_all.deb
sudo apt-get update
sudo apt-get -y install cuda-toolkit-12-4
重启系统:
sudo reboot
添加环境变量
vim ~/.bashrc
主要看自己的库路径,我这个不知道为什么是在usr/local/cuda-12.4/targets/x86_64-linux/lib目录下面
添加下面句子
export PATH=/usr/local/cuda-12.4/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.4/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-12.4/targets/x86_64-linux/lib
source ~/.bashrc
3. 安装TensorRT
NVIDIA TensorRT 8.x 下载 |NVIDIA 开发者
根据自己的项目需求
我的是8.5版本,所以下载了
下载到服务器上面
然后解压到/usr/local文件夹下
sudo tar -xzvf TensorRT-8.5.1.7.Linux.x86_64-gnu.cuda-10.2.cudnn8.6.tar.gz -C /usr/local
配置环境变量
vim ~/.bashrc
不知道为啥库文件在targets/x86_64-linux-gnu/lib而不是在标准目录下,就只能这样配了
添加下面句子
export PATH=/usr/local/TensorRT-8.5.1.7/bin:$PATH
export LD_LIBRARY_PATH=/usr/local/TensorRT-8.5.1.7/targets/x86_64-linux-gnu/lib:$LD_LIBRARY_PATH
source ~/.bashrc
4. 安装GStreamer依赖项
DeepStream依赖于GStreamer库,所以需要先安装这些依赖项:
sudo apt-get update sudo apt-get install -y \ 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 \ gstreamer1.0-rtsp
4. 安装DeepStream SDK
wget --content-disposition 'https://api.ngc.nvidia.com/v2/resources/org/nvidia/deepstream/7.0/files?redirect=true&path=deepstream_sdk_v7.0.0_x86_64.tbz2' -O deepstream_sdk_v7.0.0_x86_64.tbz2
解压下载的 .tbz2
文件:
tar -xvf deepstream_sdk_v7.0.0_x86_64.tbz2
配置环境变量
vim ~/.bashrc
添加下面句子
export PATH=$PATH:/opt/nvidia/deepstream/deepstream-7.0/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/nvidia/deepstream/deepstream-7.0/lib
export GST_PLUGIN_PATH=$GST_PLUGIN_PATH:/opt/nvidia/deepstream/deepstream-7.0/lib/gst-plugins
source ~/.bashrc
验证安装成功
deepstream-app --version
出现版本好,成功了!!!!!!
原文地址:https://blog.csdn.net/weixin_48628145/article/details/140640847
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!