File size: 1,123 Bytes
af32e72
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
08ddd4b
 
f02f28b
08ddd4b
af32e72
 
 
 
 
 
 
 
 
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
FROM python:3.10-slim

ENV PYTHONUNBUFFERED=1

RUN apt-get update && apt-get install -y --no-install-recommends \
    build-essential \
    ffmpeg \
    git \
    curl \
    wget \
    libglib2.0-0 \
    libsm6 \
    libxrender1 \
    libxext6 \
 && 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 /app/requirements.txt

COPY . /app

# Download YOLO weights at build time so they're baked into the image
RUN python download_models.py

# Download demo classroom image from GitHub
RUN curl -fL -o /app/activity_web/backend/static/demo_classroom.jpg \
    "https://raw.githubusercontent.com/PixxySynchronous/Face-Recognition-Attendance-Classroom-Monitoring-System/main/activity_web/backend/static/demo_classroom.jpg"

RUN mkdir -p /app/runtime/uploads /app/runtime/outputs /app/runtime/attendance

ENV PORT=8080
ENV ACTIVITY_WEB_RUNTIME_DIR=/app/runtime
ENV PYTHONPATH=/app

EXPOSE 8080

CMD ["gunicorn", "--bind", "0.0.0.0:8080", "--timeout", "600", "--workers", "1", "activity_web.backend.app:app"]