diff --git a/tensorflow/tools/ci_build/Dockerfile.rbe.cuda10.0-cudnn7-ubuntu16.04-manylinux2010 b/tensorflow/tools/ci_build/Dockerfile.rbe.cuda10.0-cudnn7-ubuntu16.04-manylinux2010 index 5f07f3adb70..e4aac64a864 100644 --- a/tensorflow/tools/ci_build/Dockerfile.rbe.cuda10.0-cudnn7-ubuntu16.04-manylinux2010 +++ b/tensorflow/tools/ci_build/Dockerfile.rbe.cuda10.0-cudnn7-ubuntu16.04-manylinux2010 @@ -63,11 +63,23 @@ RUN apt-get update && apt-get install -y \ RUN /install/install_pip_packages.sh +# Install python 3.8. +RUN apt-get update && apt-get install -y python3.8 python3.8-dev python3.8-venv +RUN rm -rf /var/lib/apt/lists/* +# Have to download get-pip.py due to a pip circular issue +# https://stackoverflow.com/questions/58758447/how-to-fix-module-platform-has-no-attribute-linux-distribution-when-instal +RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py +RUN python3.8 get-pip.py +RUN python3.8 -m pip install --upgrade pip setuptools wheel + # TODO(klimek): Figure out a better way to get the right include paths # forwarded when we install new packages. RUN ln -s "/usr/include/x86_64-linux-gnu/python3.6m" "/dt7/usr/include/x86_64-linux-gnu/python3.6m" RUN ln -s "/usr/include/x86_64-linux-gnu/python3.6m" "/dt8/usr/include/x86_64-linux-gnu/python3.6m" +RUN ln -s "/usr/include/x86_64-linux-gnu/python3.8" "/dt7/usr/include/x86_64-linux-gnu/python3.8" +RUN ln -s "/usr/include/x86_64-linux-gnu/python3.8" "/dt8/usr/include/x86_64-linux-gnu/python3.8" + # Make apt work with python 3.6. RUN cp /usr/lib/python3/dist-packages/apt_pkg.cpython-35m-x86_64-linux-gnu.so \ /usr/lib/python3/dist-packages/apt_pkg.so diff --git a/tensorflow/tools/ci_build/Dockerfile.rbe.cuda10.1-cudnn7-ubuntu16.04-manylinux2010 b/tensorflow/tools/ci_build/Dockerfile.rbe.cuda10.1-cudnn7-ubuntu16.04-manylinux2010 index bf65772c33a..b529147e57e 100644 --- a/tensorflow/tools/ci_build/Dockerfile.rbe.cuda10.1-cudnn7-ubuntu16.04-manylinux2010 +++ b/tensorflow/tools/ci_build/Dockerfile.rbe.cuda10.1-cudnn7-ubuntu16.04-manylinux2010 @@ -56,6 +56,7 @@ RUN /install/install_latest_clang.sh RUN /install/install_bazel.sh # Install python 3.6. +RUN apt-get install --reinstall python3-apt RUN yes "" | add-apt-repository ppa:deadsnakes/ppa RUN apt-get update && apt-get install -y \ python3.6 python3.6-dev python3-pip python3.6-venv && \ @@ -65,11 +66,24 @@ RUN apt-get update && apt-get install -y \ RUN /install/install_pip_packages.sh +# Install python 3.8. +RUN apt-get update && apt-get install -y python3.8 python3.8-dev python3.8-venv +RUN rm -rf /var/lib/apt/lists/* +# Have to download get-pip.py due to a pip circular issue +# https://stackoverflow.com/questions/58758447/how-to-fix-module-platform-has-no-attribute-linux-distribution-when-instal +RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py +RUN python3.8 get-pip.py +RUN python3.8 -m pip install --upgrade pip setuptools wheel + + # TODO(klimek): Figure out a better way to get the right include paths # forwarded when we install new packages. RUN ln -s "/usr/include/x86_64-linux-gnu/python3.6m" "/dt7/usr/include/x86_64-linux-gnu/python3.6m" RUN ln -s "/usr/include/x86_64-linux-gnu/python3.6m" "/dt8/usr/include/x86_64-linux-gnu/python3.6m" +RUN ln -s "/usr/include/x86_64-linux-gnu/python3.8" "/dt7/usr/include/x86_64-linux-gnu/python3.8" +RUN ln -s "/usr/include/x86_64-linux-gnu/python3.8" "/dt8/usr/include/x86_64-linux-gnu/python3.8" + # Make apt work with python 3.6. RUN cp /usr/lib/python3/dist-packages/apt_pkg.cpython-35m-x86_64-linux-gnu.so \ /usr/lib/python3/dist-packages/apt_pkg.so diff --git a/tensorflow/tools/ci_build/Dockerfile.rbe.ubuntu16.04-manylinux2010 b/tensorflow/tools/ci_build/Dockerfile.rbe.ubuntu16.04-manylinux2010 index de6a766a7c4..516129ccd43 100644 --- a/tensorflow/tools/ci_build/Dockerfile.rbe.ubuntu16.04-manylinux2010 +++ b/tensorflow/tools/ci_build/Dockerfile.rbe.ubuntu16.04-manylinux2010 @@ -64,6 +64,15 @@ RUN apt-get update && apt-get install -y \ RUN /install/install_pip_packages.sh +# Install python 3.8. +RUN apt-get update && apt-get install -y python3.8 python3.8-dev python3.8-venv +RUN rm -rf /var/lib/apt/lists/* +# Have to download get-pip.py due to a pip circular issue +# https://stackoverflow.com/questions/58758447/how-to-fix-module-platform-has-no-attribute-linux-distribution-when-instal +RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py +RUN python3.8 get-pip.py +RUN python3.8 -m pip install --upgrade pip setuptools wheel + # TODO(klimek): Figure out a better way to get the right include paths # forwarded when we install new packages. RUN ln -s "/usr/include/x86_64-linux-gnu/python2.7" "/dt7/usr/include/x86_64-linux-gnu/python2.7" @@ -71,3 +80,6 @@ RUN ln -s "/usr/include/x86_64-linux-gnu/python2.7" "/dt8/usr/include/x86_64-lin RUN ln -s "/usr/include/x86_64-linux-gnu/python3.6m" "/dt7/usr/include/x86_64-linux-gnu/python3.6m" RUN ln -s "/usr/include/x86_64-linux-gnu/python3.6m" "/dt8/usr/include/x86_64-linux-gnu/python3.6m" + +RUN ln -s "/usr/include/x86_64-linux-gnu/python3.8" "/dt7/usr/include/x86_64-linux-gnu/python3.8" +RUN ln -s "/usr/include/x86_64-linux-gnu/python3.8" "/dt8/usr/include/x86_64-linux-gnu/python3.8"