Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
Paddle
提交
c7ba811d
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看板
未验证
提交
c7ba811d
编写于
6月 15, 2023
作者:
Z
zqw_1997
提交者:
GitHub
6月 15, 2023
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refresh (#50791)
上级
38ff4fee
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
30 addition
and
8 deletion
+30
-8
paddle/scripts/paddle_build.sh
paddle/scripts/paddle_build.sh
+15
-0
tools/dockerfile/Dockerfile.centos
tools/dockerfile/Dockerfile.centos
+5
-2
tools/dockerfile/build_scripts/build.sh
tools/dockerfile/build_scripts/build.sh
+6
-5
tools/dockerfile/build_scripts/build_utils.sh
tools/dockerfile/build_scripts/build_utils.sh
+4
-1
未找到文件。
paddle/scripts/paddle_build.sh
浏览文件 @
c7ba811d
...
...
@@ -158,6 +158,13 @@ function cmake_base() {
-DPYTHON_INCLUDE_DIR:PATH=/opt/_internal/cpython-3.10.0/include/python3.10
-DPYTHON_LIBRARIES:FILEPATH=/opt/_internal/cpython-3.10.0/lib/libpython3.so"
pip3.10
install
-r
${
PADDLE_ROOT
}
/python/requirements.txt
elif
[
"
$1
"
==
"cp311-cp311"
]
;
then
export
LD_LIBRARY_PATH
=
/opt/_internal/cpython-3.11.0/lib/:
${
LD_LIBRARY_PATH
}
export
PATH
=
/opt/_internal/cpython-3.11.0/bin/:
${
PATH
}
export
PYTHON_FLAGS
=
"-DPYTHON_EXECUTABLE:FILEPATH=/opt/_internal/cpython-3.11.0/bin/python3.11
-DPYTHON_INCLUDE_DIR:PATH=/opt/_internal/cpython-3.11.0/include/python3.11
-DPYTHON_LIBRARIES:FILEPATH=/opt/_internal/cpython-3.11.0/lib/libpython3.so"
pip3.11
install
-r
${
PADDLE_ROOT
}
/python/requirements.txt
elif
[
"
$1
"
==
"conda-python3.7"
]
;
then
export
LD_LIBRARY_PATH
=
/opt/conda/lib/:
${
LD_LIBRARY_PATH
}
export
PATH
=
/opt/conda/bin/:
${
PATH
}
...
...
@@ -3404,6 +3411,14 @@ function run_setup(){
export
PYTHON_INCLUDE_DIR
=
/opt/_internal/cpython-3.10.0/include/python3.10
export
PYTHON_LIBRARIES
=
/opt/_internal/cpython-3.10.0/lib/libpython3.so
pip3.10
install
-r
${
PADDLE_ROOT
}
/python/requirements.txt
elif
[
"
$1
"
==
"cp311-cp311"
]
;
then
export
LD_LIBRARY_PATH
=
/opt/_internal/cpython-3.11.0/lib/:
${
LD_LIBRARY_PATH
}
export
PATH
=
/opt/_internal/cpython-3.11.0/bin/:
${
PATH
}
#after changing "PYTHON_LIBRARY:FILEPATH" to "PYTHON_LIBRARY" ,we can use export
export
PYTHON_EXECUTABLE
=
/opt/_internal/cpython-3.11.0/bin/python3.11
export
PYTHON_INCLUDE_DIR
=
/opt/_internal/cpython-3.11.0/include/python3.11
export
PYTHON_LIBRARIES
=
/opt/_internal/cpython-3.11.0/lib/libpython3.so
pip3.11
install
-r
${
PADDLE_ROOT
}
/python/requirements.txt
elif
[
"
$1
"
==
"conda-python3.7"
]
;
then
export
LD_LIBRARY_PATH
=
/opt/conda/lib/:
${
LD_LIBRARY_PATH
}
export
PATH
=
/opt/conda/bin/:
${
PATH
}
...
...
tools/dockerfile/Dockerfile.centos
浏览文件 @
c7ba811d
...
...
@@ -52,17 +52,20 @@ RUN wget https://raw.githubusercontent.com/PaddlePaddle/Paddle/develop/python/re
RUN LD_LIBRARY_PATH=/opt/_internal/cpython-3.8.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.8.0/bin/pip3 install setuptools -U && \
LD_LIBRARY_PATH=/opt/_internal/cpython-3.9.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.9.0/bin/pip3 install setuptools -U && \
LD_LIBRARY_PATH=/opt/_internal/cpython-3.10.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.10.0/bin/pip3 install setuptools -U
LD_LIBRARY_PATH=/opt/_internal/cpython-3.10.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.10.0/bin/pip3 install setuptools -U && \
LD_LIBRARY_PATH=/opt/_internal/cpython-3.11.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.11.0/bin/pip3 install setuptools -U
RUN LD_LIBRARY_PATH=/opt/_internal/cpython-3.8.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.8.0/bin/pip3 install -r /root/requirements.txt && \
LD_LIBRARY_PATH=/opt/_internal/cpython-3.9.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.9.0/bin/pip3 install -r /root/requirements.txt && \
LD_LIBRARY_PATH=/opt/_internal/cpython-3.10.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.10.0/bin/pip3 install -r /root/requirements.txt && \
LD_LIBRARY_PATH=/opt/_internal/cpython-3.11.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.11.0/bin/pip3 install -r /root/requirements.txt && \
go get github.com/Masterminds/glide && \
rm -rf /root/requirements.txt
RUN LD_LIBRARY_PATH=/opt/_internal/cpython-3.8.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.8.0/bin/pip3 install pre-commit 'ipython==5.3.0' && \
LD_LIBRARY_PATH=/opt/_internal/cpython-3.9.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.9.0/bin/pip3 install pre-commit 'ipython==5.3.0' && \
LD_LIBRARY_PATH=/opt/_internal/cpython-3.10.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.10.0/bin/pip3 install pre-commit 'ipython==5.3.0'
LD_LIBRARY_PATH=/opt/_internal/cpython-3.10.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.10.0/bin/pip3 install pre-commit 'ipython==5.3.0' && \
LD_LIBRARY_PATH=/opt/_internal/cpython-3.11.0/lib/:${LD_LIBRARY_PATH} /opt/_internal/cpython-3.11.0/bin/pip3 install pre-commit 'ipython==5.3.0'
RUN wget -O /opt/swig-2.0.12.tar.gz --no-check-certificate https://sourceforge.net/projects/swig/files/swig/swig-2.0.12/swig-2.0.12.tar.gz/download && \
cd /opt && tar xzf swig-2.0.12.tar.gz && cd /opt/swig-2.0.12 && ./configure && make && make install && cd /opt && rm swig-2.0.12.tar.gz
...
...
tools/dockerfile/build_scripts/build.sh
浏览文件 @
c7ba811d
...
...
@@ -24,12 +24,12 @@ set -ex
# remove others to expedite build and reduce docker image size. The original
# manylinux docker image project builds many python versions.
# NOTE We added back 3.5.1, since auditwheel requires python 3.3+
CPYTHON_VERSIONS
=
"3.10.0 3.9.0 3.8.0"
CPYTHON_VERSIONS
=
"3.1
1.0 3.1
0.0 3.9.0 3.8.0"
# openssl version to build, with expected sha256 hash of .tar.gz
# archive
OPENSSL_ROOT
=
openssl-1.
0.2g
OPENSSL_HASH
=
b784b1b3907ce39abf4098702dade6365522a253ad1552e267a9a0e89594aa33
OPENSSL_ROOT
=
openssl-1.
1.1
OPENSSL_HASH
=
2836875a0f89c03d0fdf483941512613a50cfb421d6fd94b9f41d7279d586a3d
PATCHELF_HASH
=
f2aa40a6148cb3b0ca807a1bf836b081793e55ec9e5540a5356d800132be7e0a
AUTOCONF_ROOT
=
autoconf-2.69
AUTOCONF_HASH
=
954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd4c2969
...
...
@@ -81,11 +81,12 @@ build_cpythons $CPYTHON_VERSIONS
PY38_BIN
=
/opt/python/cp38-cp38/bin
PY39_BIN
=
/opt/python/cp39-cp39/bin
PY310_BIN
=
/opt/python/cp310-cp310/bin
PY311_BIN
=
/opt/python/cp311-cp311/bin
# NOTE Since our custom manylinux image builds pythons with shared
# libpython, we need to add libpython's dir to LD_LIBRARY_PATH before running
# python.
ORIGINAL_LD_LIBRARY_PATH
=
"
${
LD_LIBRARY_PATH
}
"
LD_LIBRARY_PATH
=
"
${
ORIGINAL_LD_LIBRARY_PATH
}
:
$(
dirname
${
PY38_BIN
}
)
/lib:
$(
dirname
${
PY39_BIN
}
)
/lib:
$(
dirname
${
PY310_BIN
}
)
/lib"
LD_LIBRARY_PATH
=
"
${
ORIGINAL_LD_LIBRARY_PATH
}
:
$(
dirname
${
PY38_BIN
}
)
/lib:
$(
dirname
${
PY39_BIN
}
)
/lib:
$(
dirname
${
PY310_BIN
}
)
/lib
:
$(
dirname
${
PY311_BIN
}
)
/lib
"
# Our openssl doesn't know how to find the system CA trust store
# (https://github.com/pypa/manylinux/issues/53)
...
...
@@ -137,7 +138,7 @@ for PYTHON in /opt/python/*/bin/python; do
# Add matching directory of libpython shared library to library lookup path
LD_LIBRARY_PATH
=
"
${
ORIGINAL_LD_LIBRARY_PATH
}
:
$(
dirname
$(
dirname
${
PYTHON
}
))
/lib"
if
[
"
$(
dirname
$(
dirname
${
PYTHON
}
))
"
!=
"/opt/python/cp310-cp310"
]
;
then
if
[
"
$(
dirname
$(
dirname
${
PYTHON
}
))
"
!=
"/opt/python/cp310-cp310"
-a
"
$(
dirname
$(
dirname
${
PYTHON
}
))
"
!=
"/opt/python/cp311-cp311"
]
;
then
# Smoke test to make sure that our Pythons work, and do indeed detect as
# being manylinux compatible:
LD_LIBRARY_PATH
=
"
${
ORIGINAL_LD_LIBRARY_PATH
}
:
$(
dirname
$(
dirname
${
PYTHON
}
))
/lib"
$PYTHON
$MY_DIR
/manylinux1-check.py
...
...
tools/dockerfile/build_scripts/build_utils.sh
浏览文件 @
c7ba811d
...
...
@@ -95,8 +95,11 @@ function do_cpython_build {
if
[
-e
${
prefix
}
/bin/python3.10
]
;
then
ln
-s
python3.10
${
prefix
}
/bin/python
fi
if
[
-e
${
prefix
}
/bin/python3.11
]
;
then
ln
-s
python3.11
${
prefix
}
/bin/python
fi
# NOTE Make libpython shared library visible to python calls below
if
[
-e
${
prefix
}
/bin/python3.10
]
;
then
if
[
-e
${
prefix
}
/bin/python3.10
]
||
[
-e
${
prefix
}
/bin/python3.11
]
;
then
LD_LIBRARY_PATH
=
"/usr/local/ssl/lib:
${
prefix
}
/lib"
${
prefix
}
/bin/python
-m
pip config
set
global.trusted-host mirrors.aliyun.com
LD_LIBRARY_PATH
=
"/usr/local/ssl/lib:
${
prefix
}
/lib"
${
prefix
}
/bin/python
-m
pip config
set
global.index-url http://mirrors.aliyun.com/pypi/simple/
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录