-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-opencv34-py27-cpu
66 lines (64 loc) · 1.28 KB
/
Dockerfile-opencv34-py27-cpu
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
FROM alpine:3.8
RUN apk add --update --no-cache \
alpine-sdk \
binutils \
build-base \
bzip2 \
clang-dev \
cmake \
curl \
ffmpeg \
ffmpeg-dev \
gcc \
gfortran \
git \
libavc1394 \
libavc1394-dev \
libc6-compat \
libdc1394 \
libdc1394-dev \
libgphoto2-dev \
libjpeg \
libjpeg-turbo-dev \
libpng \
libpng-dev \
libtheora-dev \
linux-headers \
ltb-project-ssp \
make \
musl-dev \
openblas-dev \
protobuf \
py-numpy-dev \
py2-numpy \
py2-pip \
python2-dev \
qt-dev \
tiff-dev \
unzip \
v4l-utils \
wget \
x264 \
yasm
# Install opencv
WORKDIR /opencv
RUN wget -O opencv.zip https://github.com/opencv/opencv/archive/3.4.0.zip
RUN unzip opencv.zip
WORKDIR /opencv/opencv-3.4.0/build
RUN cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr \
-D INSTALL_C_EXAMPLES=OFF \
-D INSTALL_PYTHON_EXAMPLES=OFF \
-D WITH_TBB=ON \
-D WITH_V4L=ON \
-D WITH_QT=OFF \
-D WITH_OPENGL=ON \
-D BUILD_DOCS=OFF \
-D BUILD_PERF_TESTS=OFF \
-D BUILD_TESTS=OFF \
-D BUILD_opencv_apps=OFF \
-D BUILD_EXAMPLES=OFF ..
RUN make
RUN make install
WORKDIR /
RUN python2 -c 'import cv2' && rm -rf /opencv