Spaces:
Running
Running
Download Dockerfile from stylevoice/vc: direct link, hf CLI and curl.
- Browser
- Download file 1.84 kB
-
https://huggingface.co/spaces/stylevoice/vc/resolve/main/Dockerfile
- Command line
-
hf download hf://spaces/stylevoice/vc/Dockerfile
-
curl -L -o Dockerfile https://huggingface.co/spaces/stylevoice/vc/resolve/main/Dockerfile
1.84 kB
| FROM python:3.10-slim-bookworm | |
| RUN useradd -m -u 1000 user | |
| WORKDIR /app | |
| RUN apt-get update && apt-get install -y --no-install-recommends \ | |
| curl git ffmpeg libsndfile1 unzip build-essential pkg-config \ | |
| && rm -rf /var/lib/apt/lists/* | |
| # torch CPU 2.4 (seed-vc uses 2.4) | |
| RUN pip install --no-cache-dir \ | |
| torch==2.4.0 torchaudio==2.4.0 torchvision==0.19.0 \ | |
| --index-url https://download.pytorch.org/whl/cpu | |
| # seed-vc — clone, pin commit, install runtime deps subset (CPU-only, no GUI/training). | |
| ENV SEEDVC_COMMIT=51383efd921027683c89e5348211d93ff12ac2a8 | |
| RUN git clone https://github.com/Plachtaa/seed-vc.git /opt/seed-vc \ | |
| && cd /opt/seed-vc && git checkout $SEEDVC_COMMIT \ | |
| && mkdir -p /opt/seed-vc/checkpoints \ | |
| && chown -R user:user /opt/seed-vc | |
| RUN pip install --no-cache-dir \ | |
| scipy==1.13.1 \ | |
| librosa==0.10.2 \ | |
| huggingface-hub>=0.28.1 \ | |
| munch==4.0.0 \ | |
| einops==0.8.0 \ | |
| descript-audio-codec==1.0.0 \ | |
| pydub==0.25.1 \ | |
| resemblyzer \ | |
| transformers==4.46.3 \ | |
| soundfile==0.12.1 \ | |
| numpy==1.26.4 \ | |
| hydra-core==1.3.2 \ | |
| pyyaml \ | |
| python-dotenv \ | |
| nltk \ | |
| omegaconf | |
| # Our service deps (fastapi/uvicorn/httpx/pydantic). | |
| COPY requirements.txt . | |
| RUN pip install --no-cache-dir -r requirements.txt | |
| COPY app/ ./app/ | |
| RUN mkdir -p /app/.cache/huggingface && chown -R user:user /app | |
| USER user | |
| ENV HOST=0.0.0.0 | |
| ENV PORT=7860 | |
| ENV VC_API_TOKEN= | |
| ENV HF_HOME=/app/.cache/huggingface | |
| ENV SEEDVC_DIR=/opt/seed-vc | |
| # CPU-only: BigVGAN CUDA kernel + fp16 autocast 비활성. | |
| ENV CUDA_VISIBLE_DEVICES="" | |
| EXPOSE 7860 | |
| HEALTHCHECK --interval=30s --timeout=5s --retries=3 \ | |
| CMD curl -f http://localhost:7860/health || exit 1 | |
| CMD ["uvicorn", "app.main:app", "--host", "0.0.0.0", "--port", "7860"] | |