Download Dockerfile from michdubai/audio: direct link, hf CLI and curl.
- Browser
- Download file 850 Bytes
-
https://huggingface.co/spaces/michdubai/audio/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/michdubai/audio/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/michdubai/audio/resolve/main/Dockerfile
850 Bytes
| FROM python:3.11-slim | |
| WORKDIR /app | |
| # 1. Install system compilation tools and PortAudio dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| gcc \ | |
| python3-dev \ | |
| portaudio19-dev \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # 2. Install CPU-only versions of torch and torchaudio FIRST | |
| # This must happen BEFORE installing requirements.txt | |
| RUN pip install --no-cache-dir torch==2.6.0 torchaudio==2.6.0 --index-url https://download.pytorch.org/whl/cpu | |
| # 3. Copy and install Python dependencies (which no longer include torch) | |
| COPY backend/requirements.txt ./ | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # 4. Copy the application folders into the workspace context | |
| COPY backend/ ./backend | |
| COPY frontend/ ./frontend | |
| WORKDIR /app/backend | |
| EXPOSE 7860 | |
| # 5. Launch uvicorn | |
| CMD ["uvicorn", "app:app", "--host", "0.0.0.0", "--port", "7860"] |