| FROM python:3.11-slim |
|
|
| RUN apt-get update && apt-get install -y --no-install-recommends ffmpeg libsndfile1 && rm -rf /var/lib/apt/lists/* |
|
|
| WORKDIR /app |
|
|
| |
| RUN pip install --no-cache-dir torch==2.4.1 torchaudio==2.4.1 --index-url https://download.pytorch.org/whl/cpu |
| COPY requirements.txt . |
| RUN pip install --no-cache-dir -r requirements.txt |
|
|
| |
| RUN python -c "from demucs.pretrained import get_model; get_model('htdemucs')" |
|
|
| COPY app.py . |
|
|
| EXPOSE 7860 |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |
|
|