FROM python:3.10-slim # Set environment variables ENV PYTHONUNBUFFERED=1 \ PYTHONDONTWRITEBYTECODE=1 \ HOST=0.0.0.0 \ PORT=7860 WORKDIR /app # Install system dependencies RUN apt-get update && apt-get install -y \ build-essential \ curl \ && rm -rf /var/lib/apt/lists/* # Copy requirements and install COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the application code COPY . . # Expose the mandatory HF Spaces port EXPOSE 7860 # Entry point: run the unified app.py CMD ["python", "app.py"]