forked from MT-Photos/mt-photos-deepface
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
25 lines (18 loc) · 812 Bytes
/
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
FROM python:3.8.10-buster
USER root
# COPY ./sources.list /etc/apt/sources.list
RUN apt update && \
apt install -y libgl1-mesa-glx libglib2.0-0 libsm6 libxrender1 libfontconfig1 && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/log/*
WORKDIR /app
COPY requirements.txt .
# 安装依赖包
RUN pip3 install --no-cache-dir -r requirements.txt
RUN mkdir -p /models/.deepface/weights && \
wget -nv -O /models/.deepface/weights/retinaface.h5 https://github.com/serengil/deepface_models/releases/download/v1.0/retinaface.h5 && \
wget -nv -O /models/.deepface/weights/facenet512_weights.h5 https://github.com/serengil/deepface_models/releases/download/v1.0/facenet512_weights.h5
COPY server.py .
ENV DEEPFACE_HOME=/models
ENV API_AUTH_KEY=mt_photos_ai_extra
EXPOSE 8066
CMD [ "python3", "server.py" ]