FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

update to python 3.7 · tieonlinux/docker-python@a72c378 · GitHub

Commit a72c378

Browse files
committed
update to python 3.7
1 parent 7fa5016 commit a72c378

3 files changed

Lines changed: 21 additions & 24 deletions

File tree

‎Dockerfile‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,6 @@ RUN sed -i "s/httpredir.debian.org/debian.uchicago.edu/" /etc/apt/sources.list &
2121
apt-get -y install cmake && \
2222
/tmp/clean-layer.sh
2323

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-
2924
# The anaconda base image includes outdated versions of these packages. Update them to include the latest version.
3025
RUN pip install --upgrade seaborn python-dateutil dask && \
3126
pip install pyyaml joblib pytagcloud husl geopy ml_metrics mne pyshp && \

‎gpu.Dockerfile‎

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
ARG BASE_TAG=staging
22

33
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
55
FROM gcr.io/kaggle-images/python:${BASE_TAG}
66

77
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
1313

1414
# Ensure the cuda libraries are compatible with the custom Tensorflow wheels.
1515
# 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
1818
LABEL com.nvidia.volumes.needed="nvidia_driver"
1919
LABEL com.nvidia.cuda.version="${CUDA_VERSION}"
2020
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}
2626
ENV LD_LIBRARY_PATH="/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs"
2727
ENV NVIDIA_VISIBLE_DEVICES=all
2828
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
29-
ENV NVIDIA_REQUIRE_CUDA="cuda>=9.2"
29+
ENV NVIDIA_REQUIRE_CUDA="cuda>=10.1"
3030
RUN apt-get update && apt-get install -y --no-install-recommends \
3131
cuda-cupti-$CUDA_PKG_VERSION \
3232
cuda-cudart-$CUDA_PKG_VERSION \
@@ -36,30 +36,33 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
3636
cuda-nvml-dev-$CUDA_PKG_VERSION \
3737
cuda-minimal-build-$CUDA_PKG_VERSION \
3838
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 && \
4444
ln -s /usr/local/cuda/lib64/stubs/libcuda.so /usr/local/cuda/lib64/stubs/libcuda.so.1 && \
4545
/tmp/clean-layer.sh
4646

47+
# TODO(rosbo): given tha pytorch and mxnet and cupy don't have cuda 10.1 versions.
48+
# Consider installing cuda 10.0
49+
4750
# Reinstall packages with a separate version for GPU support
4851
# Tensorflow
4952
COPY --from=tensorflow_whl /tmp/tensorflow_gpu/*.whl /tmp/tensorflow_gpu/
5053
RUN pip uninstall -y tensorflow && \
5154
pip install /tmp/tensorflow_gpu/tensorflow*.whl && \
5255
rm -rf /tmp/tensorflow_gpu && \
5356
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 && \
5558
pip uninstall -y mxnet && \
5659
# b/126259508 --no-deps prevents numpy from being downgraded.
57-
pip install --no-deps mxnet-cu92 && \
60+
pip install --no-deps mxnet-cu100 && \
5861
/tmp/clean-layer.sh
5962

6063
# Install GPU-only packages
6164
RUN pip install pycuda && \
62-
pip install cupy-cuda92 && \
65+
pip install cupy-cuda100 && \
6366
pip install pynvrtc && \
6467
/tmp/clean-layer.sh
6568

‎tensorflow-whl/Dockerfile‎

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ ENV PATH=/usr/local/nvidia/bin:/usr/local/cuda/bin:${PATH}
2828
ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/local/nvidia/lib64:/usr/local/cuda/lib64:/usr/local/cuda/lib64/stubs"
2929
ENV NVIDIA_VISIBLE_DEVICES=all
3030
ENV NVIDIA_DRIVER_CAPABILITIES=compute,utility
31-
ENV NVIDIA_REQUIRE_CUDA="cuda>=9.0"
31+
ENV NVIDIA_REQUIRE_CUDA="cuda>=10.1"
3232
RUN apt-get update && apt-get install -y --no-install-recommends \
3333
cuda-cupti-$CUDA_PKG_VERSION \
3434
cuda-cudart-$CUDA_PKG_VERSION \
@@ -49,7 +49,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
4949
# Install bazel
5050
# Tensorflow 1.13 requires the Bazel 0.19.2: https://www.tensorflow.org/install/source
5151
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 && \
5353
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list && \
5454
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list && \
5555
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 && \
6565
dpkg -i bazel_*.deb && \
6666
rm bazel_*.deb
6767

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.
7269
RUN cd /usr/local/src && \
7370
git clone https://github.com/tensorflow/tensorflow && \
7471
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
7675

7776
# Create a tensorflow wheel for CPU
7877
RUN cd /usr/local/src/tensorflow && \

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL