OpenCV 3.3 in Ubuntu 16:04
1.7K
FROM ubuntu:16.04
# https://github.com/milq/milq/blob/master/scripts/bash/install-opencv.sh
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get -y dist-upgrade && \
apt-get -y autoremove
# 2. INSTALL THE DEPENDENCIES
# Build tools:
RUN apt-get install -y build-essential cmake
# GUI (if you want to use GTK instead of Qt, replace 'qt5-default' with 'libgtkglext1-dev' and remove '-DWITH_QT=ON' option in CMake):
RUN apt-get install -y qt5-default libvtk6-dev
# Media I/O:
RUN apt-get install -y zlib1g-dev \
libjpeg-dev \
libwebp-dev \
libpng-dev \
libtiff5-dev \
libjasper-dev \
libopenexr-dev \
libgdal-dev
# Video I/O:
RUN apt-get install -y libdc1394-22-dev \
libavcodec-dev \
libavformat-dev \
libswscale-dev \
libtheora-dev \
libvorbis-dev \
libxvidcore-dev \
libx264-dev \
yasm \
libopencore-amrnb-dev \
libv4l-dev\
libxine2-dev
# Parallelism and linear algebra libraries:
RUN apt-get install -y libtbb-dev \
libeigen3-dev
# Python:
RUN apt-get install -y \
python-dev \
python-tk \
python-numpy \
python3-dev \
python3-tk \
python-software-properties \
python3-numpy \
python-pip
RUN apt-get update && apt-get install -y \
librdkafka-dev
RUN pip install --upgrade pip
COPY requirements.txt .
RUN pip install -r requirements.txt
# Documentation:
RUN apt-get install -y doxygen
# 3. INSTALL THE LIBRARY
ENV OPENCV_VERSION=3.4.1
RUN apt-get install -y zip unzip wget
RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip && \
unzip ${OPENCV_VERSION}.zip && \
rm ${OPENCV_VERSION}.zip && \
mv opencv-${OPENCV_VERSION} OpenCV
WORKDIR OpenCV
RUN mkdir -p build
WORKDIR build
RUN cmake -DWITH_QT=ON \
-DWITH_OPENGL=ON \
-DFORCE_VTK=ON \
-DWITH_TBB=ON \
-DWITH_GDAL=ON \
-DWITH_XINE=ON \
-DBUILD_EXAMPLES=ON \
-DINSTALL_PYTHON_EXAMPLES=ON \
-DINSTALL_C_EXAMPLES=OFF \
-DENABLE_PRECOMPILED_HEADERS=OFF ..
RUN make clean && make && make install && ldconfig
COPY entrypoint.sh /tmp/entrypoint.sh
RUN chmod +x /tmp/entrypoint.sh
ENTRYPOINT ["/tmp/entrypoint.sh"]
Content type
Image
Digest
Size
900.8 MB
Last updated
over 8 years ago
docker pull innovationericssonspain/opencv