# Use Python 3.9 slim base FROM python:3.9-slim # Install system dependencies RUN apt-get update && apt-get install -y ffmpeg git && apt-get clean # Set work directory WORKDIR /app # Install Python packages RUN pip install --upgrade pip RUN pip install torch torchaudio RUN pip install fastapi uvicorn RUN pip install git+https://github.com/facebookresearch/demucs # Copy your inference script into the container COPY predict.py . # Expose port for FastAPI EXPOSE 8000 # Run the FastAPI app CMD ["uvicorn", "predict:app", "--host", "0.0.0.0", "--port", "8000"]