【经验分享】ubuntu 安装 deepstream5.1

欢迎关注我的公众号 [极智视界],回复001获取Google编程规范

O_o>_<   o_OO_o~_~o_O

  本教程详细记录了在 ubuntu 上安装 deepstream5.1 的方法。

   之前写的这篇《【经验分享】ubuntu 安装 deepstream6.0》可能对于系统版本要求过高,故又写了一篇 5.1 版本的,可能更通用一些。

  一些版本要求:

  • Ubuntu 18.04
  • GStreamer 1.14.1
  • NVIDIA driver 460.32
  • CUDA 11.1
  • TensorRT 7.2.3

1、安装 Gstreamer

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 libssl1.0.0 libgstrtspserver-1.0-0 libjansson4

   检查是否安装成功:

dpkg -l | grep gstreamer

2、安装 TensorRT 7.2.3

  下载源码包,下载传送:https://developer.nvidia.com/...

   解压,将 TensorRT 库放到系统环境,然后安装 TensorRT python 接口:

cd /python
pip install tensorrt-7.2.3.4-cpxx-none-linux_x86_64.whl

cd ../uff
pip install uff-0.6.9-py2.py3-none-any.whl

3、安装 librdkafka

git clone https://github.com/edenhill/librdkafka.git

cd librdkafka/
git reset --hard 7101c2310341ab3f4675fc565f64f0967e135a6a

./configure

sudo make
sudo make install

# 生成的库在 /usr/local/lib/librdkafka*

4、安装 deepstream sdk

  下载源码包,下载传送:https://developer.nvidia.com/...

tar -xpvf deepstream_sdk_v5.1.0_x86_64.tbz2

cp -r opt /

# 将前面的librdkafka拷到deepstream库
sudo cp -r /usr/local/lib/librdkafka* /opt/nvidia/deepstream/deepstream-5.1/lib/

cd /opt/nvidia/deepstream/deepstream

sudo ./install.sh

  安装一下 python 接口:

sudo apt update
sudo apt install python3-gi python3-dev python3-gst-1.0 -y
 
cd /opt/nvidia/deepstream/deepstream/lib
python3 setup.py install

5、验证是否安装成功

which deepstream-app

  能定位到 deepstream-app 一般就成功了,然后可以用 deepstram-app 执行一些 samples,基本命令如下:

deepstream-app -c 

   验证一下 python 示例:

cd /opt/nvidia/deepstream/deepstream/sources
git clone https://github.com/NVIDIA-AI-IOT/deepstream_python_apps
 
# 运行例子1
cd /opt/nvidia/deepstream/deepstream/sources/deepstream_python_apps/apps/deepstream-test1
python3 deepstream_test_1.py /opt/nvidia/deepstream/deepstream/samples/streams/sample_720p.h264 

   以上分享了在 ubuntu 上安装 deepstream5.1 的方法,希望我的分享对你会有一点帮助。


【公众号传送】
【经验分享】ubuntu 安装 deepstream5.1

你可能感兴趣的:(【经验分享】ubuntu 安装 deepstream5.1)