Spaces:
Running
Running
Download Dockerfile from Harshil748/VoiceAPI: direct link, hf CLI and curl.
- Browser
- Download file 580 Bytes
-
https://huggingface.co/spaces/Harshil748/VoiceAPI/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Harshil748/VoiceAPI/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Harshil748/VoiceAPI/resolve/main/Dockerfile
580 Bytes
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # Install system dependencies | |
| RUN apt-get update && apt-get install -y \ | |
| libsndfile1 \ | |
| ffmpeg \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Copy requirements first for caching | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| # Copy application code | |
| COPY . . | |
| # Initialize models directory (models loaded on first request) | |
| RUN mkdir -p models && python -c "from src.model_loader import _ensure_models_available; _ensure_models_available()" | |
| # Expose port | |
| EXPOSE 7860 | |
| # Run the application | |
| CMD ["python", "app.py"] | |