-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile.cv320
More file actions
54 lines (49 loc) · 1.78 KB
/
Dockerfile.cv320
File metadata and controls
54 lines (49 loc) · 1.78 KB
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
FROM ubuntu:16.04
MAINTAINER Daniel D <djx339@gmail.com>
ENV OPENCV_VERSION 3.2.0
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
cmake \
git \
libavcodec-dev \
libavformat-dev \
libdc1394-22-dev \
libgtk2.0-dev \
libjasper-dev \
libjpeg-dev \
libpng-dev \
libswscale-dev \
libtbb-dev \
libtbb2 \
libtiff-dev \
pkg-config \
python3 \
python3-dev \
python3-pip \
wget \
&& pip3 install -U pip setuptools wheel \
&& apt-get purge -y python3-pip \
&& hash -r \
&& pip3 install numpy \
&& git clone --depth 1 --branch ${OPENCV_VERSION} https://github.com/Itseez/opencv.git /tmp/opencv \
&& git clone --depth 1 --branch ${OPENCV_VERSION} https://github.com/opencv/opencv_contrib.git /tmp/opencv_contrib \
&& mkdir /tmp/opencv/build \
&& cd /tmp/opencv/build \
&& cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D BUILD_PYTHON_SUPPORT=ON \
-D PYTHON_DEFAULT_EXECUTABLE=/usr/bin/python3 \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=/tmp/opencv_contrib/modules \
-D BUILD_EXAMPLES=OFF \
-D WITH_IPP=OFF \
-D WITH_FFMPEG=ON \
-D WITH_V4L=ON .. \
&& make -j$(nproc) && make install && ldconfig \
&& apt-get remove -y \
build-essential cmake git libatlas-base-dev gfortran \
libjasper-dev libgtk2.0-dev libavcodec-dev libavformat-dev \
libswscale-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libv4l-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /tmp/opencv \
&& rm -rf /tmp/opencv_contrib