mirror of
https://github.com/zebrajr/tensorflow.git
synced 2026-01-15 12:15:41 +00:00
Internal build infrastructure cleanup.
PiperOrigin-RevId: 845095420
This commit is contained in:
committed by
TensorFlower Gardener
parent
840a3f7832
commit
6c7405dc15
@@ -1,87 +0,0 @@
|
||||
# Dockerfile to build a manylinux 2010 compliant cross-compiler.
|
||||
#
|
||||
# Builds a devtoolset gcc/libstdc++ that targets manylinux 2010 compatible
|
||||
# glibc (2.12) and system libstdc++ (4.4).
|
||||
#
|
||||
# To push a new version, run:
|
||||
# $ docker build -f Dockerfile.rbe.cuda10.1-cudnn7-ubuntu16.04-manylinux2010 \
|
||||
# --tag "gcr.io/tensorflow-testing/nosla-cuda10.1-cudnn7-ubuntu16.04-manylinux2010" .
|
||||
# $ docker push gcr.io/tensorflow-testing/nosla-cuda10.1-cudnn7-ubuntu16.04-manylinux2010
|
||||
|
||||
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu16.04 as devtoolset
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get install -y \
|
||||
cpio \
|
||||
file \
|
||||
flex \
|
||||
g++ \
|
||||
make \
|
||||
rpm2cpio \
|
||||
unar \
|
||||
wget \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ADD devtoolset/fixlinks.sh fixlinks.sh
|
||||
ADD devtoolset/build_devtoolset.sh build_devtoolset.sh
|
||||
ADD devtoolset/rpm-patch.sh rpm-patch.sh
|
||||
|
||||
# Set up a sysroot for glibc 2.12 / libstdc++ 4.4 / devtoolset-7 in /dt7.
|
||||
RUN /build_devtoolset.sh devtoolset-7 /dt7
|
||||
# Set up a sysroot for glibc 2.12 / libstdc++ 4.4 / devtoolset-8 in /dt8.
|
||||
RUN /build_devtoolset.sh devtoolset-8 /dt8
|
||||
|
||||
# TODO(klimek): Split up into two different docker images.
|
||||
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu16.04
|
||||
COPY --from=devtoolset /dt7 /dt7
|
||||
COPY --from=devtoolset /dt8 /dt8
|
||||
|
||||
# Install TensorRT.
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libnvinfer-dev=6.0.1-1+cuda10.1 \
|
||||
libnvinfer6=6.0.1-1+cuda10.1 \
|
||||
libnvinfer-plugin-dev=6.0.1-1+cuda10.1 \
|
||||
libnvinfer-plugin6=6.0.1-1+cuda10.1 \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy and run the install scripts.
|
||||
ENV CLANG_VERSION="r42cab985fd95ba4f3f290e7bb26b93805edb447d"
|
||||
COPY install/*.sh /install/
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
RUN /install/install_bootstrap_deb_packages.sh
|
||||
RUN /install/install_deb_packages.sh
|
||||
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 && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
python3.6 -m pip install pip --upgrade && \
|
||||
update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 0
|
||||
|
||||
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
|
||||
|
||||
# Overwrite include paths that are generated for the multipython image.
|
||||
RUN ln -sf "/usr/include/x86_64-linux-gnu/python3.6m" "/dt7/usr/include/x86_64-linux-gnu/python3.6m"
|
||||
RUN ln -sf "/usr/include/x86_64-linux-gnu/python3.6m" "/dt8/usr/include/x86_64-linux-gnu/python3.6m"
|
||||
|
||||
RUN ln -sf "/usr/include/x86_64-linux-gnu/python3.8" "/dt7/usr/include/x86_64-linux-gnu/python3.8"
|
||||
RUN ln -sf "/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
|
||||
@@ -1,87 +0,0 @@
|
||||
# Dockerfile to build a manylinux 2010 compliant cross-compiler.
|
||||
#
|
||||
# Builds a devtoolset gcc/libstdc++ that targets manylinux 2010 compatible
|
||||
# glibc (2.12) and system libstdc++ (4.4).
|
||||
#
|
||||
# To push a new version, run:
|
||||
# $ docker build -f Dockerfile.rbe.cuda10.1-cudnn7-ubuntu16.04-manylinux2010-multipython \
|
||||
# --tag "gcr.io/tensorflow-testing/nosla-cuda10.1-cudnn7-ubuntu16.04-manylinux2010-multipython" .
|
||||
# $ docker push gcr.io/tensorflow-testing/nosla-cuda10.1-cudnn7-ubuntu16.04-manylinux2010-multipython
|
||||
|
||||
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu16.04 as devtoolset
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get install -y \
|
||||
cpio \
|
||||
file \
|
||||
flex \
|
||||
g++ \
|
||||
make \
|
||||
rpm2cpio \
|
||||
unar \
|
||||
wget \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ADD devtoolset/fixlinks.sh fixlinks.sh
|
||||
ADD devtoolset/build_devtoolset.sh build_devtoolset.sh
|
||||
ADD devtoolset/rpm-patch.sh rpm-patch.sh
|
||||
|
||||
# Set up a sysroot for glibc 2.12 / libstdc++ 4.4 / devtoolset-7 in /dt7.
|
||||
RUN /build_devtoolset.sh devtoolset-7 /dt7
|
||||
# Set up a sysroot for glibc 2.12 / libstdc++ 4.4 / devtoolset-8 in /dt8.
|
||||
RUN /build_devtoolset.sh devtoolset-8 /dt8
|
||||
|
||||
# TODO(klimek): Split up into two different docker images.
|
||||
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu16.04
|
||||
COPY --from=devtoolset /dt7 /dt7
|
||||
COPY --from=devtoolset /dt8 /dt8
|
||||
|
||||
# Install TensorRT.
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libnvinfer-dev=6.0.1-1+cuda10.1 \
|
||||
libnvinfer6=6.0.1-1+cuda10.1 \
|
||||
libnvinfer-plugin-dev=6.0.1-1+cuda10.1 \
|
||||
libnvinfer-plugin6=6.0.1-1+cuda10.1 \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy and run the install scripts.
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
COPY install/install_bootstrap_deb_packages.sh /install/
|
||||
RUN /install/install_bootstrap_deb_packages.sh
|
||||
|
||||
COPY install/install_deb_packages.sh /install/
|
||||
RUN /install/install_deb_packages.sh
|
||||
|
||||
# Install additional packages needed for this image:
|
||||
# - dependencies to build Python from source
|
||||
# - patchelf, as it is required by auditwheel
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libbz2-dev \
|
||||
libffi-dev \
|
||||
libgdbm-dev \
|
||||
libncurses5-dev \
|
||||
libnss3-dev \
|
||||
libreadline-dev \
|
||||
patchelf \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY install/install_bazel.sh /install/
|
||||
RUN /install/install_bazel.sh
|
||||
|
||||
COPY install/build_and_install_python.sh /install/
|
||||
RUN /install/build_and_install_python.sh "3.6.9"
|
||||
RUN /install/build_and_install_python.sh "3.7.7"
|
||||
RUN /install/build_and_install_python.sh "3.8.2"
|
||||
|
||||
COPY install/install_pip_packages_by_version.sh /install/
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.6"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.7"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.8"
|
||||
|
||||
ENV CLANG_VERSION="r42cab985fd95ba4f3f290e7bb26b93805edb447d"
|
||||
COPY install/install_latest_clang.sh /install/
|
||||
RUN /install/install_latest_clang.sh
|
||||
@@ -1,88 +0,0 @@
|
||||
# Dockerfile to build a manylinux 2010 compliant cross-compiler.
|
||||
#
|
||||
# Builds a devtoolset gcc/libstdc++ that targets manylinux 2010 compatible
|
||||
# glibc (2.12) and system libstdc++ (4.4).
|
||||
#
|
||||
# To push a new version, run:
|
||||
# $ docker build -f Dockerfile.rbe.cuda10.1-cudnn7-ubuntu18.04-manylinux2010-multipython \
|
||||
# --tag "gcr.io/tensorflow-testing/nosla-cuda10.1-cudnn7-ubuntu18.04-manylinux2010-multipython" .
|
||||
# $ docker push gcr.io/tensorflow-testing/nosla-cuda10.1-cudnn7-ubuntu18.04-manylinux2010-multipython
|
||||
|
||||
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04 as devtoolset
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get install -y \
|
||||
cpio \
|
||||
file \
|
||||
flex \
|
||||
g++ \
|
||||
make \
|
||||
rpm2cpio \
|
||||
unar \
|
||||
wget \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ADD devtoolset/fixlinks.sh fixlinks.sh
|
||||
ADD devtoolset/build_devtoolset.sh build_devtoolset.sh
|
||||
ADD devtoolset/rpm-patch.sh rpm-patch.sh
|
||||
|
||||
# Set up a sysroot for glibc 2.12 / libstdc++ 4.4 / devtoolset-7 in /dt7.
|
||||
RUN /build_devtoolset.sh devtoolset-7 /dt7
|
||||
# Set up a sysroot for glibc 2.12 / libstdc++ 4.4 / devtoolset-8 in /dt8.
|
||||
RUN /build_devtoolset.sh devtoolset-8 /dt8
|
||||
|
||||
# TODO(klimek): Split up into two different docker images.
|
||||
FROM nvidia/cuda:10.1-cudnn7-devel-ubuntu18.04
|
||||
COPY --from=devtoolset /dt7 /dt7
|
||||
COPY --from=devtoolset /dt8 /dt8
|
||||
|
||||
# Install TensorRT.
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libnvinfer-dev=6.0.1-1+cuda10.1 \
|
||||
libnvinfer6=6.0.1-1+cuda10.1 \
|
||||
libnvinfer-plugin-dev=6.0.1-1+cuda10.1 \
|
||||
libnvinfer-plugin6=6.0.1-1+cuda10.1 \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy and run the install scripts.
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
COPY install/install_bootstrap_deb_packages.sh /install/
|
||||
RUN /install/install_bootstrap_deb_packages.sh
|
||||
|
||||
COPY install/install_deb_packages.sh /install/
|
||||
RUN /install/install_deb_packages.sh
|
||||
|
||||
# Install additional packages needed for this image:
|
||||
# - dependencies to build Python from source
|
||||
# - patchelf, as it is required by auditwheel
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libbz2-dev \
|
||||
libffi-dev \
|
||||
libgdbm-dev \
|
||||
libncurses5-dev \
|
||||
libnss3-dev \
|
||||
libreadline-dev \
|
||||
patchelf \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY install/install_bazel.sh /install/
|
||||
RUN /install/install_bazel.sh
|
||||
|
||||
COPY install/build_and_install_python.sh /install/
|
||||
RUN /install/build_and_install_python.sh "3.5.9"
|
||||
RUN /install/build_and_install_python.sh "3.6.9"
|
||||
RUN /install/build_and_install_python.sh "3.7.7"
|
||||
RUN /install/build_and_install_python.sh "3.8.2"
|
||||
|
||||
COPY install/install_pip_packages_by_version.sh /install/
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.6"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.7"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.8"
|
||||
|
||||
ENV CLANG_VERSION="r42cab985fd95ba4f3f290e7bb26b93805edb447d"
|
||||
COPY install/install_latest_clang.sh /install/
|
||||
RUN /install/install_latest_clang.sh
|
||||
@@ -1,78 +0,0 @@
|
||||
# Dockerfile to build a manylinux 2010 compliant cross-compiler.
|
||||
#
|
||||
# Builds a devtoolset gcc/libstdc++ that targets manylinux 2010 compatible
|
||||
# glibc (2.12) and system libstdc++ (4.4).
|
||||
#
|
||||
# To push a new version, run:
|
||||
# $ docker build -f Dockerfile.rbe.cuda10.2-cudnn7-ubuntu18.04-manylinux2010-multipython \
|
||||
# --tag "gcr.io/tensorflow-testing/nosla-cuda10.2-cudnn7-ubuntu18.04-manylinux2010-multipython" .
|
||||
# $ docker push gcr.io/tensorflow-testing/nosla-cuda10.2-cudnn7-ubuntu18.04-manylinux2010-multipython
|
||||
|
||||
FROM gcr.io/tensorflow-testing/nosla-cuda10.0-cudnn7-ubuntu16.04-manylinux2010
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get remove -y --allow-change-held-packages cuda-license-10-0 libcudnn7 libcudnn8 libnccl2 libnccl-dev
|
||||
RUN apt-get install -y --no-install-recommends --allow-downgrades --allow-change-held-packages \
|
||||
libcublas10 \
|
||||
libcublas-dev \
|
||||
cuda-nvml-dev-10.2 \
|
||||
cuda-command-line-tools-10.2 \
|
||||
cuda-libraries-dev-10.2 \
|
||||
cuda-minimal-build-10.2 \
|
||||
libcudnn7=7.6.5.32-1+cuda10.2 \
|
||||
libcudnn7-dev=7.6.5.32-1+cuda10.2
|
||||
RUN rm -f /usr/local/cuda
|
||||
RUN ln -s /usr/local/cuda-10.2 /usr/local/cuda
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get install -y \
|
||||
cpio \
|
||||
file \
|
||||
flex \
|
||||
g++ \
|
||||
make \
|
||||
rpm2cpio \
|
||||
unar \
|
||||
wget \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy and run the install scripts.
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
COPY install/install_bootstrap_deb_packages.sh /install/
|
||||
RUN /install/install_bootstrap_deb_packages.sh
|
||||
|
||||
COPY install/install_deb_packages.sh /install/
|
||||
RUN /install/install_deb_packages.sh
|
||||
|
||||
# Install additional packages needed for this image:
|
||||
# - dependencies to build Python from source
|
||||
# - patchelf, as it is required by auditwheel
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libbz2-dev \
|
||||
libffi-dev \
|
||||
libgdbm-dev \
|
||||
libncurses5-dev \
|
||||
libnss3-dev \
|
||||
libreadline-dev \
|
||||
patchelf \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY install/install_bazel.sh /install/
|
||||
RUN /install/install_bazel.sh
|
||||
|
||||
COPY install/build_and_install_python.sh /install/
|
||||
RUN /install/build_and_install_python.sh "3.7.7"
|
||||
RUN /install/build_and_install_python.sh "3.8.2"
|
||||
RUN /install/build_and_install_python.sh "3.9.0"
|
||||
|
||||
COPY install/install_pip_packages_by_version.sh /install/
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.7"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.8"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.9"
|
||||
|
||||
ENV CLANG_VERSION="r42cab985fd95ba4f3f290e7bb26b93805edb447d"
|
||||
COPY install/install_latest_clang.sh /install/
|
||||
RUN /install/install_latest_clang.sh
|
||||
@@ -1,93 +0,0 @@
|
||||
# Dockerfile to build a manylinux 2010 compliant cross-compiler.
|
||||
#
|
||||
# Builds a devtoolset gcc/libstdc++ that targets manylinux 2010 compatible
|
||||
# glibc (2.12) and system libstdc++ (4.4).
|
||||
#
|
||||
# To push a new version, run:
|
||||
# $ docker build -f Dockerfile.rbe.cuda11.0-cudnn8-ubuntu18.04-manylinux2010-multipython \
|
||||
# --tag "gcr.io/tensorflow-testing/nosla-cuda11.0-cudnn8-ubuntu18.04-manylinux2010-multipython" .
|
||||
# $ docker push gcr.io/tensorflow-testing/nosla-cuda11.0-cudnn8-ubuntu18.04-manylinux2010-multipython
|
||||
|
||||
FROM nvidia/cuda:11.0-cudnn8-devel-ubuntu18.04 as devtoolset
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get install -y \
|
||||
cpio \
|
||||
file \
|
||||
flex \
|
||||
g++ \
|
||||
make \
|
||||
patch \
|
||||
rpm2cpio \
|
||||
unar \
|
||||
wget \
|
||||
xz-utils \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ADD devtoolset/fixlinks.sh fixlinks.sh
|
||||
ADD devtoolset/build_devtoolset.sh build_devtoolset.sh
|
||||
ADD devtoolset/rpm-patch.sh rpm-patch.sh
|
||||
|
||||
# Set up a sysroot for glibc 2.12 / libstdc++ 4.4 / devtoolset-7 in /dt7.
|
||||
RUN /build_devtoolset.sh devtoolset-7 /dt7
|
||||
# Set up a sysroot for glibc 2.12 / libstdc++ 4.4 / devtoolset-8 in /dt8.
|
||||
RUN /build_devtoolset.sh devtoolset-8 /dt8
|
||||
|
||||
# TODO(klimek): Split up into two different docker images.
|
||||
FROM nvidia/cuda:11.0-cudnn8-devel-ubuntu18.04
|
||||
COPY --from=devtoolset /dt7 /dt7
|
||||
COPY --from=devtoolset /dt8 /dt8
|
||||
|
||||
# Install TensorRT.
|
||||
RUN echo \
|
||||
deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64 / \
|
||||
> /etc/apt/sources.list.d/nvidia-ml.list \
|
||||
&& \
|
||||
apt-get update && apt-get install -y \
|
||||
libnvinfer-dev=7.1.3-1+cuda11.0 \
|
||||
libnvinfer7=7.1.3-1+cuda11.0 \
|
||||
libnvinfer-plugin-dev=7.1.3-1+cuda11.0 \
|
||||
libnvinfer-plugin7=7.1.3-1+cuda11.0 \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy and run the install scripts.
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
COPY install/install_bootstrap_deb_packages.sh /install/
|
||||
RUN /install/install_bootstrap_deb_packages.sh
|
||||
|
||||
COPY install/install_deb_packages.sh /install/
|
||||
RUN /install/install_deb_packages.sh
|
||||
|
||||
# Install additional packages needed for this image:
|
||||
# - dependencies to build Python from source
|
||||
# - patchelf, as it is required by auditwheel
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libbz2-dev \
|
||||
libffi-dev \
|
||||
libgdbm-dev \
|
||||
libncurses5-dev \
|
||||
libnss3-dev \
|
||||
libreadline-dev \
|
||||
patchelf \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY install/install_bazel.sh /install/
|
||||
RUN /install/install_bazel.sh
|
||||
|
||||
COPY install/build_and_install_python.sh /install/
|
||||
RUN /install/build_and_install_python.sh "3.6.9"
|
||||
RUN /install/build_and_install_python.sh "3.7.7"
|
||||
RUN /install/build_and_install_python.sh "3.8.2"
|
||||
|
||||
COPY install/install_pip_packages_by_version.sh /install/
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.6"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.7"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.8"
|
||||
|
||||
ENV CLANG_VERSION="r7f6f9f4cf966c78a315d15d6e913c43cfa45c47c"
|
||||
COPY install/install_latest_clang.sh /install/
|
||||
RUN /install/install_latest_clang.sh
|
||||
@@ -1,105 +0,0 @@
|
||||
# Dockerfile to build a manylinxu2010/manylinux 2014 compliant cross-compiler.
|
||||
#
|
||||
# Builds a devtoolset-7 environment with manylinux2010 compatible glibc (2.12) and
|
||||
# libstdc++ (4.4) in /dt7.
|
||||
#
|
||||
# Builds a devtoolset-9 environment with manylinux2014 compatible glibc (2.17) and
|
||||
# libstdc++ (4.8) in /dt9.
|
||||
#
|
||||
# To push a new version, run:
|
||||
# $ docker build -f Dockerfile.rbe.cuda11.2-cudnn8.1-ubuntu20.04-manylinux2014-multipython \
|
||||
# --tag "gcr.io/tensorflow-testing/nosla-cuda11.2-cudnn8.1-ubuntu20.04-manylinux2014-multipython" .
|
||||
# $ docker push gcr.io/tensorflow-testing/nosla-cuda11.2-cudnn8.1-ubuntu20.04-manylinux2014-multipython
|
||||
|
||||
FROM nvidia/cuda:11.2.1-cudnn8-devel-ubuntu20.04 as devtoolset
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get install -y \
|
||||
cpio \
|
||||
file \
|
||||
flex \
|
||||
g++ \
|
||||
make \
|
||||
patch \
|
||||
rpm2cpio \
|
||||
unar \
|
||||
wget \
|
||||
xz-utils \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ADD devtoolset/fixlinks.sh fixlinks.sh
|
||||
ADD devtoolset/build_devtoolset.sh build_devtoolset.sh
|
||||
ADD devtoolset/rpm-patch.sh rpm-patch.sh
|
||||
|
||||
# Set up a sysroot for glibc 2.12 / libstdc++ 4.4 / devtoolset-7 in /dt7.
|
||||
RUN /build_devtoolset.sh devtoolset-7 /dt7
|
||||
# Set up a sysroot for glibc 2.17 / libstdc++ 4.8 / devtoolset-9 in /dt9.
|
||||
RUN /build_devtoolset.sh devtoolset-9 /dt9
|
||||
|
||||
# TODO(klimek): Split up into two different docker images.
|
||||
FROM nvidia/cuda:11.2.1-cudnn8-devel-ubuntu20.04
|
||||
COPY --from=devtoolset /dt7 /dt7
|
||||
COPY --from=devtoolset /dt9 /dt9
|
||||
|
||||
# Install TensorRT.
|
||||
RUN echo \
|
||||
deb https://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1804/x86_64 / \
|
||||
> /etc/apt/sources.list.d/nvidia-ml.list \
|
||||
&& \
|
||||
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys F60F4B3D7FA2AF80 && \
|
||||
apt-get update && apt-get install -y \
|
||||
libnvinfer-dev=7.2.2-1+cuda11.1 \
|
||||
libnvinfer7=7.2.2-1+cuda11.1 \
|
||||
libnvinfer-plugin-dev=7.2.2-1+cuda11.1 \
|
||||
libnvinfer-plugin7=7.2.2-1+cuda11.1 \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Copy and run the install scripts.
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
COPY install/install_bootstrap_deb_packages.sh /install/
|
||||
RUN /install/install_bootstrap_deb_packages.sh
|
||||
|
||||
COPY install/install_deb_packages.sh /install/
|
||||
RUN /install/install_deb_packages.sh
|
||||
|
||||
# Install additional packages needed for this image:
|
||||
# - dependencies to build Python from source
|
||||
# - patchelf, as it is required by auditwheel
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libbz2-dev \
|
||||
libffi-dev \
|
||||
libgdbm-dev \
|
||||
libncurses5-dev \
|
||||
libnss3-dev \
|
||||
libreadline-dev \
|
||||
libsqlite3-dev \
|
||||
patchelf \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY install/install_bazel.sh /install/
|
||||
RUN /install/install_bazel.sh
|
||||
|
||||
COPY install/build_and_install_python.sh /install/
|
||||
RUN /install/build_and_install_python.sh "3.7.7"
|
||||
RUN /install/build_and_install_python.sh "3.8.2"
|
||||
RUN /install/build_and_install_python.sh "3.9.4"
|
||||
RUN /install/build_and_install_python.sh "3.10.0"
|
||||
|
||||
COPY install/install_pip_packages_by_version.sh /install/
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.7"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.8"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.9"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.10"
|
||||
|
||||
ENV CLANG_VERSION="rf2b94bd7eaa83d853dc7568fac87b1f8bf4ddec6"
|
||||
COPY install/install_latest_clang.sh /install/
|
||||
RUN /install/install_latest_clang.sh
|
||||
|
||||
# TensorRT 7 for CUDA 11.1 is compatible with CUDA 11.2, but requires
|
||||
# libnvrtc.so.11.1. See https://github.com/NVIDIA/TensorRT/issues/1064.
|
||||
# TODO(b/187962120): Remove when upgrading to TensorRT 8.
|
||||
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/cuda-11.1/lib64"
|
||||
@@ -1,26 +0,0 @@
|
||||
FROM nvidia/cuda:10.0-cudnn7-devel-ubuntu16.04
|
||||
|
||||
LABEL maintainer="Nick Lopez <ngiraldo@google.com>"
|
||||
|
||||
# In the Ubuntu 16.04 images, cudnn is placed in system paths. Move them to
|
||||
# /usr/local/cuda
|
||||
RUN cp -P /usr/include/cudnn.h /usr/local/cuda/include
|
||||
RUN cp -P /usr/lib/x86_64-linux-gnu/libcudnn* /usr/local/cuda/lib64
|
||||
|
||||
# Copy and run the install scripts.
|
||||
COPY install/*.sh /install/
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
RUN /install/install_bootstrap_deb_packages.sh
|
||||
RUN add-apt-repository -y ppa:openjdk-r/ppa && \
|
||||
add-apt-repository -y ppa:george-edison55/cmake-3.x
|
||||
RUN /install/install_deb_packages.sh
|
||||
RUN /install/install_pip_packages.sh
|
||||
RUN /install/install_golang.sh
|
||||
|
||||
# Install clang from pre-built package
|
||||
RUN cd /tmp && \
|
||||
wget https://storage.googleapis.com/clang-builds-stable/clang-ubuntu16_04/clang_r337145.tar.gz && \
|
||||
echo "ab98c63eb09c04112cc992bc95ebc0dcea8c5e9d0760438789be2896cdc69ff8 clang_r337145.tar.gz" | sha256sum -c && \
|
||||
tar -C /usr/local -xf clang_r323528.tar.gz && \
|
||||
rm clang_r337145.tar.gz
|
||||
|
||||
@@ -1,82 +0,0 @@
|
||||
# Dockerfile for ROCm RBE builds.
|
||||
#
|
||||
# To push a new version, run:
|
||||
# $ docker build -f Dockerfile.local-toolchain-ubuntu18.04-manylinux2010 \
|
||||
# --tag "local-toolchain-ubuntu18.04-manylinux2010" .
|
||||
# $ docker build -f Dockerfile.rbe.rocm-ubuntu18.04-manylinux2010-multipython \
|
||||
# --tag "gcr.io/tensorflow-testing/nosla-rocm-ubuntu18.04-manylinux2010-multipython" .
|
||||
# $ docker push gcr.io/tensorflow-testing/nosla-rocm-ubuntu18.04-manylinux2010-multipython
|
||||
|
||||
FROM ubuntu:18.04
|
||||
COPY --from=local-toolchain-ubuntu18.04-manylinux2010 /dt7 /dt7
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install ROCm packages
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl libnuma-dev gnupg sudo libelf1 build-essential \
|
||||
&& curl -k -sL https://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - \
|
||||
&& printf "deb [arch=amd64] http://repo.radeon.com/rocm/apt/5.0/ ubuntu main" | tee /etc/apt/sources.list.d/rocm.list \
|
||||
&& apt-get update && apt-get install -y --no-install-recommends \
|
||||
rocm-dev rocm-libs rccl \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set ROCm environment variables and paths.
|
||||
# We use /opt/rocm without version suffix so that the toolchain configuration
|
||||
# for builtin headers doesn't need to be adapted
|
||||
ARG ROCM_PATH=/opt/rocm
|
||||
ENV HCC_HOME=$ROCM_PATH/hcc
|
||||
ENV HIP_PATH=$ROCM_PATH/hip
|
||||
ENV OPENCL_ROOT=$ROCM_PATH/opencl
|
||||
ENV PATH="$ROCM_PATH/bin:${PATH}"
|
||||
ENV PATH="$HCC_HOME/bin:$HIP_PATH/bin:${PATH}"
|
||||
ENV PATH="$OPENCL_ROOT/bin:${PATH}"
|
||||
|
||||
# Set target file to help determine which device(s) to build for
|
||||
RUN bash -c "ls -al /opt/roc*"
|
||||
RUN bash -c "echo -e 'gfx900\ngfx906\ngfx908' > $ROCM_PATH/bin/target.lst"
|
||||
|
||||
# Copy and run the install scripts.
|
||||
COPY install/install_bootstrap_deb_packages.sh /install/
|
||||
RUN /install/install_bootstrap_deb_packages.sh
|
||||
|
||||
COPY install/install_deb_packages.sh /install/
|
||||
RUN /install/install_deb_packages.sh
|
||||
|
||||
# Install additional packages needed for this image:
|
||||
# - bsdmainutils (hexdump) for MLIR generated GPU kernels
|
||||
# - dependencies to build Python from source
|
||||
# - patchelf, as it is required by auditwheel
|
||||
RUN apt-get update && apt-get install -y \
|
||||
bsdmainutils \
|
||||
libbz2-dev \
|
||||
libffi-dev \
|
||||
libgdbm-dev \
|
||||
libncurses5-dev \
|
||||
libnss3-dev \
|
||||
libreadline-dev \
|
||||
patchelf \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install openjdk 11
|
||||
RUN yes "" | add-apt-repository ppa:openjdk-r/ppa
|
||||
RUN apt-get update && apt-get install -y openjdk-11-jdk && \
|
||||
update-alternatives --auto java
|
||||
|
||||
COPY install/install_bazel.sh /install/
|
||||
RUN /install/install_bazel.sh
|
||||
|
||||
COPY install/build_and_install_python.sh /install/
|
||||
RUN /install/build_and_install_python.sh "3.7.7"
|
||||
RUN /install/build_and_install_python.sh "3.8.2"
|
||||
RUN /install/build_and_install_python.sh "3.9.4"
|
||||
|
||||
COPY install/install_pip_packages_by_version.sh /install/
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.7"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.8"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.9"
|
||||
|
||||
ENV CLANG_VERSION="r42cab985fd95ba4f3f290e7bb26b93805edb447d"
|
||||
COPY install/install_latest_clang.sh /install/
|
||||
RUN /install/install_latest_clang.sh
|
||||
@@ -1,86 +0,0 @@
|
||||
# Dockerfile for ROCm RBE builds.
|
||||
#
|
||||
# To push a new version, run:
|
||||
# $ docker build -f Dockerfile.local-toolchain-ubuntu20.04-manylinux2014 \
|
||||
# --tag "local-toolchain-ubuntu20.04-manylinux2014" .
|
||||
# $ docker build -f Dockerfile.rbe.rocm-ubuntu20.04-manylinux2014-multipython \
|
||||
# --tag "gcr.io/tensorflow-testing/nosla-rocm-ubuntu20.04-manylinux2014-multipython" .
|
||||
# $ docker push gcr.io/tensorflow-testing/nosla-rocm-ubuntu20.04-manylinux2014-multipython
|
||||
|
||||
FROM ubuntu:20.04
|
||||
COPY --from=local-toolchain-ubuntu20.04-manylinux2014 /dt7 /dt7
|
||||
COPY --from=local-toolchain-ubuntu20.04-manylinux2014 /dt9 /dt9
|
||||
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
# Install ROCm packages
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
curl libnuma-dev gnupg sudo libelf1 build-essential \
|
||||
&& curl -k -sL https://repo.radeon.com/rocm/rocm.gpg.key | apt-key add - \
|
||||
&& printf "deb [arch=amd64] http://repo.radeon.com/rocm/apt/5.3/ ubuntu main" \
|
||||
| tee /etc/apt/sources.list.d/rocm.list \
|
||||
&& apt-get update && apt-get install -y \
|
||||
rocm-dev rocm-libs rccl \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Set ROCm environment variables and paths.
|
||||
# We use /opt/rocm without version suffix so that the toolchain configuration
|
||||
# for builtin headers doesn't need to be adapted
|
||||
ARG ROCM_PATH=/opt/rocm
|
||||
ENV HCC_HOME=$ROCM_PATH/hcc
|
||||
ENV HIP_PATH=$ROCM_PATH/hip
|
||||
ENV OPENCL_ROOT=$ROCM_PATH/opencl
|
||||
ENV PATH="$ROCM_PATH/bin:${PATH}"
|
||||
ENV PATH="$HCC_HOME/bin:$HIP_PATH/bin:${PATH}"
|
||||
ENV PATH="$OPENCL_ROOT/bin:${PATH}"
|
||||
|
||||
# Set target file to help determine which device(s) to build for
|
||||
RUN bash -c "ls -al /opt/roc*"
|
||||
RUN bash -c "echo -e 'gfx900\ngfx906\ngfx908' > $ROCM_PATH/bin/target.lst"
|
||||
|
||||
# Copy and run the install scripts.
|
||||
COPY install/install_bootstrap_deb_packages.sh /install/
|
||||
RUN /install/install_bootstrap_deb_packages.sh
|
||||
|
||||
COPY install/install_deb_packages.sh /install/
|
||||
RUN /install/install_deb_packages.sh
|
||||
|
||||
# Install additional packages needed for this image:
|
||||
# - dependencies to build Python from source
|
||||
# - patchelf, as it is required by auditwheel
|
||||
RUN apt-get update && apt-get install -y \
|
||||
libbz2-dev \
|
||||
libffi-dev \
|
||||
libgdbm-dev \
|
||||
libncurses5-dev \
|
||||
libnss3-dev \
|
||||
libreadline-dev \
|
||||
patchelf \
|
||||
&& \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# Install openjdk 11
|
||||
RUN yes "" | add-apt-repository ppa:openjdk-r/ppa
|
||||
RUN apt-get update && apt-get install -y openjdk-11-jdk && \
|
||||
update-alternatives --auto java
|
||||
|
||||
COPY install/install_bazel.sh /install/
|
||||
RUN /install/install_bazel.sh
|
||||
|
||||
COPY install/build_and_install_python.sh /install/
|
||||
RUN /install/build_and_install_python.sh "3.7.7"
|
||||
RUN /install/build_and_install_python.sh "3.8.2"
|
||||
RUN /install/build_and_install_python.sh "3.9.4"
|
||||
RUN /install/build_and_install_python.sh "3.10.0"
|
||||
RUN /install/build_and_install_python.sh "3.11.0"
|
||||
|
||||
COPY install/install_pip_packages_by_version.sh /install/
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.7" "nojax"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.8" "nojax"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.9" "nojax"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.10" "nojax"
|
||||
RUN /install/install_pip_packages_by_version.sh "/usr/local/bin/pip3.11" "nojax"
|
||||
|
||||
ENV CLANG_VERSION="rf2b94bd7eaa83d853dc7568fac87b1f8bf4ddec6"
|
||||
COPY install/install_latest_clang.sh /install/
|
||||
RUN /install/install_latest_clang.sh
|
||||
@@ -1,25 +0,0 @@
|
||||
#!/bin/bash -eu
|
||||
# Copyright 2019 The TensorFlow Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# ==============================================================================
|
||||
|
||||
# Contact c-toolchain-team@ for new releases or new ubuntu versions.
|
||||
DIST="$(grep "DISTRIB_RELEASE" /etc/lsb-release |sed 's,.*=,,; s,\.,_,')"
|
||||
INSTALL_DIR="/clang_${CLANG_VERSION}"
|
||||
STORAGE="https://storage.googleapis.com/clang-builds-stable"
|
||||
mkdir -p "${INSTALL_DIR}"
|
||||
cd "${INSTALL_DIR}"
|
||||
wget "${STORAGE}/clang-ubuntu${DIST}/clang_${CLANG_VERSION}.tar.gz"
|
||||
tar xvzf clang_${CLANG_VERSION}.tar.gz
|
||||
rm clang_${CLANG_VERSION}.tar.gz
|
||||
Reference in New Issue
Block a user