| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -21,11 +21,6 @@ RUN sed -i "s/httpredir.debian.org/debian.uchicago.edu/" /etc/apt/sources.list & | |||
| 21 | 21 | apt-get -y install cmake && \ | |
| 22 | 22 | /tmp/clean-layer.sh | |
| 23 | 23 | ||
| 24 | - # Tensorflow doesn't support python 3.7 yet. See https://github.com/tensorflow/tensorflow/issues/20517 | ||
| 25 | - # Fix to install Tensorflow: Downgrade python 3.7->3.6.6. | ||
| 26 | - RUN conda install -y python=3.6.6 && \ | ||
| 27 | - /tmp/clean-layer.sh | ||
| 28 | - | ||
| 29 | 24 | # The anaconda base image includes outdated versions of these packages. Update them to include the latest version. | |
| 30 | 25 | RUN pip install --upgrade seaborn python-dateutil dask && \ | |
| 31 | 26 | pip install pyyaml joblib pytagcloud husl geopy ml_metrics mne pyshp && \ | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,7 @@ | |||
| 1 | 1 | ARG BASE_TAG=staging | |
| 2 | 2 | ||
| 3 | 3 | FROM nvidia/cuda:9.2-cudnn7-devel-ubuntu16.04 AS nvidia | |
| 4 | - FROM gcr.io/kaggle-images/python-tensorflow-whl:1.12.0-py36 as tensorflow_whl | ||
| 4 | + FROM gcr.io/kaggle-images/python-tensorflow-whl:1.13.1-py36 as tensorflow_whl | ||
| 5 | 5 | FROM gcr.io/kaggle-images/python:${BASE_TAG} | |
| 6 | 6 | ||
| 7 | 7 | ADD clean-layer.sh /tmp/clean-layer.sh | |
@@ -13,8 +13,8 @@ COPY --from=nvidia /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d/cuda.gpg | |||
| 13 | 13 | ||
| 14 | 14 | # Ensure the cuda libraries are compatible with the custom Tensorflow wheels. | |
| 15 | 15 | # TODO(b/120050292): Use templating to keep in sync or COPY installed binaries from it. | |
| 16 | - ENV CUDA_VERSION=9.2.148 | ||
| 17 | - ENV CUDA_PKG_VERSION=9-2=$CUDA_VERSION-1 | ||
| 16 | + ENV CUDA_VERSION=10.1.105 | ||
| 17 | + ENV CUDA_PKG_VERSION=10-1=$CUDA_VERSION-1 | ||
| 18 | 18 | LABEL com.nvidia.volumes.needed="nvidia_driver" | |
| 19 | 19 | LABEL com.nvidia.cuda.version="${CUDA_VERSION}" | |
| 20 | 20 | ENV PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH} | |
@@ -26,7 +26,7 @@ ENV PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH} | |||
| 26 | 26 | ENV LD_LIBRARY_PATH="/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs" | |
| 27 | 27 | ENV NVIDIA_VISIBLE_DEVICES=all | |
| 28 | 28 | ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility | |
| 29 | - ENV NVIDIA_REQUIRE_CUDA="cuda>=9.2" | ||
| 29 | + ENV NVIDIA_REQUIRE_CUDA="cuda>=10.1" | ||
| 30 | 30 | RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| 31 | 31 | cuda-cupti-$CUDA_PKG_VERSION \ | |
| 32 | 32 | cuda-cudart-$CUDA_PKG_VERSION \ | |
@@ -36,30 +36,33 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |||
| 36 | 36 | cuda-nvml-dev-$CUDA_PKG_VERSION \ | |
| 37 | 37 | cuda-minimal-build-$CUDA_PKG_VERSION \ | |
| 38 | 38 | cuda-command-line-tools-$CUDA_PKG_VERSION \ | |
| 39 | - libcudnn7=7.4.1.5-1+cuda9.2 \ | ||
| 40 | - libcudnn7-dev=7.4.1.5-1+cuda9.2 \ | ||
| 41 | - libnccl2=2.3.7-1+cuda9.2 \ | ||
| 42 | - libnccl-dev=2.3.7-1+cuda9.2 && \ | ||
| 43 | - ln -s /usr/local/cuda-9.2 /usr/local/cuda && \ | ||
| 39 | + libcudnn7=7.5.0.56-1+cuda10.1 \ | ||
| 40 | + libcudnn7-dev=7.5.0.56-1+cuda10.1 \ | ||
| 41 | + libnccl2=2.4.2-1+cuda10.1 \ | ||
| 42 | + libnccl-dev=2.4.2-1+cuda10.1 && \ | ||
| 43 | + ln -s /usr/local/cuda-10.1 /usr/local/cuda && \ | ||
| 44 | 44 | ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 && \ | |
| 45 | 45 | /tmp/clean-layer.sh | |
| 46 | 46 | ||
| 47 | + # TODO(rosbo): given tha pytorch and mxnet and cupy don't have cuda 10.1 versions. | ||
| 48 | + # Consider installing cuda 10.0 | ||
| 49 | + | ||
| 47 | 50 | # Reinstall packages with a separate version for GPU support | |
| 48 | 51 | # Tensorflow | |
| 49 | 52 | COPY --from=tensorflow_whl /tmp/tensorflow_gpu/*.whl /tmp/tensorflow_gpu/ | |
| 50 | 53 | RUN pip uninstall -y tensorflow && \ | |
| 51 | 54 | pip install /tmp/tensorflow_gpu/tensorflow*.whl && \ | |
| 52 | 55 | rm -rf /tmp/tensorflow_gpu && \ | |
| 53 | 56 | conda uninstall -y pytorch-cpu torchvision-cpu && \ | |
| 54 | - conda install -y pytorch torchvision cudatoolkit=9.2 -c pytorch && \ | ||
| 57 | + conda install -y pytorch torchvision cudatoolkit=10.0 -c pytorch && \ | ||
| 55 | 58 | pip uninstall -y mxnet && \ | |
| 56 | 59 | # b/126259508 --no-deps prevents numpy from being downgraded. | |
| 57 | - pip install --no-deps mxnet-cu92 && \ | ||
| 60 | + pip install --no-deps mxnet-cu100 && \ | ||
| 58 | 61 | /tmp/clean-layer.sh | |
| 59 | 62 | ||
| 60 | 63 | # Install GPU-only packages | |
| 61 | 64 | RUN pip install pycuda && \ | |
| 62 | - pip install cupy-cuda92 && \ | ||
| 65 | + pip install cupy-cuda100 && \ | ||
| 63 | 66 | pip install pynvrtc && \ | |
| 64 | 67 | /tmp/clean-layer.sh | |
| 65 | 68 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -28,7 +28,7 @@ ENV PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH} | |||
| 28 | 28 | ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs" | |
| 29 | 29 | ENV NVIDIA_VISIBLE_DEVICES=all | |
| 30 | 30 | ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility | |
| 31 | - ENV NVIDIA_REQUIRE_CUDA="cuda>=9.0" | ||
| 31 | + ENV NVIDIA_REQUIRE_CUDA="cuda>=10.1" | ||
| 32 | 32 | RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| 33 | 33 | cuda-cupti-$CUDA_PKG_VERSION \ | |
| 34 | 34 | cuda-cudart-$CUDA_PKG_VERSION \ | |
@@ -49,7 +49,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ | |||
| 49 | 49 | # Install bazel | |
| 50 | 50 | # Tensorflow 1.13 requires the Bazel 0.19.2: https://www.tensorflow.org/install/source | |
| 51 | 51 | ENV BAZEL_VERSION=0.19.2 | |
| 52 | - RUN apt-get update && apt-get install -y gnupg zip && \ | ||
| 52 | + RUN apt-get install -y gnupg zip && \ | ||
| 53 | 53 | echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list && \ | |
| 54 | 54 | echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list && \ | |
| 55 | 55 | apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys --no-tty EEA14886 C857C906 2B90D010 && \ | |
@@ -65,14 +65,13 @@ RUN apt-get update && apt-get install -y gnupg zip && \ | |||
| 65 | 65 | dpkg -i bazel_*.deb && \ | |
| 66 | 66 | rm bazel_*.deb | |
| 67 | 67 | ||
| 68 | - # Tensorflow doesn't support python 3.7 yet. See https://github.com/tensorflow/tensorflow/issues/20517 | ||
| 69 | - RUN conda install -y python=3.6.6 | ||
| 70 | - | ||
| 71 | - # Fetch tensorflow | ||
| 68 | + # Fetch tensorflow & install dependencies. | ||
| 72 | 69 | RUN cd /usr/local/src && \ | |
| 73 | 70 | git clone https://github.com/tensorflow/tensorflow && \ | |
| 74 | 71 | cd tensorflow && \ | |
| 75 | - git checkout r1.13 | ||
| 72 | + git checkout r1.13 && \ | ||
| 73 | + pip install keras_applications --no-deps && \ | ||
| 74 | + pip install keras_preprocessing --no-deps | ||
| 76 | 75 | ||
| 77 | 76 | # Create a tensorflow wheel for CPU | |
| 78 | 77 | RUN cd /usr/local/src/tensorflow && \ | |
| Back | FazBrowse Home | New Git URL |
0 commit comments