Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
f9445d89
P
Paddle
项目概览
PaddlePaddle
/
Paddle
大约 1 年 前同步成功
通知
2298
Star
20931
Fork
5422
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1423
列表
看板
标记
里程碑
合并请求
543
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
Paddle
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1,423
Issue
1,423
列表
看板
标记
里程碑
合并请求
543
合并请求
543
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
f9445d89
编写于
8月 21, 2023
作者:
T
tianshuo78520a
提交者:
GitHub
8月 21, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update ubuntu18 dockerfile (#56433)
* Update ubuntu18 dockerfile * Fix dockerfile
上级
1da20aa8
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
13 addition
and
36 deletion
+13
-36
tools/dockerfile/Dockerfile.ubuntu20
tools/dockerfile/Dockerfile.ubuntu20
+1
-0
tools/dockerfile/ci_dockerfile.sh
tools/dockerfile/ci_dockerfile.sh
+12
-36
未找到文件。
tools/dockerfile/Dockerfile.ubuntu20
浏览文件 @
f9445d89
...
...
@@ -146,6 +146,7 @@ RUN pip3.7 --no-cache-dir install pre-commit==2.17.0 pylint==2.12.0 && \
COPY ./python/requirements.txt /root/
COPY ./python/unittest_py/requirements.txt /home/
RUN pip3.7 --no-cache-dir install -r /root/requirements.txt && \
pip3.7 --no-cache-dir install -r /home/requirements.txt && \
pip3.8 --no-cache-dir install -r /root/requirements.txt && \
...
...
tools/dockerfile/ci_dockerfile.sh
浏览文件 @
f9445d89
...
...
@@ -50,7 +50,7 @@ function make_ubuntu_trt7_dockerfile(){
RUN apt remove -y libnccl* --allow-change-held-packages
\&\&
apt-get install -y --allow-unauthenticated libsndfile1 libnccl2=2.8.4-1+cuda10.2 libnccl-dev=2.8.4-1+cuda10.2 zstd pigz --allow-change-held-packages #g"
${
dockerfile_name
}
}
function
make_c
entos
_dockerfile
(){
function
make_c
pu
_dockerfile
(){
dockerfile_name
=
"Dockerfile.cuda9_cudnn7_gcc48_py35_centos6"
sed
"s#<baseimg>#ubuntu:20.04#g"
./Dockerfile.ubuntu20
>
${
dockerfile_name
}
sed
-i
"s#<setcuda>##g"
${
dockerfile_name
}
...
...
@@ -73,26 +73,6 @@ function make_centos_dockerfile(){
}
function
make_cinn_dockerfile
(){
dockerfile_name
=
"Dockerfile.cuda11_cudnn8_gcc82_ubuntu18_cinn"
sed
"s#<baseimg>#nvidia/cuda:11.2.0-cudnn8-devel-ubuntu18.04#g"
./Dockerfile.ubuntu18
>
${
dockerfile_name
}
sed
-i
"s#<setcuda>#ENV LD_LIBRARY_PATH=/usr/local/cuda-11.2/targets/x86_64-linux/lib:
\$
LD_LIBRARY_PATH #g"
${
dockerfile_name
}
sed
-i
's#<install_cpu_package>##g'
${
dockerfile_name
}
sed
-i
"7i ENV TZ=Asia/Beijing"
${
dockerfile_name
}
sed
-i
"8i RUN ln -snf /usr/share/zoneinfo/
$TZ
/etc/localtime && echo
$TZ
> /etc/timezone"
${
dockerfile_name
}
sed
-i
"27i RUN apt-get update && apt-get install -y liblzma-dev openmpi-bin openmpi-doc libopenmpi-dev libsndfile1"
${
dockerfile_name
}
dockerfile_line
=
$(
wc
-l
${
dockerfile_name
}
|awk
'{print $1}'
)
sed
-i
"
${
dockerfile_line
}
i RUN wget --no-check-certificate -q https://paddle-edl.bj.bcebos.com/hadoop-2.7.7.tar.gz
\&\&
\
tar -xzf hadoop-2.7.7.tar.gz && mv hadoop-2.7.7 /usr/local/"
${
dockerfile_name
}
sed
-i
"
${
dockerfile_line
}
i RUN apt remove git -y
\&\&
apt install -y libcurl4-openssl-dev gettext pigz zstd ninja-build
\&\&
wget -q https://paddle-ci.gz.bcebos.com/git-2.17.1.tar.gz
\&\&
\
tar -xvf git-2.17.1.tar.gz
\&\&
\
cd git-2.17.1
\&\&
\
./configure --with-openssl --with-curl --prefix=/usr/local
\&\&
\
make -j8
\&\&
make install "
${
dockerfile_name
}
sed
-i
"
${
dockerfile_line
}
i RUN pip install wheel
\&\&
pip3 install PyGithub wheel distro
\&\&
pip3.7 install PyGithub
\&\&
pip3.8 install distro"
${
dockerfile_name
}
}
function
make_ce_framework_dockcerfile
(){
dockerfile_name
=
"Dockerfile.cuda11.2_cudnn8_gcc82_trt8"
sed
"s#<baseimg>#nvidia/cuda:11.8.0-cudnn8-devel-ubuntu20.04#g"
./Dockerfile.ubuntu20
>
${
dockerfile_name
}
...
...
@@ -111,7 +91,8 @@ function make_ce_framework_dockcerfile(){
sed
-i
's#RUN bash /build_scripts/install_trt.sh#RUN bash /build_scripts/install_trt.sh trt8531#g'
${
dockerfile_name
}
}
function
make_unbuntu18_cu117_dockerfile
(){
function
make_unbuntu20_cu12_dockerfile
(){
dockerfile_name
=
"Dockerfile.cuda117_cudnn8_gcc82_ubuntu18_coverage"
sed
"s#<baseimg>#nvidia/cuda:12.0.1-cudnn8-devel-ubuntu20.04#g"
./Dockerfile.ubuntu20
>
${
dockerfile_name
}
sed
-i
"s#<setcuda>#ENV LD_LIBRARY_PATH=/usr/local/cuda-12.0/targets/x86_64-linux/lib:
\$
LD_LIBRARY_PATH #g"
${
dockerfile_name
}
...
...
@@ -132,11 +113,11 @@ function make_unbuntu18_cu117_dockerfile(){
sed
-i
's#Run bash /build_scripts/install_cudnn.sh cudnn841#RUN bash /build_scripts/install_cudnn.sh cudnn891#g'
${
dockerfile_name
}
}
function
make_ubuntu18_cu112_dockerfile
(){
function
make_ubuntu20_cu112_dockerfile
(){
dockerfile_name
=
"Dockerfile.cuda11.2_cudnn8.1_trt8.4_gcc8.2_ubuntu18"
sed
"s#<baseimg>#nvidia/cuda:11.2.
0-cudnn8-devel-ubuntu18.04#g"
./Dockerfile.ubuntu18
>
${
dockerfile_name
}
sed
"s#<baseimg>#nvidia/cuda:11.2.
2-cudnn8-devel-ubuntu20.04#g"
./Dockerfile.ubuntu20
>
${
dockerfile_name
}
sed
-i
"s#<setcuda>#ENV LD_LIBRARY_PATH=/usr/local/cuda-11.2/targets/x86_64-linux/lib:
\$
LD_LIBRARY_PATH #g"
${
dockerfile_name
}
sed
-i
"s#liblzma-dev#liblzma-dev openmpi-bin openmpi-doc libopenmpi-dev#g"
${
dockerfile_name
}
dockerfile_line
=
$(
wc
-l
${
dockerfile_name
}
|awk
'{print $1}'
)
sed
-i
's#RUN bash /build_scripts/install_trt.sh#RUN bash /build_scripts/install_trt.sh trt8431#g'
${
dockerfile_name
}
sed
-i
"
${
dockerfile_line
}
i RUN wget --no-check-certificate -q https://paddle-edl.bj.bcebos.com/hadoop-2.7.7.tar.gz
\&\&
\
...
...
@@ -149,23 +130,18 @@ function make_ubuntu18_cu112_dockerfile(){
sed
-i
"
${
dockerfile_line
}
i RUN pip install wheel
\&\&
pip3 install PyGithub wheel
\&\&
pip3.7 install PyGithub distro
\&\&
pip3.8 install PyGithub distro"
${
dockerfile_name
}
sed
-i
's#<install_cpu_package>##g'
${
dockerfile_name
}
sed
-i
"s#<install_gcc>#WORKDIR /usr/bin
\\
COPY tools/dockerfile/build_scripts /build_scripts
\\
RUN bash /build_scripts/install_gcc.sh gcc82
\&\&
rm -rf /build_scripts
\\
RUN cp gcc gcc.bak
\&\&
cp g++ g++.bak
\&\&
rm gcc
\&\&
rm g++
\\
RUN ln -s /usr/local/gcc-8.2/bin/gcc /usr/local/bin/gcc
\\
RUN ln -s /usr/local/gcc-8.2/bin/g++ /usr/local/bin/g++
\\
RUN ln -s /usr/local/gcc-8.2/bin/gcc /usr/bin/gcc
\\
RUN ln -s /usr/local/gcc-8.2/bin/g++ /usr/bin/g++
\\
ENV PATH=/usr/local/gcc-8.2/bin:
\$
PATH #g"
${
dockerfile_name
}
sed
-i
"s#gcc121#gcc82#g"
${
dockerfile_name
}
sed
-i
"s#gcc-12.1#gcc-8.2#g"
${
dockerfile_name
}
sed
-i
's#RUN bash /build_scripts/install_trt.sh#RUN bash /build_scripts/install_trt.sh trt8531#g'
${
dockerfile_name
}
}
function
main
()
{
make_ubuntu_trt7_dockerfile
make_centos_dockerfile
make_cinn_dockerfile
make_cpu_dockerfile
make_ce_framework_dockcerfile
make_unbuntu
18_cu117
_dockerfile
make_ubuntu
18
_cu112_dockerfile
make_unbuntu
20_cu12
_dockerfile
make_ubuntu
20
_cu112_dockerfile
}
main
"
$@
"
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录