-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
55 lines (49 loc) · 1.28 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
FROM python:3.7-rc-slim
RUN apt-get -y update
RUN apt-get install -y --fix-missing \
build-essential \
cmake \
gfortran \
git \
wget \
curl \
graphicsmagick \
libgraphicsmagick1-dev \
libatlas-dev \
libavcodec-dev \
libavformat-dev \
libgtk2.0-dev \
libjpeg-dev \
liblapack-dev \
libswscale-dev \
pkg-config \
python3-dev \
python3-pip \
python3-numpy \
bluetooth bluez \
libbluetooth-dev \
libudev-dev \
software-properties-common \
zip \
&& apt-get clean && rm -rf /tmp/* /var/tmp/*
# Install DLIB
RUN cd ~ && \
mkdir -p dlib && \
git clone -b 'v19.9' --single-branch https://github.com/davisking/dlib.git dlib/ && \
cd dlib/ && \
python3 setup.py install --yes USE_AVX_INSTRUCTIONS
# 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
# Copy web service script
COPY /python /root/python
# Install requirements
RUN cd /root/python && \
pip3 install -r requirements.txt
# Start the service
CMD cd /root/python/face-recognition && \
python3 recognize.py