Ubuntu 18.04上DeepStream安装
DeepStream主页:https://developer.nvidia.com/deepstream-sdk
DeepStream Development Guide:https://docs.nvidia.com/metropolis/deepstream/4.0/dev-guide/
DeepStream SDK API:https://docs.nvidia.com/metropolis/deepstream/4.0/dev-guide/DeepStream_Development_Guide/baggage/index.html
环境搭建:
1)要求
2)执行nvidia-smi查询Nvidia驱动版本
Driver Version: 418.87.00
执行cat /usr/local/cuda/version.txt查询CUDA版本
CUDA Version 10.1.243
执行cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2查询cudnn版本
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
.
/autogen
.sh
./configure --prefix=/usr/local/protobuf
sudo make -j12
sudo make install
sudo ldconfig
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