1
1
FROM ubuntu:trusty
2
2
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 \
4
7
python \
5
8
gcc \
6
9
apt-utils \
@@ -12,32 +15,46 @@ RUN apt-get update && apt-get install --fix-missing -y \
12
15
pkg-config \
13
16
sqlite3
14
17
15
- RUN apt-get install -y \
18
+ # Install image libs
19
+ RUN set -x && \
20
+ apt-get install --no-install-recommends --fix-missing -yq \
16
21
libjpeg8-dev \
17
22
libtiff4-dev \
18
23
libjasper-dev \
19
24
libpng12-dev
20
25
21
- RUN apt-get install -y \
26
+ # Install gtk
27
+ RUN set -x && \
28
+ apt-get install --no-install-recommends --fix-missing -yq \
22
29
libgtk2.0-dev
23
30
24
- RUN apt-get install -y \
31
+ # Install video libs
32
+ RUN set -x && \
33
+ apt-get install --no-install-recommends --fix-missing -yq \
25
34
libavcodec-dev \
26
35
libavformat-dev \
27
36
libswscale-dev \
28
37
libv4l-dev
29
38
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
41
58
42
59
# Add source code of OpenCV
43
60
COPY opencv/ /facerec/opencv
@@ -75,17 +92,10 @@ ADD opencv_dnn /facerec/opencv_dnn
75
92
76
93
WORKDIR /facerec/opencv_dnn
77
94
78
- RUN make clean && make
95
+ # RUN make clean && make
79
96
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
82
99
83
100
ENV LD_LIBRARY_PATH=/usr/local/lib
84
101
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
-
0 commit comments