File size: 776 Bytes
840c040
 
21ce20c
 
 
 
 
 
95cd467
7d566ee
95cd467
 
 
 
 
 
 
 
 
7d566ee
 
 
6893724
 
 
 
 
7d566ee
6893724
7d566ee
 
95cd467
840c040
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
FROM python:3.11-slim

# Keep dlib builds from using too much RAM on small builders.
ENV CMAKE_BUILD_PARALLEL_LEVEL=1 \
    MAKEFLAGS="-j1" \
    DLIB_USE_CUDA=0 \
    DLIB_NO_GUI_SUPPORT=1

# Install system dependencies for dlib / face_recognition
RUN apt-get update && apt-get install -y \
    build-essential \
    cmake \
    libgl1 \
    libglib2.0-0 \
    libsm6 \
    libxext6 \
    libxrender-dev \
    libopenblas-dev \
    liblapack-dev \
    && rm -rf /var/lib/apt/lists/*

WORKDIR /app
COPY requirements.txt /app/requirements.txt

RUN pip install --upgrade pip setuptools wheel \
    && pip install --no-cache-dir -r requirements.txt \
    && python -c "import face_recognition; print('face_recognition ok')"

COPY . /app

ENV PORT=7860

CMD ["python", "main.py"]