| FROM python:3.11-slim | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # Install Python dependencies | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Pre-download the htdemucs model at build time (saves time on first run) | |
| RUN python -c "from demucs.pretrained import get_model; get_model('htdemucs')" | |
| COPY bot.py . | |
| CMD ["python", "bot.py"] | |