$ git clone -b master https://github.com/nvidia/TensorRT TensorRT_OSS
$ git describe --tags
8.2.0-EA-2-g96e2397
$ cd ..
$ mv TensorRT_OSS TensorRT_OSS-8.2.0
$ cd TensorRT_OSS-8.2.0/
$ git submodule update --init --recursive
下列三個紅底黑字需一致
$ ./docker/build.sh --file docker/ubuntu-18.04.Dockerfile --tag tensorrt-ubuntu18.04-cuda11.4 --cuda 11.4.2
Building container:
> docker build -f docker/ubuntu-18.04.Dockerfile --build-arg CUDA_VERSION=11.4.2 --build-arg uid=1000 --build-arg gid=1000 --tag=tensorrt-ubuntu18.04-cuda11.4 .
Sending build context to Docker daemon 95.59MB
Step 1/31 : ARG CUDA_VERSION=11.4.2
Step 2/31 : ARG OS_VERSION=18.04
Step 3/31 : FROM nvidia/cuda:${CUDA_VERSION}-cudnn8-devel-ubuntu${OS_VERSION}
11.4.2-cudnn8-devel-ubuntu18.04: Pulling from nvidia/cuda
11323ed2c653: Already exists
fc717811e279: Pull complete
ccdba3c8eced: Pull complete
2e5962ccde0c: Pull complete
59fd9269dfdb: Pull complete
ca8ef6b7b26f: Pull complete
075319d1b973: Pull complete
a7391b62d0c1: Pull complete
ef615d2b7b27: Pull complete
312d7b759a5a: Pull complete
Digest: sha256:3ccdc2ec6ab45d9e902ac799eb4bfba7a39e2b3057962a95dd2b717493f8e252
Status: Downloaded newer image for nvidia/cuda:11.4.2-cudnn8-devel-ubuntu18.04
---> 58c89511016d
Step 4/31 : LABEL maintainer="NVIDIA CORPORATION"
---> Running in af3ded1c4476
Removing intermediate container af3ded1c4476
---> a72393f203bc
Step 5/31 : ENV TRT_VERSION 8.2.0.6
---> Running in 948c6eba13b7
Removing intermediate container 948c6eba13b7
---> 67dbe1482cfd
$ ./docker/launch.sh --tag tensorrt-ubuntu18.04-cuda11.4 --gpus all
trtuser@ae7dd87a158f:/workspace$ cd $TRT_OSSPATH
trtuser@ae7dd87a158f:/workspace/TensorRT$ mkdir -p build && cd build
trtuser@ae7dd87a158f:/workspace/TensorRT/build$ cmake .. -DTRT_LIB_DIR=$TRT_LIBPATH -DTRT_OUT_DIR=`pwd`/out
trtuser@ae7dd87a158f:/workspace/TensorRT/build$ make -j$(nproc)
trtuser@ae7dd87a158f:/workspace/TensorRT/build$ exit
$ sudo mv /usr/lib/x86_64-linux-gnu/libnvinfer_plugin.so.8.2.3 backup/
$ sudo cp TensorRT_OSS-8.2.0/build/out/libnvinfer_plugin.so.8.2.0 /usr/lib/x86_64-linux-gnu/libnvinfer_plugin.so.8.2.3
$ sudo ldconfig
沒有留言:
張貼留言