Update the Dockerfiles for manylinux2010 toolchains with Python3.8 installations.

PiperOrigin-RevId: 296311657
Change-Id: Ic2040763c882ff3a1295100a8ec9dbf4fea4c50d
This commit is contained in:
Amit Patankar 2020-02-20 15:30:09 -08:00 committed by TensorFlower Gardener
parent 264f7fea34
commit 0c4f32c44e
3 changed files with 38 additions and 0 deletions

View File

@ -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

View File

@ -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

View File

@ -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"