forked from serengil/deepface
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
27 lines (18 loc) · 836 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 tensorflow/tensorflow:1.9.0-devel-gpu-py3
COPY requirements.txt .
RUN add-apt-repository ppa:deadsnakes/ppa -y
RUN apt-get update
RUN apt-get install -y python3.6
RUN apt install -y python3-pip
RUN update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.6 1
RUN curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
RUN python3 get-pip.py --force-reinstall
RUN pip install -r requirements.txt
RUN pip install deepface==0.0.33 --no-deps
RUN apt-get install -y libsm6 libxext6 libxrender-dev
RUN apt install libgl1-mesa-glx -y
EXPOSE 80
COPY . .
HEALTHCHECK --interval=3m --timeout=300s CMD sh -c "if [ ! -f /tmp/health.txt ]; then touch /tmp/health.txt && python api/initRequest.py || exit 0 ; else echo \"initRequest.py already executed\"; fi"
ENV CUDA_VISIBLE_DEVICES "0"
CMD ["python", "api/api.py"]