-
Notifications
You must be signed in to change notification settings - Fork 9
/
Dockerfile
74 lines (66 loc) · 1.57 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
66
67
68
69
70
FROM nvidia/cuda:7.5-cudnn3-devel
MAINTAINER Chip Garner <chip@garnertotalenergy.com>
RUN mkdir OpenCV && cd OpenCV
RUN apt-get update && apt-get install -y \
build-essential \
checkinstall \
cmake \
pkg-config \
yasm \
libtiff5-dev \
libjpeg-dev \
libjasper-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libdc1394-22-dev \
libxine-dev \
libgstreamer0.10-dev \
libgstreamer-plugins-base0.10-dev \
libv4l-dev \
python-dev \
python-numpy \
python-pip \
libtbb-dev \
libeigen3-dev \
libqt4-dev \
libgtk2.0-dev \
# Doesn't work libfaac-dev \
libmp3lame-dev \
libopencore-amrnb-dev \
libopencore-amrwb-dev \
libtheora-dev \
libvorbis-dev \
libxvidcore-dev \
x264 \
v4l-utils \
# Doesn't work ffmpeg \
libgtk2.0-dev \
# zlib1g-dev \
# libavcodec-dev \
unzip \
wget
RUN cd /opt && \
wget https://github.com/Itseez/opencv/archive/3.1.0.zip -O opencv-3.1.0.zip -nv && \
unzip opencv-3.1.0.zip && \
cd opencv-3.1.0 && \
rm -rf build && \
mkdir build && \
cd build && \
cmake -D CUDA_ARCH_BIN=3.2 \
-D CUDA_ARCH_PTX=3.2 \
-D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D WITH_TBB=ON \
-D BUILD_NEW_PYTHON_SUPPORT=ON \
-D WITH_V4L=ON \
-D BUILD_TIFF=ON \
-D WITH_QT=ON \
# -D USE_GStreamer=ON \
-D WITH_OPENGL=ON .. && \
make -j4 && \
make install && \
echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf.d/opencv.conf && \
ldconfig
ln /dev/null /dev/raw1394
RUN cp /opt/opencv-3.1.0/build/lib/cv2.so /usr/lib/python2.7/dist-packages/cv2.so