Skip to content

Commit 77e7227

Browse files
committed
Dockerfile: Instantiate opencv3 baseline
This should assist in making opencv3 and node-opencv work easier. From logs of this build: -- GDAL: NO -- -- Video I/O: -- DC1394 1.x: NO -- DC1394 2.x: YES (ver 2.2.1) -- FFMPEG: YES -- codec: YES (ver 54.35.0) -- format: YES (ver 54.20.4) -- util: YES (ver 52.3.0) -- swscale: YES (ver 2.1.1) -- resample: NO -- gentoo-style: YES -- GStreamer: -- base: YES (ver 0.10.36) -- video: YES (ver 0.10.36) -- app: YES (ver 0.10.36) -- riff: YES (ver 0.10.36) -- pbutils: YES (ver 0.10.36) -- OpenNI: NO -- OpenNI PrimeSensor Modules: NO -- OpenNI2: NO -- PvAPI: NO -- GigEVisionSDK: NO -- UniCap: NO -- UniCap ucil: NO -- V4L/V4L2: Using libv4l1 (ver 1.0.1) / libv4l2 (ver 1.0.1) -- XIMEA: NO -- Xine: NO -- gPhoto2: NO -- -- Other third-party libraries: -- Use IPP: 8.2.1 [8.2.1] -- at: /opencv/opencv-3.0.0/3rdparty/ippicv/unpack/ippicv_lnx -- Use IPP Async: NO -- Use Eigen: NO -- Use TBB: YES (ver 4.2 interface 7000) -- Use OpenMP: NO -- Use GCD NO -- Use Concurrency NO -- Use C=: NO -- Use pthreads for parallel for: -- NO -- Use Cuda: NO -- Use OpenCL: YES -- -- OpenCL: -- Version: dynamic -- Include path: /opencv/opencv-3.0.0/3rdparty/include/opencl/1.2 -- Use AMDFFT: NO -- Use AMDBLAS: NO -- -- Python 2: -- Interpreter: /usr/bin/python2.7 (ver 2.7.6) -- Libraries: /usr/lib/x86_64-linux-gnu/libpython2.7.so (ver 2.7.6) -- numpy: /usr/lib/python2.7/dist-packages/numpy/core/include (ver 1.8.2) -- packages path: lib/python2.7/dist-packages -- -- Python 3: -- Interpreter: /usr/bin/python3.4 (ver 3.4) -- -- Python (for build): /usr/bin/python2.7 -- -- Java: -- ant: NO -- JNI: NO -- Java wrappers: NO -- Java tests: NO -- -- Matlab: -- mex: NO -- -- Documentation: -- Doxygen: NO -- PlantUML: NO -- -- Tests and samples: -- Tests: YES -- Performance tests: YES -- C/C++ Examples: NO -- -- Install path: /usr/local -- -- cvconfig.h is in: /opencv/opencv-3.0.0/build -- ----------------------------------------------------------------- -- -- Configuring done -- Generating done CMake Warning: Manually-specified variables were not used by the project: BUILD_NEW_PYTHON_SUPPORT -- Build files have been written to: /opencv/opencv-3.0.0/build
1 parent e35522f commit 77e7227

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 [email protected] || 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+
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)