-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
65 lines (64 loc) · 1.29 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
FROM ubuntu:20.04
ENV TZ=Europe/Moscow
ENV opencvVersion=4.5.3-openvino-2021.4.2
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install -y \
build-essential \
cmake \
gcc \
g++ \
make \
wget \
unzip \
pkg-config \
python3-dev \
python3-pip \
python3-numpy \
libtbb2 \
libtbb-dev \
libjpeg-dev \
libpng-dev \
libtiff-dev \
libgtk2.0-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libdc1394-22-dev \
libeigen3-dev \
libtheora-dev \
libvorbis-dev \
libxvidcore-dev \
libx264-dev \
sphinx-common \
yasm \
libfaac-dev \
libopencore-amrnb-dev \
libopencore-amrwb-dev \
libopenexr-dev \
libgstreamer-plugins-base1.0-dev \
libavutil-dev \
libavfilter-dev \
libavresample-dev && \
apt-get clean autoclean && \
apt-get autoremove --yes && \
rm -rf /var/lib/{apt,dpkg,cache,log}
WORKDIR /opt
RUN wget -O opencv.zip https://github.com/opencv/opencv/archive/${opencvVersion}.zip && \
unzip opencv.zip && \
rm opencv.zip && \
mv opencv-${opencvVersion} opencv && \
mkdir /opt/opencv/build && \
cd /opt/opencv/build && \
cmake \
-D OPENCV_ENABLE_NONFREE=ON \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D BUILD_EXAMPLES=OFF \
-D OPENCV_GENERATE_PKGCONFIG=ON \
-D ENABLE_PRECOMPILED_HEADERS=OFF \
-D BUILD_TESTS=OFF \
-D BUILD_PERF_TESTS=OFF \
.. && \
make -j2 && \
make -j2 install && \
cd && \
rm -rf /opt/opencv