Spaces:
Sleeping
Sleeping
Download Dockerfile from Numberblock32/Numberblocks1Voice: direct link, hf CLI and curl.
- Browser
- Download file 843 Bytes
-
https://huggingface.co/spaces/Numberblock32/Numberblocks1Voice/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/Numberblock32/Numberblocks1Voice/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/Numberblock32/Numberblocks1Voice/resolve/main/Dockerfile
843 Bytes
| FROM python:3.10-slim | |
| WORKDIR /app | |
| # System deps for audio processing | |
| RUN apt-get update && apt-get install -y \ | |
| ffmpeg \ | |
| libsndfile1 \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # Create user (HF requires user ID 1000) | |
| RUN useradd -m -u 1000 user | |
| # Install torch CPU-only first (much smaller than CUDA version) | |
| RUN pip install --no-cache-dir --upgrade pip && \ | |
| pip install --no-cache-dir torch>=2.5.0 torchaudio>=2.5.0 \ | |
| --index-url https://download.pytorch.org/whl/cpu | |
| # Install other deps | |
| COPY requirements_docker.txt /tmp/requirements.txt | |
| RUN pip install --no-cache-dir -r /tmp/requirements.txt | |
| # Copy app | |
| COPY app.py . | |
| # Permissions | |
| RUN mkdir -p /data/output && \ | |
| chown -R user:user /data /app | |
| USER user | |
| ENV PYTHONUNBUFFERED=1 \ | |
| PYTHONIOENCODING=UTF-8 \ | |
| HOME=/home/user | |
| EXPOSE 7860 | |
| CMD ["python", "app.py"] | |