forked from tensorflow/tensorflow
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
80 additions
and
0 deletions.
There are no files selected for viewing
80 changes: 80 additions & 0 deletions
80
tensorflow/tools/ci_build/Dockerfile.custom_op_ubuntu_16_cuda11.0
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
# Dockerfile for Ubuntu 16.04 manylinux2010 custom ops with GPU. | ||
|
||
FROM nvidia/cuda:11.0-cudnn8-devel-ubuntu16.04 as devtoolset | ||
|
||
LABEL maintainer="Amit Patankar <[email protected]>" | ||
|
||
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:11.0-cudnn8-devel-ubuntu16.04 | ||
|
||
LABEL maintainer="Amit Patankar <[email protected]>" | ||
|
||
COPY --from=devtoolset /dt7 /dt7 | ||
COPY --from=devtoolset /dt8 /dt8 | ||
|
||
# Install TensorRT. | ||
RUN 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. | ||
COPY install/*.sh /install/ | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
RUN /install/install_bootstrap_deb_packages.sh | ||
RUN /install/install_deb_packages.sh | ||
RUN /install/install_clang.sh | ||
RUN /install/install_bazel.sh | ||
RUN /install/install_buildifier.sh | ||
|
||
ENV TF_NEED_CUDA=1 | ||
|
||
# Install python 3.6. | ||
RUN add-apt-repository ppa:deadsnakes/ppa && \ | ||
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 | ||
|
||
# Install python 3.7 | ||
RUN /install/install_python37.sh | ||
|
||
# Install pip3.5 | ||
RUN wget https://bootstrap.pypa.io/get-pip.py && python3.5 get-pip.py && rm get-pip.py | ||
|
||
RUN /install/install_pip_packages.sh | ||
RUN /install/install_auditwheel.sh | ||
|
||
# Make python3.6 the default python version | ||
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3.6 0 | ||
|
||
# Install given tensorflow or tf-nightly version, if not specified, install the # latest official release | ||
ARG TF_PACKAGE=tensorflow | ||
ARG TF_PACKAGE_VERSION= | ||
RUN pip3 install ${TF_PACKAGE}${TF_PACKAGE_VERSION:+==${TF_PACKAGE_VERSION}} |