Skip to content

Commit 3360793

Browse files
authored
Merge pull request #447 from peterbraden/fixes
Dockerfile for opencv3
2 parents 0677e83 + 25387ea commit 3360793

File tree

1 file changed

+74
-10
lines changed

1 file changed

+74
-10
lines changed

Dockerfile

Lines changed: 74 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,80 @@
44
# 2) Build: wget https://raw.github.com/dotcloud/docker/v0.1.6/contrib/docker-build/docker-build && python docker-build $USER/node-opencv < Dockerfile
55
# 3) Test: docker run $USER/node-opencv node -e "console.log(require('opencv').version)"
66
#
7-
# VERSION 0.2
7+
# VERSION 0.3
88
# DOCKER-VERSION 8.1.2
99

10+
1011
# update to 14.04
11-
from ubuntu:14.04
12-
run apt-get update -qq
13-
run apt-get install -y software-properties-common python-software-properties
14-
run add-apt-repository -y ppa:kubuntu-ppa/backports
15-
run apt-get update
16-
run apt-get install -y libcv-dev libcvaux-dev libhighgui-dev libopencv-dev
17-
run curl -sL https://deb.nodesource.com/setup | bash -
18-
run apt-get install -y nodejs
19-
run npm install opencv || cat npm-debug.log
12+
FROM ubuntu:14.04
13+
14+
# listing myself as maintainer of _this_ Dockerfile, though I am not the author of the install script (credit to http://rodrigoberriel.com/)
15+
MAINTAINER borromeotlhs@gmail.com
16+
17+
# run Rodrigo Berriel’s script for installing opencv3 on Ubuntu 14.04
18+
# I’ll convert this into a full Dockerfile later, once I see if it works
19+
#COPY ./install-opencv3.sh /tmp/
20+
21+
# this is needed as libfaac-dev comes from multiverse, according to:
22+
# http://superuser.com/questions/467774/how-to-install-libfaac-dev
23+
RUN echo "deb http://us.archive.ubuntu.com/ubuntu/ precise multiverse\n\
24+
deb-src http://us.archive.ubuntu.com/ubuntu/ precise multiverse\n\
25+
deb http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse\n\
26+
deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates multiverse\n"\
27+
>> /etc/apt/sources.list
28+
29+
30+
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
31+
software-properties-common
32+
RUN add-apt-repository ppa:george-edison55/cmake-3.x
33+
RUN apt-get update -qq
34+
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y \
35+
curl \
36+
cmake \
37+
wget \
38+
unzip \
39+
libopencv-dev \
40+
build-essential \
41+
git \
42+
libgtk2.0-dev \
43+
pkg-config \
44+
python-dev \
45+
python-numpy \
46+
libdc1394-22 \
47+
libdc1394-22-dev \
48+
libjpeg-dev \
49+
libpng12-dev \
50+
libtiff4-dev \
51+
libjasper-dev \
52+
libavcodec-dev \
53+
libavformat-dev \
54+
libswscale-dev \
55+
libxine-dev \
56+
libgstreamer0.10-dev \
57+
libgstreamer-plugins-base0.10-dev \
58+
libv4l-dev \
59+
libtbb-dev \
60+
libqt4-dev \
61+
libfaac-dev \
62+
libmp3lame-dev \
63+
libopencore-amrnb-dev \
64+
libopencore-amrwb-dev \
65+
libtheora-dev \
66+
libvorbis-dev \
67+
libxvidcore-dev \
68+
x264 \
69+
v4l-utils
70+
71+
RUN mkdir opencv
72+
WORKDIR opencv
73+
74+
RUN wget https://github.com/Itseez/opencv/archive/3.0.0.zip -O opencv-3.0.0.zip
75+
RUN unzip opencv-3.0.0.zip
76+
RUN mkdir opencv-3.0.0/build
77+
WORKDIR opencv-3.0.0/build
78+
79+
RUN cmake -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 WITH_OPENGL=ON ..
80+
81+
RUN make -j $(nproc) && make install
82+
RUN echo "/usr/local/lib" > /etc/ld.so.conf.d/opencv.conf
83+
RUN ldconfig

0 commit comments

Comments
 (0)