FROM python:3.9-slim # Set work directory WORKDIR /code # Install system dependencies RUN apt-get update && \ apt-get install -y ffmpeg libsndfile1 libasound2 libsm6 libxext6 libxrender-dev && \ rm -rf /var/lib/apt/lists/* # Copy requirements and install COPY requirements.txt . RUN pip install --no-cache-dir -r requirements.txt # Copy all files COPY . . # Expose default FastAPI port EXPOSE 7860 # Start the FastAPI server CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"]