Ubuntu 18.04上DeepStream安裝

DeepStream主頁:https://developer.nvidia.com/deepstream-sdkhtml

DeepStream Development Guide:https://docs.nvidia.com/metropolis/deepstream/4.0/dev-guide/python

DeepStream SDK API:https://docs.nvidia.com/metropolis/deepstream/4.0/dev-guide/DeepStream_Development_Guide/baggage/index.htmllinux

環境搭建:git

1)要求github

• Ubuntu 18.04
• Gstreamer 1.14.1
• NVIDIA driver 418+
• CUDA 10.1
• TensorRT 5.1.5

2)執行nvidia-smi查詢Nvidia驅動版本ubuntu

Driver Version: 418.87.00vim

執行cat /usr/local/cuda/version.txt查詢CUDA版本bash

CUDA Version 10.1.243ide

執行cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2查詢cudnn版本ui

7.6.3

執行cat /proc/version查詢ubuntu系統版本

18.04.1

Gstreamer安裝:

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

驗證Gstreamer:dpkg -l | grep gstreamer

TensorRT安裝:參考https://docs.nvidia.com/deeplearning/sdk/tensorrt-install-guide/index.html#installing-tar

下載:https://developer.nvidia.com/nvidia-tensorrt-5x-download,須要先登陸NVIDIA帳號

tar xzvf TensorRT-5.1.5.0.Ubuntu-18.04.2.x86_64-gnu.cuda-10.1.cudnn7.5.tar.gz

sudo vim ~/.bashrc,添加:

source ~/.bashrc

cd TensorRT-5.1.5.0/python/

sudo -H pip3 install tensorrt-5.1.5.0-cp36-none-linux_x86_64.whl

(若沒安裝pip,先安裝pip3:sudo apt install python3-pip)

cd ../uff   (計劃將TensorRT與TensorFlow一塊兒使用時,安裝uff纔是必要的)

sudo -H pip3 install uff-0.6.3-py2.py3-none-any.whl

which convert-to-uff

若提示錯誤:

先安裝protobuf:

下載:https://github.com/protocolbuffers/protobuf/releases

cd protobuf-3.9.2/
./autogen.sh
./configure --prefix=/usr/local/protobuf
sudo make -j12
sudo make install
sudo ldconfig
sudo vi ~/.bashrc
添加:PATH=/usr/local/protobuf/bin:$PATH
source ~/.bashrc

cd ../graphsurgeon

sudo -H pip3 install graphsurgeon-0.4.1-py2.py3-none-any.whl

驗證TensorRT

cd TensorRT-5.1.5.0/samples/sampleMNIST/

make

cd ../../bin

./sample_mnist,以下所示,則安裝成功

安裝其餘依賴:

sudo apt install \
     libssl1.0.0 \
     libgstrtspserver-1.0-0 \
     libjansson4

3)安裝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-4.0/lib
sudo cp /usr/local/lib/librdkafka* /opt/nvidia/deepstream/deepstream-4.0/lib
4)安裝DeepStream SDK

下載:https://developer.nvidia.com/deepstream-sdk

tar -xpvf deepstream_sdk_v4.0_x86_64.tbz2

cd deepstream_sdk_v4.0_x86_64

sudo tar -xvpf binaries.tbz2 -C /

sudo ./install.sh

相關文章
相關標籤/搜索