diff options
author | 2018-08-08 10:34:47 -0700 | |
---|---|---|
committer | 2018-08-08 10:34:47 -0700 | |
commit | b92bf1afb85a6f7d4d9257d550e4014b7a03351f (patch) | |
tree | 34ae198292aa7a9fb5d091f8670043fe1ae19f0d /tensorflow/tools/docker | |
parent | 7585a44b0164e234ad6b6c3b99632fb28b7023e8 (diff) |
[Intel MKL] Adding support for python 3.6 dev containers; will move this to the new Dockerfile architecture, but need it here as well until the new architecture gets merged.
Diffstat (limited to 'tensorflow/tools/docker')
-rwxr-xr-x | tensorflow/tools/docker/Dockerfile.devel-mkl | 25 | ||||
-rwxr-xr-x | tensorflow/tools/docker/parameterized_docker_build.sh | 7 |
2 files changed, 25 insertions, 7 deletions
diff --git a/tensorflow/tools/docker/Dockerfile.devel-mkl b/tensorflow/tools/docker/Dockerfile.devel-mkl index f0c7118ecb..2160547f73 100755 --- a/tensorflow/tools/docker/Dockerfile.devel-mkl +++ b/tensorflow/tools/docker/Dockerfile.devel-mkl @@ -18,18 +18,29 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libhdf5-serial-dev \ libpng12-dev \ libzmq3-dev \ + libssl-dev \ pkg-config \ - python-dev \ - ${PYTHON3_DEV} \ rsync \ software-properties-common \ unzip \ zip \ zlib1g-dev \ openjdk-8-jdk \ - openjdk-8-jre-headless \ - && \ - apt-get clean && \ + openjdk-8-jre-headless + +#install Python 3 +RUN if [ ${PYTHON} = "python3.6" ]; then \ + curl https://www.python.org/ftp/python/3.6.5/Python-3.6.5.tar.xz -o /opt/python.tar.xz && \ + cd /opt && tar xvf python.tar.xz && \ + cd /opt/*/ && ./configure && \ + make && make install; \ + else \ + apt-get install -y --no-install-recommends \ + python-dev \ + ${PYTHON3_DEV}; \ + fi + +RUN apt-get clean && \ rm -rf /var/lib/apt/lists/* RUN curl -fSsL -O https://bootstrap.pypa.io/get-pip.py && \ @@ -51,7 +62,9 @@ RUN ${PIP} --no-cache-dir install \ ${PYTHON} -m ipykernel.kernelspec RUN if [ "${PYTHON}" = "python3" ]; then \ - ln -s -f /usr/bin/python3 /usr/bin/python; \ + ln -s -f /usr/bin/python3 /usr/bin/python; \ + elif [ "${PYTHON}" = "python3.6" ]; then \ + ln -s -f /usr/local/bin/python3.6 /usr/bin/python; \ fi # Set up our notebook config. diff --git a/tensorflow/tools/docker/parameterized_docker_build.sh b/tensorflow/tools/docker/parameterized_docker_build.sh index 4681c5fd61..9588b4e4cd 100755 --- a/tensorflow/tools/docker/parameterized_docker_build.sh +++ b/tensorflow/tools/docker/parameterized_docker_build.sh @@ -188,6 +188,8 @@ if [[ "${TF_DOCKER_BUILD_PYTHON_VERSION}" == "python2" ]]; then : elif [[ "${TF_DOCKER_BUILD_PYTHON_VERSION}" == "python3" ]]; then FINAL_TAG="${FINAL_TAG}-py3" +elif [[ "${TF_DOCKER_BUILD_PYTHON_VERSION}" == "python3.6" ]]; then + FINAL_TAG="${FINAL_TAG}-py3.6" else die "Unrecognized value in TF_DOCKER_BUILD_PYTHON_VERSION: "\ "${TF_DOCKER_BUILD_PYTHON_VERSION}" @@ -360,7 +362,7 @@ else # TF_DOCKER_BUILD_IS_DEVEL == 'yes' fi # Modify python/pip version if necessary. - if [[ "${TF_DOCKER_BUILD_PYTHON_VERSION}" == "python3" ]]; then + if [[ "${TF_DOCKER_BUILD_PYTHON_VERSION}" == "python3" ]] || [[ "${TF_DOCKER_BUILD_PYTHON_VERSION}" == "python3.6" ]]; then if [[ ${TF_DOCKER_BUILD_TYPE} == "mkl" ]]; then TF_DOCKER_BUILD_ARGS+=("--build-arg PYTHON=${TF_DOCKER_BUILD_PYTHON_VERSION}") TF_DOCKER_BUILD_ARGS+=("--build-arg PYTHON3_DEV=python3-dev") @@ -368,6 +370,9 @@ else # TF_DOCKER_BUILD_IS_DEVEL == 'yes' TF_DOCKER_BUILD_ARGS+=("--build-arg PIP=pip3") cp "${ORIG_DOCKERFILE}" "${DOCKERFILE}" else + if [[ "${TF_DOCKER_BUILD_TYPE}" != "mkl" ]]; then + die "Python 3.6 build only supported for MKL builds." + fi if sed -i -e 's/python-dev/python-dev python3-dev/g' "${DOCKERFILE}" && \ sed -i -e 's/python /python3 /g' "${DOCKERFILE}" && \ sed -i -e 's^/tmp/pip^/tmp/pip3^g' "${DOCKERFILE}" && \ |