b943176d2a
- 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
48 linhas
1.4 KiB
Docker
48 linhas
1.4 KiB
Docker
FROM nvidia/cuda:8.0-cudnn5-devel
|
|
|
|
ENV CONDA_DIR /opt/conda
|
|
ENV PATH $CONDA_DIR/bin:$PATH
|
|
|
|
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-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
|
|
|
|
RUN useradd -m -s /bin/bash -N -u $NB_UID $NB_USER && \
|
|
mkdir -p $CONDA_DIR && \
|
|
chown keras $CONDA_DIR -R && \
|
|
mkdir -p /src && \
|
|
chown keras /src
|
|
|
|
USER keras
|
|
|
|
# Python
|
|
ARG python_version=3.5
|
|
|
|
RUN conda install -y python=${python_version} && \
|
|
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
|
|
|
|
ADD theanorc /home/keras/.theanorc
|
|
|
|
ENV PYTHONPATH='/src/:$PYTHONPATH'
|
|
|
|
WORKDIR /src
|
|
|
|
EXPOSE 8888
|
|
|
|
CMD jupyter notebook --port=8888 --ip=0.0.0.0
|
|
|