windows编译tensorflow tensorflow单机多卡程序的框架 tensorflow的操作 tensorflow的变量初始化和scope 人体姿态检测 segmentation标注工具 tensorflow模型恢复与inference的模型简化 利用多线程读取数据加快网络训练 tensorflow使用LSTM pytorch examples 利用tensorboard调参 深度学习中的loss函数汇总 纯C++代码实现的faster rcnn tensorflow使用记录 windows下配置caffe_ssd use ubuntu caffe as libs use windows caffe like opencv windows caffe implement caffe model convert to keras model flappyBird DQN Joint Face Detection and Alignment using Multi-task Cascaded Convolutional Neural Networks Fast-style-transfer tensorflow安装 tensorflow DQN Fully Convolutional Models for Semantic Segmentation Transposed Convolution, Fractionally Strided Convolution or Deconvolution 基于tensorflow的分布式部署 用python实现mlp bp算法 用tensorflow和tflearn搭建经典网络结构 Data Augmentation Tensorflow examples Training Faster RCNN with Online Hard Example Mining 使用Tensorflow做Prisma图像风格迁移 RNN(循环神经网络)推导 深度学习中的稀疏编码思想 利用caffe与lmdb读写图像数据 分析voc2007检测数据 用python写caffe网络配置 ssd开发 将KITTI的数据格式转换为VOC Pascal的xml格式 Faster RCNN 源码分析 在Caffe中建立Python layer 在Caffe中建立C++ layer 为什么CNN反向传播计算梯度时需要将权重旋转180度 Caffe使用教程(下) Caffe使用教程(上) CNN反向传播 Softmax回归 Caffe Ubuntu下环境配置

tensorrt docker制作

2021年05月26日

从docker hub下载基础镜像

docker login输入账号密码

docker search cuda10.2

docker pull wildbrother/cuda10.2-cudnn8-runtime-ubuntu18.04

systemctl status nvidia-docker

systemctl start nvidia-docker

nvidia-docker run -t -i -d IMAGE ID /bin/bash

nvidia-docker run -t -i -d --shm-size=512g -v /dfsdata2/jinyi_data:/jinyi_data torch1.5.1-cuda10.1-cudnn7-devel:ddp /bin/bash

#or

sudo docker run --runtime=nvidia -it --shm-size=1g --ulimit memlock=-1 --ulimit stack=67108864 -e NVIDIA_VISIBLE_DEVICES=0 -w /  IMAGE ID

docker exec -it CONTAINER ID /bin/bash

安装opencv编译依赖

#cmake-3.19.2安装

apt-get autoremove cmake

apt install build-essential

apt-get install libssl-dev

下载解压cmake-3.19.2.tar.gz

./bootstrap

make 

make install

#protobuf安装

apt-get install autoconf autogen

wget http://ftp.gnu.org/gnu/automake/automake-1.16.tar.gz
tar xvfz automake-1.16.tar.gz
cd automake-1.16
./configure --prefix=/usr/local/automake/1_16
make
make install

apt-get install aptitude  
aptitude install libtool

下载解压protobuf-all-3.6.1.tar.gz

./autogen.sh

./configure

make 

make install

opencv编译安装

cd build
cmake -D CMAKE_BUILD_TYPE=RELEAS -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_CUDA=ON -D BUILD_opencv_cudacodec=OFF -D BUILD_opencv_xfeatures2d=OFF -D OPENCV_PC_FILE_NAME=opencv.pc -D OPENCV_GENERATE_PKGCONFIG=YES -D WITH_V4L=ON -D WITH_GSTREAMER=ON -D OPENCV_EXTRA_MODULES_PATH=/root/opencv_contrib-4.2.0/modules -D PYTHON_EXECUTABLE=$(which python3) -D WITH_CUDNN=ON -D OPENCV_DNN_CUDA=ON -D CUDA_ARCH_BIN=7.5 ..

make
make install

apt-get install -y pkg-config

查看cudnn版本

cat /usr/local/cuda/include/cudnn.h | grep CUDNN_MAJOR -A 2

安装nvdecode环境

git clone https://git.videolan.org/git/ffmpeg/nv-codec-headers.git
cd nv-codec-headers && sudo make install

git clone https://git.ffmpeg.org/ffmpeg.git ffmpeg/
apt-get -y install build-essential pkg-config checkinstall git libfaac-dev libgpac-dev ladspa-sdk-dev libunistring-dev libbz2-dev \
  libjack-jackd2-dev libmp3lame-dev libsdl2-dev libopencore-amrnb-dev libopencore-amrwb-dev libvpx-dev libx264-dev libx265-dev libxvidcore-dev libopenal-dev libopus-dev \
  libsdl1.2-dev libtheora-dev libva-dev libvdpau-dev libvorbis-dev libx11-dev \
  libxfixes-dev texi2html yasm zlib1g-dev
  
./configure --enable-nonfree --enable-gpl --enable-version3 --enable-libmp3lame --enable-libvpx --enable-libopus --enable-opencl --enable-libxcb --enable-opengl --enable-nvenc --enable-vaapi --enable-vdpau --enable-ffplay --enable-ffprobe --enable-libxvid --enable-libx264 --enable-libx265 --enable-openal --enable-openssl --enable-cuda-nvcc --enable-cuvid --extra-cflags=-I/usr/local/cuda/include --extra-ldflags=-L/usr/local/cuda/lib64
make install

blog comments powered by Disqus