未验证 提交 0cceede5 编写于 作者: Q Qiyang Min 提交者: GitHub

Merge pull request #14332 from velconia/add_py3_to_gen_dockerfile

Change production mode Dockerfile to support python3
......@@ -614,7 +614,24 @@ EOF
CMD='"true"'
fi
cat >> ${PADDLE_ROOT}/build/Dockerfile <<EOF
if [ "$1" == "cp35-cp35m" ]; then
cat >> ${PADDLE_ROOT}/build/Dockerfile <<EOF
ADD python/dist/*.whl /
# run paddle version to install python packages first
RUN apt-get update && ${NCCL_DEPS}
RUN apt-get install -y wget python3 python3-pip libgtk2.0-dev dmidecode python3-tk && \
pip3 install opencv-python && pip3 install /*.whl; apt-get install -f -y && \
apt-get clean -y && \
rm -f /*.whl && \
${PADDLE_VERSION} && \
ldconfig
${DOCKERFILE_CUDNN_DSO}
${DOCKERFILE_CUBLAS_DSO}
${DOCKERFILE_GPU_ENV}
ENV NCCL_LAUNCH_MODE PARALLEL
EOF
else
cat >> ${PADDLE_ROOT}/build/Dockerfile <<EOF
ADD python/dist/*.whl /
# run paddle version to install python packages first
RUN apt-get update && ${NCCL_DEPS}
......@@ -629,6 +646,8 @@ EOF
${DOCKERFILE_GPU_ENV}
ENV NCCL_LAUNCH_MODE PARALLEL
EOF
fi
if [[ ${WITH_GOLANG:-OFF} == "ON" ]]; then
cat >> ${PADDLE_ROOT}/build/Dockerfile <<EOF
ADD go/cmd/pserver/pserver /usr/bin/
......@@ -703,7 +722,7 @@ function main() {
build)
cmake_gen ${PYTHON_ABI:-""}
build
gen_dockerfile
gen_dockerfile ${PYTHON_ABI:-""}
;;
build_android)
build_android
......@@ -730,7 +749,7 @@ function main() {
gen_html
;;
dockerfile)
gen_dockerfile
gen_dockerfile ${PYTHON_ABI:-""}
;;
capi)
cmake_gen ${PYTHON_ABI:-""}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册