Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
机器未来
Paddle
提交
02a524e5
P
Paddle
项目概览
机器未来
/
Paddle
与 Fork 源项目一致
Fork自
PaddlePaddle / Paddle
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
02a524e5
编写于
7月 12, 2021
作者:
W
Wilber
提交者:
GitHub
7月 12, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
[Docker Images] Add cuda10.2(11.1) + cudnn8.1 + trt7.2 images (#33468)
上级
394f92aa
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
88 addition
and
9 deletion
+88
-9
tools/dockerfile/Dockerfile.centos
tools/dockerfile/Dockerfile.centos
+1
-1
tools/dockerfile/build_scripts/build_utils.sh
tools/dockerfile/build_scripts/build_utils.sh
+2
-2
tools/dockerfile/build_scripts/install_cudnn.sh
tools/dockerfile/build_scripts/install_cudnn.sh
+40
-0
tools/dockerfile/build_scripts/install_gcc.sh
tools/dockerfile/build_scripts/install_gcc.sh
+2
-2
tools/dockerfile/build_scripts/install_trt.sh
tools/dockerfile/build_scripts/install_trt.sh
+9
-4
tools/dockerfile/centos7_manylinux.sh
tools/dockerfile/centos7_manylinux.sh
+34
-0
未找到文件。
tools/dockerfile/Dockerfile.centos
浏览文件 @
02a524e5
...
...
@@ -34,7 +34,7 @@ ENV PATH=/usr/local/ssl:${GOROOT}/bin:${GOPATH}/bin:${PATH}
ENV LIBRARY_PATH=/usr/local/ssl/lib:$LIBRARY_PATH
# for paddle
RUN wget --no-check-certificate -qO- https://
storage.googleapis.com/golang/go1.8.1
.linux-amd64.tar.gz | \
RUN wget --no-check-certificate -qO- https://
paddle-ci.gz.bcebos.com/go1.15.12
.linux-amd64.tar.gz | \
tar -xz -C /usr/local && \
mkdir /root/gopath && \
mkdir /root/gopath/bin && \
...
...
tools/dockerfile/build_scripts/build_utils.sh
浏览文件 @
02a524e5
...
...
@@ -151,8 +151,8 @@ function build_cpythons {
curl
-sLO
$GET_PIP_URL
build_cpython
$py_ver
done
rm
get-pip.py
rm
ez_setup.py
rm
-f
get-pip.py
rm
-f
ez_setup.py
}
...
...
tools/dockerfile/build_scripts/install_cudnn.sh
0 → 100644
浏览文件 @
02a524e5
#!/bin/bash
# Copyright (c) 2021 PaddlePaddle Authors. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# Top-level build script called from Dockerfile
# Stop at any error, show all commands
set
-ex
VERSION
=
$(
nvcc
--version
|
grep
release |
grep
-oEi
"release ([0-9]+)
\.
([0-9])"
|
sed
"s/release //"
)
if
[[
"
$1
"
==
"cudnn811"
&&
"
$VERSION
"
==
"11.1"
]]
;
then
wget
-q
https://paddle-ci.gz.bcebos.com/cudnn/cudnn-11.2-linux-x64-v8.1.1.33.tgz
--no-check-certificate
tar
-xzf
cudnn-11.2-linux-x64-v8.1.1.33.tgz
&&
\
cd
cuda
&&
\
cp
-r
include /usr
&&
\
cp
-r
lib64 /usr
&&
cd
../
&&
\
rm
-f
cudnn-11.2-linux-x64-v8.1.1.33.tgz
&&
\
rm
-rf
cuda
elif
[[
"
$1
"
==
"cudnn811"
&&
"
$VERSION
"
==
"10.2"
]]
;
then
wget
-q
https://paddle-ci.gz.bcebos.com/cudnn/cudnn-10.2-linux-x64-v8.1.1.33.tgz
--no-check-certificate
tar
-xzf
cudnn-10.2-linux-x64-v8.1.1.33.tgz
&&
\
cd
cuda
&&
\
cp
-r
include /usr
&&
\
cp
-r
lib64 /usr
&&
cd
../
&&
\
rm
-f
cudnn-10.2-linux-x64-v8.1.1.33.tgz
&&
\
rm
-rf
cuda
fi
tools/dockerfile/build_scripts/install_gcc.sh
浏览文件 @
02a524e5
...
...
@@ -44,8 +44,8 @@ if [ "$1" == "gcc82" ]; then
ln
-s
/usr/local/gcc-8.2/lib64/libstdc++.so.6
${
lib_so_6
}
&&
\
cp
/usr/local/gcc-8.2/lib64/libstdc++.so.6.0.25
${
lib_path
}
elif
[
"
$1
"
==
"gcc54"
]
;
then
wget
-q
http
://ftp.tsukuba.wide.ad.jp/software/gcc/releases/gcc-5.4.0/gcc-5.4.0.tar.bz2
tar
-x
vf
gcc-5.4.0.tar.bz2
&&
\
wget
-q
http
s://paddle-ci.gz.bcebos.com/gcc-5.4.0.tar.gz
tar
-x
zf
gcc-5.4.0.tar.gz
&&
\
cd
gcc-5.4.0
&&
\
unset
LIBRARY_PATH CPATH C_INCLUDE_PATH PKG_CONFIG_PATH CPLUS_INCLUDE_PATH INCLUDE
&&
\
./contrib/download_prerequisites
&&
\
...
...
tools/dockerfile/build_scripts/install_trt.sh
浏览文件 @
02a524e5
...
...
@@ -26,16 +26,21 @@ elif [[ "$VERSION" == "11.2" ]];then
tar
-zxf
TensorRT7-cuda11.1-cudnn8.1.tar.gz
-C
/usr/local
cp
-rf
/usr/local/TensorRT-7.2.3.4/include/
*
/usr/include/
&&
cp
-rf
/usr/local/TensorRT-7.2.3.4/lib/
*
/usr/lib/
rm
TensorRT7-cuda11.1-cudnn8.1.tar.gz
elif
[[
"
$VERSION
"
==
"11.1"
]]
;
then
wget
-q
https://paddle-ci.gz.bcebos.com/TRT/TensorRT-7.2.3.4.CentOS-7.9.x86_64-gnu.cuda-11.1.cudnn8.1.tar.gz
--no-check-certificate
tar
-zxf
TensorRT-7.2.3.4.CentOS-7.9.x86_64-gnu.cuda-11.1.cudnn8.1.tar.gz
-C
/usr/local
cp
-rf
/usr/local/TensorRT-7.2.3.4/include/
*
/usr/include/
&&
cp
-rf
/usr/local/TensorRT-7.2.3.4/lib/
*
/usr/lib/
rm
-f
TensorRT-7.2.3.4.CentOS-7.9.x86_64-gnu.cuda-11.1.cudnn8.1.tar.gz
elif
[[
"
$VERSION
"
==
"11.0"
]]
;
then
wget
-q
https://paddle-ci.cdn.bcebos.com/TRT/TensorRT-7.1.3.4.Ubuntu-16.04.x86_64-gnu.cuda-11.0.cudnn8.0.tar.gz
--no-check-certificate
tar
-zxf
TensorRT-7.1.3.4.Ubuntu-16.04.x86_64-gnu.cuda-11.0.cudnn8.0.tar.gz
-C
/usr/local
cp
-rf
/usr/local/TensorRT-7.1.3.4/include/
*
/usr/include/
&&
cp
-rf
/usr/local/TensorRT-7.1.3.4/lib/
*
/usr/lib/
rm
TensorRT-7.1.3.4.Ubuntu-16.04.x86_64-gnu.cuda-11.0.cudnn8.0.tar.gz
elif
[[
"
$VERSION
"
==
"10.2"
]]
;
then
wget https://paddle-ci.gz.bcebos.com/TRT/TensorRT
7-cuda10.2-cudnn8
.tar.gz
--no-check-certificate
tar
-zxf
TensorRT
7-cuda10.2-cudnn8
.tar.gz
-C
/usr/local
cp
-rf
/usr/local/TensorRT-7.
1.3.4/include/
*
/usr/include/
&&
cp
-rf
/usr/local/TensorRT-7.1
.3.4/lib/
*
/usr/lib/
rm
TensorRT
7-cuda10.2-cudnn8
.tar.gz
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
cp
-rf
/usr/local/TensorRT-7.
2.3.4/include/
*
/usr/include/
&&
cp
-rf
/usr/local/TensorRT-7.2
.3.4/lib/
*
/usr/lib/
rm
TensorRT
-7.2.3.4.CentOS-7.9.x86_64-gnu.cuda-10.2.cudnn8.1
.tar.gz
elif
[[
"
$VERSION
"
==
"10.0"
]]
;
then
wget
-q
https://paddle-ci.gz.bcebos.com/TRT/TensorRT6-cuda10.0-cudnn7.tar.gz
--no-check-certificate
tar
-zxf
TensorRT6-cuda10.0-cudnn7.tar.gz
-C
/usr/local
...
...
tools/dockerfile/centos7_manylinux.sh
浏览文件 @
02a524e5
...
...
@@ -47,11 +47,33 @@ function make_cuda102cudnn8() {
sed
-i
"s#RUN bash build_scripts/build.sh#RUN bash build_scripts/install_gcc.sh gcc82
\n
RUN mv /usr/bin/cc /usr/bin/cc.bak
\&\&
ln -s /usr/local/gcc-8.2/bin/gcc /usr/bin/cc
\n
ENV PATH=/usr/local/gcc-8.2/bin:
\$
PATH
\n
RUN bash build_scripts/build.sh#g"
Dockerfile.tmp
}
function
make_cuda102cudnn81gcc54
{
sed
's/<baseimg>/10.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
\n
RUN mv /usr/bin/cc /usr/bin/cc.bak
\&\&
ln -s /usr/local/gcc-5.4/bin/gcc /usr/bin/cc
\n
ENV PATH=/usr/local/gcc-5.4/bin:
\$
PATH
\n
Run yum remove -y libcudnn8-devel.x86_64 libcudnn8.x86_64
\n
Run bash build_scripts/install_cudnn.sh cudnn811
\n
ENV CUDNN_VERSION=8.1.1
\n
RUN bash build_scripts/build.sh#g"
Dockerfile.tmp
}
function
make_cuda102cudnn81gcc82
{
sed
's/<baseimg>/10.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
\n
RUN mv /usr/bin/cc /usr/bin/cc.bak
\&\&
ln -s /usr/local/gcc-8.2/bin/gcc /usr/bin/cc
\n
ENV PATH=/usr/local/gcc-8.2/bin:
\$
PATH
\n
Run yum remove -y libcudnn8-devel.x86_64 libcudnn8.x86_64
\n
Run bash build_scripts/install_cudnn.sh cudnn811
\n
ENV CUDNN_VERSION=8.1.1
\n
RUN bash build_scripts/build.sh#g"
Dockerfile.tmp
}
function
make_cuda11cudnn8
()
{
sed
's/<baseimg>/11.0-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
\n
RUN mv /usr/bin/cc /usr/bin/cc.bak
\&\&
ln -s /usr/local/gcc-8.2/bin/gcc /usr/bin/cc
\n
ENV PATH=/usr/local/gcc-8.2/bin:
\$
PATH
\n
RUN bash build_scripts/build.sh#g"
Dockerfile.tmp
}
function
make_cuda111cudnn81gcc54
()
{
sed
's/<baseimg>/11.1-cudnn8-devel-centos7/g'
Dockerfile.centos
>
Dockerfile.tmp
sed
-i
"s#RUN bash build_scripts/install_nccl2.sh#
\n
#g"
Dockerfile.tmp
sed
-i
"s#RUN bash build_scripts/build.sh#RUN bash build_scripts/install_gcc.sh gcc54
\n
RUN mv /usr/bin/cc /usr/bin/cc.bak
\&\&
ln -s /usr/local/gcc-5.4/bin/gcc /usr/bin/cc
\n
ENV PATH=/usr/local/gcc-5.4/bin:
\$
PATH
\n
Run yum remove -y libcudnn8-devel.x86_64 libcudnn8.x86_64
\n
Run bash build_scripts/install_cudnn.sh cudnn811
\n
ENV CUDNN_VERSION=8.1.1
\n
RUN bash build_scripts/build.sh#g"
Dockerfile.tmp
}
function
make_cuda111cudnn81gcc82
()
{
sed
's/<baseimg>/11.1-cudnn8-devel-centos7/g'
Dockerfile.centos
>
Dockerfile.tmp
sed
-i
"s#RUN bash build_scripts/install_nccl2.sh#
\n
#g"
Dockerfile.tmp
sed
-i
"s#RUN bash build_scripts/build.sh#RUN bash build_scripts/install_gcc.sh gcc82
\n
RUN mv /usr/bin/cc /usr/bin/cc.bak
\&\&
ln -s /usr/local/gcc-8.2/bin/gcc /usr/bin/cc
\n
ENV PATH=/usr/local/gcc-8.2/bin:
\$
PATH
\n
Run yum remove -y libcudnn8-devel.x86_64 libcudnn8.x86_64
\n
Run bash build_scripts/install_cudnn.sh cudnn811
\n
ENV CUDNN_VERSION=8.1.1
\n
RUN bash build_scripts/build.sh#g"
Dockerfile.tmp
}
function
make_cuda112cudnn8
()
{
sed
's/<baseimg>/11.2.1-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
\n
RUN mv /usr/bin/cc /usr/bin/cc.bak
\&\&
ln -s /usr/local/gcc-8.2/bin/gcc /usr/bin/cc
\n
ENV PATH=/usr/local/gcc-8.2/bin:
\$
PATH
\n
RUN bash build_scripts/build.sh#g"
Dockerfile.tmp
...
...
@@ -75,9 +97,21 @@ function main() {
cuda102cudnn8
)
make_cuda102cudnn8
;;
cuda102cudnn811gcc54
)
make_cuda102cudnn81gcc54
;;
cuda102cudnn811gcc82
)
make_cuda102cudnn81gcc82
;;
cuda11cudnn8
)
make_cuda11cudnn8
;;
cuda111cudnn81gcc54
)
make_cuda111cudnn81gcc54
;;
cuda111cudnn81gcc82
)
make_cuda111cudnn81gcc82
;;
cuda112cudnn8
)
make_cuda112cudnn8
;;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录