-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile.notebook
78 lines (65 loc) · 2.16 KB
/
Dockerfile.notebook
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
71
72
73
74
75
76
77
FROM continuumio/miniconda3
MAINTAINER dgrossman <[email protected]>
RUN apt-get update && \
apt-get install -y \
build-essential \
cmake \
git \
wget \
unzip \
yasm \
pkg-config \
libswscale-dev \
libtbb2 \
libtbb-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libjasper-dev \
libavformat-dev \
libpq-dev
RUN pip install numpy
WORKDIR /
RUN wget https://github.com/opencv/opencv/archive/3.3.1.zip \
&& unzip 3.3.1.zip \
&& mkdir /opencv-3.3.1/cmake_binary \
&& cd /opencv-3.3.1/cmake_binary \
&& cmake -DBUILD_TIFF=ON \
-DBUILD_opencv_java=OFF \
-DWITH_CUDA=OFF \
-DENABLE_AVX=ON \
-DWITH_OPENGL=ON \
-DWITH_OPENCL=ON \
-DWITH_IPP=ON \
-DWITH_TBB=ON \
-DWITH_EIGEN=ON \
-DWITH_V4L=ON \
-DBUILD_TESTS=OFF \
-DBUILD_PERF_TESTS=OFF \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_INSTALL_PREFIX=$(python3.6 -c "import sys; print(sys.prefix)") \
-DPYTHON_EXECUTABLE=$(which python3.6) \
-DPYTHON_INCLUDE_DIR=$(python3.6 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \
-DPYTHON_PACKAGES_PATH=$(python3.6 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") .. \
&& make install \
&& rm /3.3.1.zip \
&& rm -r /opencv-3.3.1
RUN pip install flake8 pep8 --upgrade
RUN conda install -c menpo dlib=19.4
RUN pip install git+https://github.com/ageitgey/face_recognition_models
RUN pip install scikit-image image tqdm jupyter notebook bokeh sklearn
RUN mkdir /in
RUN mkdir /out
RUN jupyter nbextension enable --py widgetsnbextension
RUN pip install https://github.com/ipython-contrib/jupyter_contrib_nbextensions/tarball/master
RUN pip install jupyter_nbextensions_configurator
RUN jupyter contrib nbextension install --user
RUN jupyter nbextensions_configurator enable --user
RUN conda install ipyparallel
RUN ipcluster nbextension enable
RUN pip install tensorflow==1.2
ADD . /prog
WORKDIR /prog
ENV PYTHONPATH=/prog:$PYTHONPATH
EXPOSE 8888
CMD ["/opt/conda/bin/jupyter","notebook","--allow-root","--port=8888","--ip=0.0.0.0","--no-browser","--NotebookApp.iopub_data_rate_limit=10000000000"]