FROM python:3.11-slim # Install system dependencies for face_recognition RUN apt-get update && apt-get install -y \ build-essential \ cmake \ libopenblas-dev \ liblapack-dev \ libx11-dev \ libgtk-3-dev \ && rm -rf /var/lib/apt/lists/* WORKDIR /app # Install Python dependencies COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy application code COPY . . # Expose port EXPOSE 5000 # Run with gunicorn CMD ["gunicorn", "--bind", "0.0.0.0:5000", "--workers", "2", "--timeout", "120", "run:app"]