Skip to content

Commit d0b1a4a

Browse files
committed
Adjust build sequence
1 parent 3d9eafa commit d0b1a4a

File tree

1 file changed

+1
-15
lines changed

1 file changed

+1
-15
lines changed

Dockerfile

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,7 @@
11
FROM kaggle/python0:latest
22

33
# Install OpenCV-3 with Python support
4-
RUN apt-get update && \
5-
# The apt-get version of imagemagick has gone mad, and wants to remove sysvinit.
6-
apt-get -y build-dep imagemagick && \
7-
wget http://www.imagemagick.org/download/ImageMagick-6.9.3-0.tar.gz && \
8-
tar xzf ImageMagick-6.9.3-0.tar.gz && cd ImageMagick-6.9.3-0 && ./configure && \
9-
make && make install && \
10-
apt-get -y install libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev && \
11-
apt-get -y install libtbb2 libtbb-dev libjpeg-dev libtiff-dev libjasper-dev && \
12-
# apt-get gives you cmake 2.8, which fails to find Py3.4's libraries and headers. The current
13-
# version is cmake 3.2, which does.
14-
cd /usr/local/src && git clone https://github.com/Kitware/CMake.git && \
15-
# --system-curl needed for OpenCV's IPP download, see https://stackoverflow.com/questions/29816529/unsupported-protocol-while-downlod-tar-gz-package/32370027#32370027
16-
cd CMake && ./bootstrap --system-curl && make && make install && \
17-
cd /usr/local/src && git clone https://github.com/Itseez/opencv.git && \
18-
cd /usr/local/src/opencv && \
4+
RUN cd /usr/local/src/opencv && \
195
mkdir build && cd build && \
206
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D WITH_FFMPEG=OFF -D WITH_V4L=ON -D WITH_QT=OFF -D WITH_OPENGL=ON -D PYTHON3_LIBRARY=/opt/conda/lib/libpython3.4m.so -D PYTHON3_INCLUDE_DIR=/opt/conda/include/python3.4m/ -D PYTHON_LIBRARY=/opt/conda/lib/libpython3.4m.so -D PYTHON_INCLUDE_DIR=/opt/conda/include/python3.4m/ .. && \
217
make -j $(nproc) && make install && \

0 commit comments

Comments
 (0)