From b943176d2adec283e2bb4a4914c224681ed5a728 Mon Sep 17 00:00:00 2001 From: Durgesh Mankekar Date: Mon, 3 Apr 2017 11:33:41 -0400 Subject: [PATCH] Update docker files to TensorFlow 1, Theano 0.9 (#6116) - TensorFlow 1 - Theano 0.9 : also use "device=cuda" in theanorc to use new "gpuarray" backend - Miniconda 4.2.12 (latest conda installer with python 3.5) - Simplified pip install for tensorflow and keras test dependencies --- docker/Dockerfile | 21 +++++++++++---------- docker/theanorc | 2 +- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index 28825b57..857c39d6 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -7,10 +7,10 @@ RUN mkdir -p $CONDA_DIR && \ echo export PATH=$CONDA_DIR/bin:'$PATH' > /etc/profile.d/conda.sh && \ apt-get update && \ apt-get install -y wget git libhdf5-dev g++ graphviz && \ - wget --quiet https://repo.continuum.io/miniconda/Miniconda3-3.9.1-Linux-x86_64.sh && \ - echo "6c6b44acdd0bc4229377ee10d52c8ac6160c336d9cdd669db7371aa9344e1ac3 *Miniconda3-3.9.1-Linux-x86_64.sh" | sha256sum -c - && \ - /bin/bash /Miniconda3-3.9.1-Linux-x86_64.sh -f -b -p $CONDA_DIR && \ - rm Miniconda3-3.9.1-Linux-x86_64.sh + wget --quiet https://repo.continuum.io/miniconda/Miniconda3-4.2.12-Linux-x86_64.sh && \ + echo "c59b3dd3cad550ac7596e0d599b91e75d88826db132e4146030ef471bb434e9a *Miniconda3-4.2.12-Linux-x86_64.sh" | sha256sum -c - && \ + /bin/bash /Miniconda3-4.2.12-Linux-x86_64.sh -f -b -p $CONDA_DIR && \ + rm Miniconda3-4.2.12-Linux-x86_64.sh ENV NB_USER keras ENV NB_UID 1000 @@ -24,13 +24,14 @@ RUN useradd -m -s /bin/bash -N -u $NB_UID $NB_USER && \ USER keras # Python -ARG python_version=3.5.2 -ARG tensorflow_version=0.12.0rc0-cp35-cp35m +ARG python_version=3.5 + RUN conda install -y python=${python_version} && \ - pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-${tensorflow_version}-linux_x86_64.whl && \ - pip install git+git://github.com/Theano/Theano.git && \ - pip install ipdb pytest pytest-cov python-coveralls coverage==3.7.1 pytest-xdist pep8 pytest-pep8 pydot_ng && \ - conda install Pillow scikit-learn notebook pandas matplotlib nose pyyaml six h5py && \ + pip install --upgrade pip && \ + pip install tensorflow-gpu && \ + conda install Pillow scikit-learn notebook pandas matplotlib mkl nose pyyaml six h5py && \ + conda install theano pygpu && \ + git clone git://github.com/fchollet/keras.git /src && pip install -e /src[tests] && \ pip install git+git://github.com/fchollet/keras.git && \ conda clean -yt diff --git a/docker/theanorc b/docker/theanorc index 85592e93..14c09918 100644 --- a/docker/theanorc +++ b/docker/theanorc @@ -1,5 +1,5 @@ [global] floatX = float32 optimizer=None -device = gpu +device = cuda