-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
91 lines (51 loc) · 2.38 KB
/
Dockerfile
File metadata and controls
91 lines (51 loc) · 2.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
FROM ubuntu:16.04
ARG http_proxy
ARG https_proxy
ENV http_proxy ${http_proxy}
ENV https_proxy ${https_proxy}
RUN echo $https_proxy
RUN echo $http_proxy
# Uncomment the two lines below if you wish to use an Ubuntu mirror repository
# that is closer to you (and hence faster). The 'sources.list' file inside the
# 'tools/docker/' folder is set to use one of Ubuntu's official mirror in Taiwan.
# You should update this file based on your own location. For a list of official
# Ubuntu mirror repositories, check out: https://launchpad.net/ubuntu/+archivemirrors
COPY sources.list /etc/apt
RUN rm /var/lib/apt/lists/* -vf
RUN apt-get clean && apt-get update
RUN apt-get install -y -q wget unzip git
WORKDIR /opt
# 1. Download the installation script for OpenCL
RUN wget -O install_OCL_driver2_sh.tgz https://software.intel.com/file/593325/download
RUN tar xf install_OCL_driver2_sh.tgz
RUN mkdir opencl-temp
RUN sh -c '/bin/echo -e "n" | ./install_OCL_driver2.sh install -y --workspace opencl-temp'
## Add user root to the video group
RUN usermod -a -G video root
# 2. Install OpenCV
COPY intel_cv_sdk_ubuntu_r2_2017.0.113.tgz /opt/intel_cv_sdk_ubuntu_r2_2017.0.113.tgz
RUN tar xaf intel_cv_sdk_ubuntu_r2_2017.0.113.tgz
WORKDIR /opt/intel_cv_sdk_ubuntu_r2_2017.0.113
COPY silent.cfg /opt/intel_cv_sdk_ubuntu_r2_2017.0.113/
RUN apt-get install -y cpio
RUN ./install.sh --cli-mode -s silent.cfg
# 3. Install Paho* MQTT* C client libraries dependencies
RUN apt-get install -y libssl-dev ffmpeg lsb-release
WORKDIR /opt
#RUN mkdir /opt/face-access-control
COPY face-access-control /opt/face-access-control/
WORKDIR /opt/face-access-control/cvservice
#RUN ["/bin/bash", "-c", "source /opt/intel/computer_vision_sdk_2017.0.113/bin/setupvars.sh"]
RUN mkdir build
WORKDIR /opt/face-access-control/cvservice/build
RUN /bin/bash -c "source /opt/intel/computer_vision_sdk_2017.0.113/bin/setupvars.sh; cmake .."
RUN /bin/bash -c "source /opt/intel/computer_vision_sdk_2017.0.113/bin/setupvars.sh; make"
ENV MQTT_SERVER 10.239.76.41:1883
ENV MQTT_CLIENT_ID cvservice
ENV FACE_DB ./defaultdb.xml
ENV FACE_IMAGES=../../webservice/server/node-server/public/profile/
ENV http_proxy ""
ENV https_proxy ""
CMD ./cvservice 0 2>/dev/null | ffmpeg -f rawvideo -pixel_format bgr24 -video_size vga -i - http://10.239.76.41:8090/fac.ffm
#RUN cd .. & ffserver -f ./ffmpeg/server.conf
#CMD ["/bin/bash", "tail", "-f", "/dev/null"]