-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile-term1
60 lines (49 loc) · 2.1 KB
/
Dockerfile-term1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM nvidia/cuda:8.0-cudnn6-runtime-ubuntu16.04
ENV CONDA_DIR /opt/conda
ENV PATH $CONDA_DIR/bin:$PATH
ARG miniconda_version=4.1.11
#RUN mkdir -p $CONDA_DIR && \
RUN 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-${miniconda_version}-Linux-x86_64.sh -O ~/miniconda.sh && \
/bin/bash ~/miniconda.sh -b -p /opt/conda && \
rm ~/miniconda.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
# Python
# conda remove mkl mkl-service && \ : nomkl (intel math kernel library), instead openblas used to save 100MB space
# You are using pip version 8.1.2, however version 9.0.1 is available. "pip install --upgrade pip" included
ARG python_version=3.5.2
ARG tensorflow_version=0.12.0rc0-cp35-cp35m
RUN conda install -y python=${python_version} && \
pip install --upgrade pip && \
pip install https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-${tensorflow_version}-linux_x86_64.whl && \
pip install ipdb pytest pytest-cov python-coveralls coverage==3.7.1 pytest-xdist pep8 pytest-pep8 pydot_ng && \
conda install nomkl Pillow scikit-learn notebook pandas matplotlib nose pyyaml six h5py && \
pip install moviepy && \
conda clean -yt
# Symbolic link which is not taken care during CUDA/CUDNN installation
RUN export LD_LIBRARY_PATH="/usr/local/cuda/lib64:$LD_LIBRARY_PATH" && \
ln -s /usr/local/cuda/lib64/libcudnn.so.5 /usr/local/cuda/lib64/libcudnn.so
# opencv3
# ffmpeg required for moviepy
RUN apt-get install -y --no-install-recommends libgomp1 libgtk2.0 && \
conda install -c menpo ffmpeg=3.1.3 && \
conda install -c menpo opencv3
# Keras
USER keras
RUN pip install git+git://github.com/fchollet/keras.git
ENV KERAS_BACKEND=tensorflow
ENV PYTHONPATH='/src/:$PYTHONPATH'
WORKDIR /src
# TensorBoard
EXPOSE 6006
# IPython
EXPOSE 8888
CMD ["/bin/bash"]