-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.cv320
53 lines (48 loc) · 1.73 KB
/
Dockerfile.cv320
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
FROM ubuntu:16.04
MAINTAINER Daniel D <[email protected]>
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 \
python-pip \
python2.7 \
python2.7-dev \
wget \
&& pip install -U pip setuptools wheel \
&& apt-get purge -y python-pip \
&& hash -r \
&& pip 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 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