-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
61 lines (51 loc) · 1.45 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
FROM python:3.9-slim
# Set bash to default shell
RUN rm /bin/sh && ln -s /bin/bash /bin/sh
# Do not prompt apt for user input when installing packages
ENV DEBIAN_FRONTEND=noninteractive
# Install dependencies
RUN apt update && \
apt install -y \
build-essential \
cmake \
ffmpeg \
libprotobuf-dev \
libsm6 \
libxext6 \
protobuf-compiler \
software-properties-common \
wget && \
apt dist-upgrade -y
ENV VIRTUAL_ENV=/venv
RUN python3.9 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
# Upgrade pip
RUN python -m pip install --upgrade pip
# Install python packages
RUN pip install --no-dependencies \
beautifulsoup4==4.9.3 \
bs4==0.0.1 \
certifi==2020.11.8 \
chardet==3.0.4 \
dlib==19.21.0 \
html5lib==1.1 \
idna==2.10 \
lxml==4.6.1 \
numpy==1.19.4 \
opencv-python==4.4.0.46 \
pandas==1.1.4 \
python-dateutil==2.8.1 \
pytz==2020.4 \
requests==2.24.0 \
six==1.15.0 \
soupsieve==2.0.1 \
urllib3==1.25.11 \
webencodings==0.5.1
# Download haarcascades mouth detector
RUN wget https://raw.githubusercontent.com/atduskgreg/opencv-processing/master/lib/cascade-files/haarcascade_mcs_mouth.xml -P /venv/lib/python3.9/site-packages/cv2/data/
# Download and extract dlib face landmarks data file
RUN wget http://dlib.net/files/shape_predictor_68_face_landmarks.dat.bz2 && \
bzip2 -dc shape_predictor_68_face_landmarks.dat.bz2 > /usr/bin/shape_predictor_68_face_landmarks.dat
# Set workdir
WORKDIR /home/
ENTRYPOINT ["python"]