-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
70 lines (56 loc) · 1.58 KB
/
Dockerfile
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
61
62
63
64
65
66
67
68
69
70
FROM ubuntu:14.04
MAINTAINER Nick Mote <[email protected]>
# Pick up some TF dependencies
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
curl \
dos2unix \
libfreetype6-dev \
libpng12-dev \
libzmq3-dev \
nano \
pkg-config \
python \
python-dev \
rsync \
software-properties-common \
unzip \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN curl -O https://bootstrap.pypa.io/get-pip.py && \
python get-pip.py && \
rm get-pip.py
RUN pip --no-cache-dir install \
ipykernel \
jupyter \
matplotlib \
numpy \
scipy \
seaborn \
sklearn \
pandas \
pymysql \
Pillow \
&& \
python -m ipykernel.kernelspec
RUN mkdir /notebooks
# Copy TensorFlow CPU version from local repo
COPY src/tensorflow-0.12.1-cp27-none-linux_x86_64.whl /tensorflow-0.12.1-cp27-none-linux_x86_64.whl
# Install TensorFlow
RUN pip install /tensorflow-0.12.1-cp27-none-linux_x86_64.whl
# Set up our notebook config.
COPY config/jupyter_notebook_config.py /root/.jupyter/
# Jupyter has issues with being run directly:
# https://github.com/ipython/ipython/issues/7062
# We just add a little wrapper script.
COPY config/run_jupyter.sh /
#Windows docker can add extra return spaces to sh files that create errors. dos2unix removes those
RUN dos2unix /run_jupyter.sh
# TensorBoard
EXPOSE 6006
# IPython
EXPOSE 8888
WORKDIR "/"
RUN chmod +x /run_jupyter.sh
CMD ["/run_jupyter.sh"]