From 75e9a6d13e826a824653a378cc7fb67ef259de2e Mon Sep 17 00:00:00 2001 From: Wilber Date: Tue, 27 Jul 2021 12:29:26 +0800 Subject: [PATCH] update compile images for trt6.0.1.8 (#34341) --- tools/dockerfile/build_scripts/install_trt.sh | 3 +++ tools/dockerfile/centos7_manylinux.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/dockerfile/build_scripts/install_trt.sh b/tools/dockerfile/build_scripts/install_trt.sh index a461e2a4f24..b52307c1d0d 100644 --- a/tools/dockerfile/build_scripts/install_trt.sh +++ b/tools/dockerfile/build_scripts/install_trt.sh @@ -51,6 +51,9 @@ elif [[ "$VERSION" == "10.2" && "$CUDNN_VERSION" == "7.6.5" ]];then tar -zxf TensorRT-6.0.1.8.CentOS-7.6.x86_64-gnu.cuda-10.2.cudnn7.6.tar.gz -C /usr/local cp -rf /usr/local/TensorRT-6.0.1.8/include/* /usr/include/ && cp -rf /usr/local/TensorRT-6.0.1.8/lib/* /usr/lib/ rm -f TensorRT-6.0.1.8.CentOS-7.6.x86_64-gnu.cuda-10.2.cudnn7.6.tar.gz + # trt6.0.1.8 should hack some code. + sed -i "s/virtual int getConstantValue() const = 0;/&\nprotected:\nvirtual ~IDimensionExpr() {};/g" /usr/local/TensorRT-6.0.1.8/include/NvInferRuntime.h + sed -i "s/virtual IPlugin\* createPlugin(const char\* layerName, const void\* serialData, size_t serialLength) TRTNOEXCEPT = 0;/&\nprotected:\nvirtual ~IPluginFactory() {}/g" /usr/local/TensorRT-6.0.1.8/include/NvInferRuntime.h elif [[ "$VERSION" == "10.2" && "$CUDNN_VERSION" == "8.1.1" ]];then wget https://paddle-ci.gz.bcebos.com/TRT/TensorRT-7.2.3.4.CentOS-7.9.x86_64-gnu.cuda-10.2.cudnn8.1.tar.gz --no-check-certificate tar -zxf TensorRT-7.2.3.4.CentOS-7.9.x86_64-gnu.cuda-10.2.cudnn8.1.tar.gz -C /usr/local diff --git a/tools/dockerfile/centos7_manylinux.sh b/tools/dockerfile/centos7_manylinux.sh index d268341db9a..2435c57d541 100755 --- a/tools/dockerfile/centos7_manylinux.sh +++ b/tools/dockerfile/centos7_manylinux.sh @@ -44,7 +44,7 @@ function make_cuda102cudnn7() { function make_cuda102cudnn7gcc54() { sed 's//10.2-cudnn7-devel-centos7/g' Dockerfile.centos >Dockerfile.tmp - sed -i "s#RUN bash build_scripts/build.sh#RUN bash build_scripts/install_gcc.sh gcc54 \nRUN mv /usr/bin/cc /usr/bin/cc.bak \&\& ln -s /usr/local/gcc-8.2/bin/gcc /usr/bin/cc \nENV PATH=/usr/local/gcc-8.2/bin:\$PATH \nRUN bash build_scripts/build.sh#g" Dockerfile.tmp + sed -i "s#RUN bash build_scripts/build.sh#RUN bash build_scripts/install_gcc.sh gcc54 \nRUN mv /usr/bin/cc /usr/bin/cc.bak \&\& ln -s /usr/local/gcc-5.4/bin/gcc /usr/bin/cc \nENV PATH=/usr/local/gcc-5.4/bin:\$PATH \nRUN bash build_scripts/build.sh#g" Dockerfile.tmp } function make_cuda102cudnn8() { -- GitLab