-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
70 lines (64 loc) · 1.92 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 tensorflow/tensorflow:latest-gpu-py3
LABEL maintainer="[email protected]"
# OpenCV dependencies
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 \
curl \
nano \
python-pip \
libgtk2.0-dev
# OpenCV
ENV opencv=3.3.1
WORKDIR /
RUN wget https://github.com/opencv/opencv/archive/$opencv.zip \
&& unzip $opencv.zip \
&& mkdir /opencv-$opencv/cmake_binary \
&& cd /opencv-$opencv/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 \
-DWITH_GTK=ON \
-DWITH_GTK_2_X=ON \
-DBUILD_TESTS=OFF \
-DBUILD_PERF_TESTS=OFF \
-DCMAKE_BUILD_TYPE=RELEASE \
-DCMAKE_INSTALL_PREFIX=$(python3 -c "import sys; print(sys.prefix)") \
-DPYTHON_EXECUTABLE=$(which python3) \
-DPYTHON_INCLUDE_DIR=$(python3 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \
-DPYTHON_PACKAGES_PATH=$(python3 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") .. \
&& make install \
&& rm /$opencv.zip
# Cython
RUN pip install --no-cache-dir Cython
# darkflow
RUN git clone https://github.com/thtrieu/darkflow.git \
&& cd darkflow \
&& pip install .
WORKDIR /darkflow
RUN wget https://pjreddie.com/media/files/tiny-yolo-voc.weights -P ./bin
RUN wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/tiny-yolo-voc.cfg -P ./cfg
RUN wget https://pjreddie.com/media/files/yolo.weights -P ./bin
RUN wget https://raw.githubusercontent.com/pjreddie/darknet/master/cfg/yolo.cfg -P ./cfg