Skip to content

Commit 85cec8f

Browse files
committed
OpenCV 3.3.0 version with dnn module in python
1 parent 13556fc commit 85cec8f

File tree

4 files changed

+42
-28
lines changed

4 files changed

+42
-28
lines changed

docker/base/Dockerfile

+35-25
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
FROM ubuntu:trusty
22

3-
RUN apt-get update && apt-get install --fix-missing -y \
3+
# Install build essentials
4+
RUN set -x && \
5+
apt-get update -q && \
6+
apt-get install --no-install-recommends --fix-missing -yq \
47
python \
58
gcc \
69
apt-utils \
@@ -12,32 +15,46 @@ RUN apt-get update && apt-get install --fix-missing -y \
1215
pkg-config \
1316
sqlite3
1417

15-
RUN apt-get install -y \
18+
# Install image libs
19+
RUN set -x && \
20+
apt-get install --no-install-recommends --fix-missing -yq \
1621
libjpeg8-dev \
1722
libtiff4-dev \
1823
libjasper-dev \
1924
libpng12-dev
2025

21-
RUN apt-get install -y \
26+
# Install gtk
27+
RUN set -x && \
28+
apt-get install --no-install-recommends --fix-missing -yq \
2229
libgtk2.0-dev
2330

24-
RUN apt-get install -y \
31+
# Install video libs
32+
RUN set -x && \
33+
apt-get install --no-install-recommends --fix-missing -yq \
2534
libavcodec-dev \
2635
libavformat-dev \
2736
libswscale-dev \
2837
libv4l-dev
2938

30-
RUN pip install numpy
31-
#django \
32-
#cffi \
33-
#virtualenv \
34-
#virtualenvwrapper \
35-
#numpy
36-
37-
#RUN export WORKON_HOME=$HOME/.virtualenvs && \
38-
#source /usr/local/bin/virtualenvwrapper.sh
39-
40-
#RUN mkvirtualenv cv3
39+
# Install ffmpeg
40+
RUN set -x && \
41+
apt-get install --no-install-recommends --fix-missing -yq \
42+
software-properties-common python-software-properties && \
43+
add-apt-repository -y ppa:mc3man/trusty-media && \
44+
apt-get update -q && \
45+
apt-get install --no-install-recommends --fix-missing -yq \
46+
ffmpeg \
47+
libgstreamer1.0-dev libgstreamer0.10-dev \
48+
libgstreamer-plugins-bad0.10-dev gstreamer0.10-plugins-ugly \
49+
libgstreamer-plugins-base0.10-dev gstreamer0.10-plugins-good \
50+
libgstreamer-plugins-bad1.0-dev gstreamer1.0-plugins-ugly \
51+
libgstreamer-plugins-base1.0-dev libgstreamer-plugins-good1.0-dev && \
52+
apt-get autoremove -yq && \
53+
apt-get clean -q && rm -rf /var/lib/apt/lists/*
54+
55+
# Install numpy, uwsgi
56+
RUN pip install numpy uwsgi && \
57+
find / -name '*.py[co]' -delete
4158

4259
# Add source code of OpenCV
4360
COPY opencv/ /facerec/opencv
@@ -75,17 +92,10 @@ ADD opencv_dnn /facerec/opencv_dnn
7592

7693
WORKDIR /facerec/opencv_dnn
7794

78-
RUN make clean && make
95+
#RUN make clean && make
7996

80-
# Add objdetect excecutable to default path
81-
RUN mv objdetect /usr/bin
97+
## Add objdetect excecutable to default path
98+
#RUN mv objdetect /usr/bin
8299

83100
ENV LD_LIBRARY_PATH=/usr/local/lib
84101

85-
# Install ffmpeg
86-
RUN apt-get install -y software-properties-common python-software-properties && \
87-
add-apt-repository -y ppa:mc3man/trusty-media && \
88-
apt-get update && \
89-
apt-get install -y \
90-
ffmpeg
91-

docker/web/Dockerfile

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@ FROM opencv
22

33
ADD requirements.txt /tmp
44

5-
RUN pip install -r /tmp/requirements.txt
5+
#RUN pip install -U setuptools pip && \
6+
#find / -name '*.py[co]' -delete
7+
8+
RUN pip install -r /tmp/requirements.txt && \
9+
find / -name '*.py[co]' -delete
610

711
# Add source code
812
COPY docker /facerec/docker

opencv

Submodule opencv updated 1422 files

opencv_contrib

Submodule opencv_contrib updated 533 files

0 commit comments

Comments
 (0)