You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
745 B

  1. # Use Python 3.11 slim as base image
  2. FROM python:3.11-slim
  3. # Set working directory
  4. WORKDIR /app
  5. # Install system dependencies
  6. RUN apt-get update && apt-get install -y \
  7. build-essential \
  8. cmake \
  9. libgl1-mesa-glx \
  10. libglib2.0-0 \
  11. libsm6 \
  12. libxext6 \
  13. libxrender-dev \
  14. && rm -rf /var/lib/apt/lists/*
  15. # Copy requirements first for better caching
  16. COPY requirements.txt .
  17. # Install Python dependencies
  18. RUN pip install --no-cache-dir -r requirements.txt
  19. # Copy application code
  20. COPY . .
  21. # Create directory for face data persistence
  22. RUN mkdir -p /app/data
  23. # Expose port
  24. EXPOSE 8000
  25. # Command to run the application
  26. CMD ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "8000"]