未验证 提交 6c4a741a 编写于 作者: J JingZhuangzhuang 提交者: GitHub

[Docker Images] Add cuda11.2 + cudnn8.2.1 + trt8.0.3.4 images (#35982)

上级 8db6d221
......@@ -37,4 +37,12 @@ elif [[ "$1" == "cudnn811" && "$VERSION" == "10.2" ]]; then
cp -r lib64 /usr && cd ../ && \
rm -f cudnn-10.2-linux-x64-v8.1.1.33.tgz && \
rm -rf cuda
elif [[ "$1" == "cudnn821" && "$VERSION" == "11.2" ]]; then
wget -q https://paddle-ci.gz.bcebos.com/cudnn/cudnn-11.3-linux-x64-v8.2.1.32.tgz --no-check-certificate
tar -xzf cudnn-11.3-linux-x64-v8.2.1.32.tgz && \
cd cuda && \
cp -r include /usr && \
cp -r lib64 /usr && cd ../ && \
rm -f cudnn-11.3-linux-x64-v8.2.1.32.tgz && \
rm -rf cuda
fi
......@@ -31,6 +31,11 @@ if [[ "$VERSION" == "10.1" ]];then
tar -zxf TensorRT6-cuda10.1-cudnn7.tar.gz -C /usr/local
cp -rf /usr/local/TensorRT6-cuda10.1-cudnn7/include/* /usr/include/ && cp -rf /usr/local/TensorRT6-cuda10.1-cudnn7/lib/* /usr/lib/
rm TensorRT6-cuda10.1-cudnn7.tar.gz
elif [[ "$1" == "trt8034" && "$VERSION" == "11.2" ]];then
wget -q https://paddle-ci.gz.bcebos.com/TRT/TensorRT-8.0.3.4.Linux.x86_64-gnu.cuda-11.3.cudnn8.2.tar.gz --no-check-certificate
tar -zxf TensorRT-8.0.3.4.Linux.x86_64-gnu.cuda-11.3.cudnn8.2.tar.gz -C /usr/local
cp -rf /usr/local/TensorRT-8.0.3.4/include/* /usr/include/ && cp -rf /usr/local/TensorRT-8.0.3.4/lib/* /usr/lib/
rm TensorRT-8.0.3.4.Linux.x86_64-gnu.cuda-11.3.cudnn8.2.tar.gz
elif [[ "$VERSION" == "11.2" ]];then
wget -q https://paddle-ci.gz.bcebos.com/TRT/TensorRT7-cuda11.1-cudnn8.1.tar.gz --no-check-certificate
tar -zxf TensorRT7-cuda11.1-cudnn8.1.tar.gz -C /usr/local
......
......@@ -84,6 +84,22 @@ function make_cuda112cudnn8() {
sed -i "s#RUN bash build_scripts/build.sh#RUN bash build_scripts/install_gcc.sh gcc82 \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
}
function make_cuda112cudnn821trt8034gcc82() {
sed 's/<baseimg>/11.2.2-cudnn8-devel-centos7/g' Dockerfile.centos >Dockerfile.tmp
sed -i "s#RUN bash build_scripts/build.sh#RUN bash build_scripts/install_gcc.sh gcc82 \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 yum remove -y libcudnn8-devel.x86_64 libcudnn8.x86_64 \nRun bash build_scripts/install_cudnn.sh cudnn821 \nENV CUDNN_VERSION=8.2.1 \nRUN bash build_scripts/build.sh#g" Dockerfile.tmp
sed -i "/install_trt.sh/d" Dockerfile.tmp
sed -i "s#RUN bash build_scripts/build.sh#RUN bash build_scripts/install_trt.sh trt8034 \nRUN bash build_scripts/build.sh#g" Dockerfile.tmp
sed -i '/CMD/iRUN ldconfig' Dockerfile.tmp
}
function make_cuda112cudnn821trt8034gcc54() {
sed 's/<baseimg>/11.2.2-cudnn8-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-5.4/bin/gcc /usr/bin/cc \nENV PATH=/usr/local/gcc-5.4/bin:\$PATH \nRUN yum remove -y libcudnn8-devel.x86_64 libcudnn8.x86_64 \nRun bash build_scripts/install_cudnn.sh cudnn821 \nENV CUDNN_VERSION=8.2.1 \nRUN bash build_scripts/build.sh#g" Dockerfile.tmp
sed -i "/install_trt.sh/d" Dockerfile.tmp
sed -i "s#RUN bash build_scripts/build.sh#RUN bash build_scripts/install_trt.sh trt8034 \nRUN bash build_scripts/build.sh#g" Dockerfile.tmp
sed -i '/CMD/iRUN ldconfig' Dockerfile.tmp
}
function main() {
local CMD=$1
case $CMD in
......@@ -123,6 +139,12 @@ function main() {
cuda112cudnn8)
make_cuda112cudnn8
;;
cuda112cudnn821trt8034gcc82)
make_cuda112cudnn821trt8034gcc82
;;
cuda112cudnn821trt8034gcc54)
make_cuda112cudnn821trt8034gcc54
;;
*)
echo "Make dockerfile error, Without this paramet."
exit 1
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册