forked from tensorflow/benchmarks
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
76 additions
and
0 deletions.
There are no files selected for viewing
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,76 @@ | ||
# Ubuntu 18.04 Python3 with CUDA 10 and the following: | ||
# - Installs tf-nightly-gpu-2.0-preview | ||
# - Installs requirements.txt for tensorflow/models | ||
|
||
FROM nvidia/cuda:10.0-base-ubuntu18.04 as base | ||
ARG tensorflow_pip_spec="tf-nightly-gpu-2.0-preview" | ||
|
||
# Pick up some TF dependencies | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
build-essential \ | ||
cuda-command-line-tools-10-0 \ | ||
cuda-cublas-10-0 \ | ||
cuda-cufft-10-0 \ | ||
cuda-curand-10-0 \ | ||
cuda-cusolver-10-0 \ | ||
cuda-cusparse-10-0 \ | ||
libcudnn7-dev=7.6.0.64-1+cuda10.0 \ | ||
libcudnn7=7.6.0.64-1+cuda10.0 \ | ||
libfreetype6-dev \ | ||
libhdf5-serial-dev \ | ||
libzmq3-dev \ | ||
libpng-dev \ | ||
pkg-config \ | ||
software-properties-common \ | ||
unzip \ | ||
lsb-core \ | ||
curl | ||
|
||
RUN apt-get update \ | ||
&& apt-get install -y --no-install-recommends \ | ||
libnvinfer5=5.1.5-1+cuda10.0 \ | ||
libnvinfer-dev=5.1.5-1+cuda10.0 \ | ||
&& apt-get clean | ||
|
||
# For CUDA profiling, TensorFlow requires CUPTI. | ||
ENV LD_LIBRARY_PATH /usr/local/cuda/extras/CUPTI/lib64:$LD_LIBRARY_PATH | ||
|
||
# See http://bugs.python.org/issue19846 | ||
ENV LANG C.UTF-8 | ||
|
||
# Add google-cloud-sdk to the source list | ||
RUN echo "deb http://packages.cloud.google.com/apt cloud-sdk-$(lsb_release -c -s) main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list | ||
RUN curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | ||
|
||
# Install extras needed by most models | ||
RUN apt-get update && apt-get install -y --no-install-recommends \ | ||
git \ | ||
build-essential \ | ||
ca-certificates \ | ||
wget \ | ||
htop \ | ||
zip \ | ||
google-cloud-sdk | ||
|
||
# Install / update Python and Python3 | ||
RUN apt-get install -y --no-install-recommends \ | ||
python3 \ | ||
python3-dev \ | ||
python3-pip \ | ||
python3-setuptools \ | ||
python3-venv | ||
|
||
|
||
# Setup Python3 environment | ||
RUN pip3 install --upgrade pip==9.0.1 | ||
# setuptools upgraded to fix install requirements from model garden. | ||
RUN pip3 install --upgrade setuptools google-api-python-client pyyaml google-cloud google-cloud-bigquery | ||
RUN pip3 install wheel absl-py | ||
RUN pip3 install --upgrade --force-reinstall ${tensorflow_pip_spec} | ||
RUN pip3 install tfds-nightly | ||
RUN pip3 install -U scikit-learn | ||
|
||
RUN curl https://raw.githubusercontent.com/tensorflow/models/master/official/requirements.txt > /tmp/requirements.txt | ||
RUN pip3 install -r /tmp/requirements.txt | ||
|
||
RUN pip3 freeze |