FROM python:3.11-slim WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y --no-install-recommends \ git \ && rm -rf /var/lib/apt/lists/* # Copy requirements first for caching COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy app code COPY app.py . COPY static/ static/ # Hugging Face Spaces runs on port 7860 ENV PORT=7860 EXPOSE 7860 # Run the app CMD ["python", "app.py"]