forked from julianbei/alpine-opencv-microimage
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
61 lines (54 loc) · 1.22 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
#1 from base alpine
FROM alpine:3.5
#2 Add Edge and bleeding repos
RUN echo -e '@edgunity http://nl.alpinelinux.org/alpine/edge/community\n@edge http://nl.alpinelinux.org/alpine/edge/main\n@testing http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories
#3 upgrade System
RUN apk update && apk upgrade
#4
RUN apk add --update \
python3 \
python3-dev \
make \
cmake \
gcc \
g++ \
git \
pkgconf \
unzip \
wget \
py-pip \
build-base \
gsl \
libavc1394-dev \
libtbb@testing \
libtbb-dev@testing \
libjpeg \
libjpeg-turbo-dev \
libpng-dev \
libjasper \
libdc1394-dev \
clang-dev \
clang \
tiff-dev \
libwebp-dev \
py-numpy-dev \
py-scipy-dev@testing \
openblas-dev \
linux-headers
#5 defining compilers
ENV CC /usr/bin/clang
ENV CXX /usr/bin/clang++
#6 opencv3
RUN mkdir /opt && cd /opt && \
wget https://github.com/opencv/opencv/archive/3.2.0.zip && \
unzip 3.2.0.zip && \
cd /opt/opencv-3.2.0 && \
mkdir build && \
cd build && \
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_FFMPEG=NO \
-D WITH_IPP=NO -D WITH_OPENEXR=NO .. && \
make VERBOSE=1 && \
make && \
make install
#7 Clean APK cache
RUN rm -rf /var/cache/apk/*