From 69e6a0f5ec4dc8d3235ebddb1f85d2bd8d88c9b2 Mon Sep 17 00:00:00 2001 From: "yi.wu" Date: Wed, 12 Apr 2017 10:05:46 +0800 Subject: [PATCH] fix docker image pythonhome --- paddle/scripts/docker/build.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/paddle/scripts/docker/build.sh b/paddle/scripts/docker/build.sh index 176b8278f11..a4b63f90ec8 100644 --- a/paddle/scripts/docker/build.sh +++ b/paddle/scripts/docker/build.sh @@ -9,6 +9,9 @@ if [ ${WITH_GPU} == "ON" ]; then GPU_DOCKER_PKG="python-pip python-dev" else BASE_IMAGE="python:2.7.13-slim" + # FIXME: python base image uses different python version than WITH_GPU + # need to change PYTHONHOME to /usr/local when using python base image + CPU_DOCKER_PYTHON_HOME_ENV="ENV PYTHONHOME /usr/local" fi DOCKERFILE_GPU_ENV="" @@ -97,7 +100,8 @@ ADD build/*.deb /usr/local/opt/paddle/deb/ RUN dpkg -i /usr/local/opt/paddle/deb/*.deb && \ rm -f /usr/local/opt/paddle/deb/*.deb && \ paddle version -${DOCKERFILE_CUDNN_DSO} +${CPU_DOCKER_PYTHON_HOME_ENV} +${DOCKERFILE_CUDNN_DSO} ${DOCKERFILE_GPU_ENV} # default command shows the paddle version and exit CMD ["paddle", "version"] -- GitLab