FROM python:3.11-slim-bookworm ENV DEBIAN_FRONTEND=noninteractive \ PYTHONUNBUFFERED=1 \ PYTHONDONTWRITEBYTECODE=1 \ PIP_NO_CACHE_DIR=1 \ PATH="/root/.local/bin:$PATH" WORKDIR /code # Install system dependencies for audio processing RUN apt-get update && apt-get install -y --no-install-recommends \ git \ wget \ curl \ ffmpeg \ libsndfile1 \ gcc \ g++ \ build-essential \ python3-dev \ pkg-config \ portaudio19-dev \ && apt-get clean && rm -rf /var/lib/apt/lists/* # Copy and install Python dependencies COPY requirements.txt . RUN pip install --upgrade pip \ && pip install --no-cache-dir -r requirements.txt COPY . . EXPOSE 7860 CMD ["uvicorn", "new_app.new_main:app", "--host", "0.0.0.0", "--port", "7860"]