forked from andreivmaksimov/python_data_science
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
51 lines (43 loc) · 1.63 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
FROM ubuntu:16.04 as opencv-builder
MAINTAINER "Andrei Maksimov"
RUN apt-get update && apt-get install -y wget ca-certificates \
build-essential cmake pkg-config \
libjpeg8-dev libtiff5-dev libjasper-dev libpng12-dev \
libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \
libxvidcore-dev libx264-dev \
libgtk-3-dev \
libatlas-base-dev gfortran \
git curl vim python3-dev python3-pip \
libfreetype6-dev libhdf5-dev && \
rm -rf /var/lib/apt/lists/*
RUN wget -O opencv.tar.gz https://github.com/opencv/opencv/archive/3.3.1.tar.gz && \
tar zxvf opencv.tar.gz && \
wget -O opencv_contrib.tar.gz https://github.com/opencv/opencv_contrib/archive/3.3.1.tar.gz && \
tar zxvf opencv_contrib.tar.gz
RUN cd opencv-3.3.1 && \
mkdir build && \
cd build && \
cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D INSTALL_PYTHON_EXAMPLES=ON \
-D INSTALL_C_EXAMPLES=OFF \
-D OPENCV_EXTRA_MODULES_PATH=../../opencv_contrib-3.3.1/modules \
-D BUILD_EXAMPLES=ON .. && \
make -j4 && \
make install && \
ldconfig && \
cd / && rm -Rf /opencv-3.3.1 /opencv_contrib-3.3.1
RUN pip3 install --upgrade pip && \
pip3 install tensorflow && \
pip3 install numpy pandas sklearn matplotlib seaborn jupyter pyyaml h5py && \
pip3 install keras --no-deps && \
pip3 install opencv-python && \
pip3 install imutils
RUN ["mkdir", "notebooks"]
COPY conf/.jupyter /root/.jupyter
COPY run_jupyter.sh /
# Jupyter and Tensorboard ports
EXPOSE 8888 6006
# Store notebooks in this mounted directory
VOLUME /notebooks
CMD ["/run_jupyter.sh"]