File tree Expand file tree Collapse file tree 2 files changed +67
-1
lines changed
Expand file tree Collapse file tree 2 files changed +67
-1
lines changed Original file line number Diff line number Diff line change 1+ FROM python:3.6
2+ MAINTAINER glw <https://github.com/glw/docker-python3-opencv>
3+
4+ # Thanks to Josip Janzic <josip.janzic@gmail.com> for Opencv installation Dockerfile
5+
6+ RUN apt-get update && \
7+ apt-get install -y \
8+ build-essential \
9+ cmake \
10+ g++ \
11+ git \
12+ wget \
13+ unzip \
14+ yasm \
15+ pkg-config \
16+ libswscale-dev \
17+ libtbb2 \
18+ libtbb-dev \
19+ libjpeg-dev \
20+ libpng-dev \
21+ libtiff-dev \
22+ libjasper-dev \
23+ libavformat-dev \
24+ libpq-dev \
25+ exiv2 \
26+ libexiv2-dev \
27+ libboost-python1.58.0 \
28+ libboost-python-dev \
29+ python-all-dev
30+
31+
32+ RUN pip install numpy py3exiv2
33+
34+ WORKDIR /
35+ ENV OPENCV_VERSION="3.4.1"
36+ RUN wget https://github.com/opencv/opencv/archive/${OPENCV_VERSION}.zip \
37+ && unzip ${OPENCV_VERSION}.zip \
38+ && mkdir /opencv-${OPENCV_VERSION}/cmake_binary \
39+ && cd /opencv-${OPENCV_VERSION}/cmake_binary \
40+ && cmake -DBUILD_TIFF=ON \
41+ -DBUILD_opencv_java=OFF \
42+ -DWITH_CUDA=OFF \
43+ -DENABLE_AVX=ON \
44+ -DWITH_OPENGL=ON \
45+ -DWITH_OPENCL=ON \
46+ -DWITH_IPP=ON \
47+ -DWITH_TBB=ON \
48+ -DWITH_EIGEN=ON \
49+ -DWITH_V4L=ON \
50+ -DBUILD_TESTS=OFF \
51+ -DBUILD_PERF_TESTS=OFF \
52+ -DCMAKE_BUILD_TYPE=RELEASE \
53+ -DCMAKE_INSTALL_PREFIX=$(python3.6 -c "import sys; print(sys.prefix)" ) \
54+ -DPYTHON_EXECUTABLE=$(which python3.6) \
55+ -DPYTHON_INCLUDE_DIR=$(python3.6 -c "from distutils.sysconfig import get_python_inc; print(get_python_inc())" ) \
56+ -DPYTHON_PACKAGES_PATH=$(python3.6 -c "from distutils.sysconfig import get_python_lib; print(get_python_lib())" ) .. \
57+ && make install \
58+ && rm /${OPENCV_VERSION}.zip \
59+ && rm -r /opencv-${OPENCV_VERSION}
Original file line number Diff line number Diff line change 11# docker_python3_opencv_exiv2
2- Docker with python3 opencv and exiv2
2+
3+ Docker image with python 3.6, opencv 3.4.1, and py3exiv2
4+
5+ Usage:
6+
7+ docker run -it garretw/docker_python3_opencv_exiv2 python
8+ >>> import cv2
9+ >>> import py3exiv2
You can’t perform that action at this time.
0 commit comments