| FROM python:3.9-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| libsndfile1 \ | |
| ffmpeg \ | |
| git \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Pre-install Python dependencies (from your requirements.txt) | |
| RUN pip install --no-cache-dir \ | |
| fastapi \ | |
| uvicorn \ | |
| python-multipart \ | |
| jinja2 \ | |
| aiohttp \ | |
| librosa \ | |
| soundfile \ | |
| numpy \ | |
| scipy | |
| # Clone repo at runtime using the Secret and start the app | |
| CMD ["/bin/bash", "-c", "git clone https://$GITHUB_TOKEN@github.com/Hamed744/Sada.git . && pip install -r requirements.txt && uvicorn app:app --host 0.0.0.0 --port 7860"] |