FROM ubuntu:16.10
MAINTAINER Ben Zhang <[email protected]>
## Mandatory update
RUN apt-get update && apt-get upgrade -y
## Prepare the basics
RUN apt-get install -y build-essential cmake pkg-config
## Installing direct dependencies for OpenCV
RUN apt-get install -y libjpeg8-dev libtiff5-dev libjasper-dev libpng-dev \
libavcodec-dev libavformat-dev libswscale-dev libv4l-dev \
libxvidcore-dev libx264-dev \
libgtk-3-dev \
libatlas-base-dev gfortran
## Getting OpenCV ready
WORKDIR /opencv
## Need two more utils
RUN apt-get install -y wget unzip
## Downloading
RUN wget -O opencv.zip https://github.com/opencv/opencv/archive/3.1.0.zip
RUN wget -O opencv_contrib.zip https://github.com/opencv/opencv_contrib/archive/3.1.0.zip
## Unzipping
RUN unzip -q opencv.zip
RUN unzip -q opencv_contrib.zip
## start build
RUN mkdir -p opencv-3.1.0/build
WORKDIR opencv-3.1.0/build
RUN cmake -D CMAKE_BUILD_TYPE=RELEASE \
-D CMAKE_INSTALL_PREFIX=/usr/local \
-D OPENCV_EXTRA_MODULES_PATH=/opencv/opencv_contrib-3.1.0/modules \
-D ENABLE_PRECOMPILED_HEADERS=OFF \
..
RUN make install
Content type
Image
Digest
Size
753.4 MB
Last updated
over 9 years ago
docker pull nebgnahz/opencv