Skip to content

Commit

Permalink
feat(trt): update tensorrt to 22.03
Browse files Browse the repository at this point in the history
  • Loading branch information
fantes authored and Bycob committed Apr 27, 2022
1 parent 6f00d3b commit c03aa9d
Show file tree
Hide file tree
Showing 10 changed files with 87 additions and 178 deletions.
9 changes: 4 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -943,18 +943,18 @@ if (USE_TENSORRT)
endif()

if (NOT EXISTS "${TRTTESTDIR}/libnvinfer.so.8")
message(FATAL_ERROR "Could not find TensorRT ${TENSORRT_LIB_DIR}/libnvinfer.so.8, please provide tensorRT location as TENSORRT_DIR or (TENSORRT_LIB_DIR _and_ TENSORRT_INC_DIR)")
message(FATAL_ERROR "Could not find TensorRT ${TRTTESTDIR}/libnvinfer.so.8, please provide tensorRT location as TENSORRT_DIR or (TENSORRT_LIB_DIR _and_ TENSORRT_INC_DIR)")
else()
message(STATUS "Found TensorRT libraries : ${TRTTESTDIR}/libnvinfer.so")
message(STATUS "Found TensorRT libraries : ${TRTTESTDIR}/libnvinfer.so.8")
endif()

set(TENSORRT_LIB_DIR ${CMAKE_BINARY_DIR}/tensorrt-oss/bin/ ${TENSORRT_LIB_DIR})
set(TENSORRT_LIBS nvinfer nvcaffeparser nvinfer_plugin nvonnxparser )

if (NOT TENSORRT_VERSION)
if (EXISTS "${TRTTESTDIR}/libnvinfer.so.8")
set(TENSORRT_VERSION 21.08)
message(STATUS "Found TensorRT libraries version 8.x")
set(TENSORRT_VERSION 22.03)
message(STATUS "Found TensorRT libraries version 8")
else()
message(FATAL_ERROR "No supported TensorRT version found")
endif()
Expand All @@ -975,7 +975,6 @@ if (USE_TENSORRT)
set(TRT_PATCHES
${TRT_PATCHES_PATH}/0001-support-for-refinedet.patch
${TRT_PATCHES_PATH}/0003-c++14.patch
${TRT_PATCHES_PATH}/0008-cuda13.patch
${TRT_PATCHES_PATH}/0009-fix_compil_order.patch
${TRT_PATCHES_PATH}/0010-fix_plugin_detect.patch
)
Expand Down
14 changes: 4 additions & 10 deletions ci/devel-trt.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# syntax = docker/dockerfile:1.0-experimental

ARG DD_UBUNTU_VERSION=20.04
ARG DD_CUDA_VERSION=11.3
ARG DD_CUDA_VERSION=11.4
ARG DD_CUDNN_VERSION=8
ARG DD_TENSORRT_VERSION=8.0.1-1+cuda11.3
ARG DD_TENSORRT_VERSION=8.2.3-1+cuda11.4

# FROM nvidia/cuda:${DD_CUDA_VERSION}-cudnn${DD_CUDNN_VERSION}-devel-ubuntu${DD_UBUNTU_VERSION}
# TODO(sileht): tensorrt is not yet in ubuntu20.04 nvidia machine learning repository
# https://developer.download.nvidia.com/compute/cuda/repos/ubuntu2004/x86_64/
# https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu2004/x86_64/
# We temporary use another docker image just to build tensorrt

FROM nvcr.io/nvidia/tensorrt:21.07-py3 AS build
FROM nvcr.io/nvidia/tensorrt:22.03-py3 AS build

ARG DD_UBUNTU_VERSION
ARG DD_CUDA_VERSION
Expand Down Expand Up @@ -99,13 +99,7 @@ RUN export DEBIAN_FRONTEND=noninteractive && \
bash-completion \
schedtool \
util-linux \
libgstreamer1.0-dev \
libnvparsers8=${DD_TENSORRT_VERSION} \
libnvparsers-dev=${DD_TENSORRT_VERSION} \
libnvinfer8=${DD_TENSORRT_VERSION} \
libnvinfer-dev=${DD_TENSORRT_VERSION} \
libnvinfer-plugin8=${DD_TENSORRT_VERSION} \
libnvinfer-plugin-dev=${DD_TENSORRT_VERSION}
libgstreamer1.0-dev

RUN for url in \
https://github.com/bazelbuild/bazel/releases/download/0.24.1/bazel_0.24.1-linux-x86_64.deb \
Expand Down
6 changes: 3 additions & 3 deletions docker/gpu_tensorrt.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# syntax = docker/dockerfile:1.0-experimental
FROM nvcr.io/nvidia/tensorrt:21.07-py3 AS build
FROM nvcr.io/nvidia/tensorrt:22.03-py3 AS build

ARG DEEPDETECT_RELEASE=OFF
ARG DEEPDETECT_ARCH=gpu
Expand Down Expand Up @@ -133,7 +133,7 @@ RUN cd /opt/deepdetect/opencv/opencv-4.5.3 && mkdir build && cd build && cmake -
-D BUILD_opencv_cudacodec=ON \
-D WITH_CUDNN=ON \
-D OPENCV_DNN_CUDA=OFF \
-D CUDA_ARCH_BIN=6.1 \
-D CUDA_ARCH_BIN="6.1 7.5 8.6" \
-D WITH_V4L=ON \
-D WITH_QT=OFF \
-D WITH_OPENGL=ON \
Expand Down Expand Up @@ -162,7 +162,7 @@ RUN --mount=type=cache,target=/ccache/ mkdir build && cd build && ../build.sh
RUN ./docker/get_libs.sh

# Build final Docker image
FROM nvcr.io/nvidia/tensorrt:21.07-py3 AS runtime
FROM nvcr.io/nvidia/tensorrt:22.03-py3 AS runtime

ARG DEEPDETECT_ARCH=gpu

Expand Down
Loading

0 comments on commit c03aa9d

Please sign in to comment.