# Use a stable, official Python image FROM python:3.10-slim # Set the working directory WORKDIR /app # Install system dependencies for audio package compilation RUN apt-get update && apt-get install -y \ build-essential \ portaudio19-dev \ && rm -rf /var/lib/apt/lists/* # Copy requirements and install them COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy the application code and credentials COPY . . # Expose the port that Hugging Face will route to EXPOSE 7860 # Command to run the Flask application using a production WSGI server CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--workers", "4", "app:app"]