-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
61 lines (56 loc) · 1.67 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
FROM python:3.5
MAINTAINER Hugo SERRAT <[email protected]>
RUN apt-get update && apt-get install -y build-essential \
cmake \
wget \
git \
unzip \
yasm \
pkg-config \
libjpeg-dev \
libtiff-dev \
libjasper-dev \
libpng-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libv4l-dev \
libatlas-base-dev \
gfortran \
libtbb2 \
libtbb-dev \
libpq-dev \
&& apt-get -y clean all \
&& rm -rf /var/lib/apt/lists/*
RUN pip install numpy
WORKDIR /
RUN wget https://github.com/Itseez/opencv/archive/3.1.0.zip -O opencv.zip \
&& unzip opencv.zip \
&& wget https://github.com/Itseez/opencv_contrib/archive/3.1.0.zip -O opencv_contrib.zip \
&& unzip opencv_contrib \
&& mkdir /opencv-3.1.0/cmake_binary \
&& cd /opencv-3.1.0/cmake_binary \
&& cmake -DOPENCV_EXTRA_MODULES_PATH=/opencv_contrib-3.1.0/modules \
-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 \
-DBUILD_opencv_python3=ON \
-DCMAKE_INSTALL_PREFIX=$(python3.5 -c "import sys; print(sys.prefix)") \
-DPYTHON_EXECUTABLE=$(which python3.5) \
-DPYTHON_INCLUDE_DIR=$(python3.5 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())") \
-DPYTHON_PACKAGES_PATH=$(python3.5 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())") .. \
&& make install \
&& rm /opencv.zip \
&& rm /opencv_contrib.zip \
&& rm -r /opencv-3.1.0 \
&& rm -r /opencv_contrib-3.1.0