Skip to content

Commit 69e6a0f

Browse files
author
yi.wu
committed
fix docker image pythonhome
1 parent caffcc8 commit 69e6a0f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

paddle/scripts/docker/build.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ if [ ${WITH_GPU} == "ON" ]; then
99
GPU_DOCKER_PKG="python-pip python-dev"
1010
else
1111
BASE_IMAGE="python:2.7.13-slim"
12+
# FIXME: python base image uses different python version than WITH_GPU
13+
# need to change PYTHONHOME to /usr/local when using python base image
14+
CPU_DOCKER_PYTHON_HOME_ENV="ENV PYTHONHOME /usr/local"
1215
fi
1316

1417
DOCKERFILE_GPU_ENV=""
@@ -97,7 +100,8 @@ ADD build/*.deb /usr/local/opt/paddle/deb/
97100
RUN dpkg -i /usr/local/opt/paddle/deb/*.deb && \
98101
rm -f /usr/local/opt/paddle/deb/*.deb && \
99102
paddle version
100-
${DOCKERFILE_CUDNN_DSO}
103+
${CPU_DOCKER_PYTHON_HOME_ENV}
104+
${DOCKERFILE_CUDNN_DSO}
101105
${DOCKERFILE_GPU_ENV}
102106
# default command shows the paddle version and exit
103107
CMD ["paddle", "version"]

0 commit comments

Comments
 (0)