# Use a slim Python image for a smaller footprint FROM python:3.11-slim # Set the working directory in the container WORKDIR /app # Install system dependencies # We include ffmpeg just in case you want to expand audio processing later RUN apt-get update && apt-get install -y \ build-essential \ ffmpeg \ && rm -rf /var/lib/apt/lists/* # Copy the requirements file first to leverage Docker cache COPY requirements.txt . # Install Python dependencies RUN pip install --no-cache-dir -r requirements.txt # Copy the rest of the application code COPY . . # Set environment variables # HF Spaces uses 7860 by default ENV PORT=7860 ENV PYTHONUNBUFFERED=1 # Expose the port EXPOSE 7860 # Command to run the Quart application # We use '0.0.0.0' so it's accessible externally within the container network CMD ["python", "app.py"]