# Use official Python runtime as base image FROM python:3.10-slim # Set environment variables ENV PYTHONDONTWRITEBYTECODE=1 ENV PYTHONUNBUFFERED=1 # Set working directory WORKDIR /code # Install dependencies COPY requirements.txt /code/ RUN pip install --no-cache-dir -r requirements.txt # Copy app files COPY . /code/ # Hugging Face Spaces requirement: expose port 7860 (we’ll still run on 7860 even if your app.py says 5006) ENV PORT 7860 # Run app CMD ["python", "app.py"]