forked from RdeLange/robinvision
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
83 lines (70 loc) · 1.78 KB
/
Dockerfile
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
FROM python:3.4-slim
RUN apt-get -y update && \
apt-get install -y --fix-missing \
build-essential \
cmake \
gfortran \
git \
wget \
curl \
graphicsmagick \
libgraphicsmagick1-dev \
libatlas-dev \
libavcodec-dev \
libavformat-dev \
libboost-all-dev \
libgtk2.0-dev \
libjpeg-dev \
liblapack-dev \
libswscale-dev \
pkg-config \
python3-dev \
python3-numpy \
software-properties-common \
zip \
&& apt-get clean && rm -rf /tmp/* /var/tmp/*
# Install DLIB
RUN cd ~ && \
mkdir -p dlib && \
git clone -b 'v19.7' --single-branch https://github.com/davisking/dlib.git dlib/ && \
cd dlib/ && \
python3 setup.py install --yes USE_AVX_INSTRUCTIONS
# Install Flask
RUN cd ~ && \
pip3 install flask flask-cors
# Install Face-Recognition Python Library
RUN cd ~ && \
mkdir -p face_recognition && \
git clone https://github.com/ageitgey/face_recognition.git face_recognition/ && \
cd face_recognition/ && \
pip3 install -r requirements.txt && \
python3 setup.py install
# Install Apache & PHP
RUN cd ~ && \
apt-get install -y apache2 \
libapache2-mod-php \
php \
php-pear \
php-mysql \
php-curl \
php-gd
# php-xcache \
# Copy RobinVision python script
RUN cd ~ && \
mkdir -p app
COPY RobinVision.py /root/app/RobinVision.py
COPY StartRV.sh /root/app/StartRV.sh
COPY config.cfg /root/app/config.cfg
# Copy RobinVision initial encodings
RUN cd ~ && \
mkdir -p encodings
COPY encodings /root/encodings
# Copy KCFileManager
COPY www /var/www/html
# Give correct authorisation to faces files dir
RUN cd ~ && \
chmod 777 -R /var/www/html/faces && \
rm -r /var/www/html/index.html
# Start the web service
CMD cd /root/app/ && \
bash StartRV.sh