Spaces:
Sleeping
Sleeping
| FROM python:3.10-slim | |
| COPY --from=ghcr.io/astral-sh/uv:latest /uv /bin/uv | |
| # 1. system dependencies | |
| RUN apt-get update && apt-get install -y ffmpeg git build-essential && rm -rf /var/lib/apt/lists/* | |
| WORKDIR /app | |
| # 2. hf_hub | |
| # This ensures changing your code doesn't trigger a re-download | |
| RUN uv pip install --system huggingface_hub | |
| # 3. Download weights | |
| RUN mkdir -p /app/vampnet/models && \ | |
| python3 -c "from huggingface_hub import hf_hub_download; \ | |
| repo = 'ProjectCETI/wham'; \ | |
| [hf_hub_download(repo_id=repo, filename=f, local_dir='/app/vampnet/models') \ | |
| for f in ['codec.pth', 'coarse.pth', 'c2f.pth', 'wavebeat.pth']]" | |
| # 4. Install project dependencies | |
| COPY pyproject.toml . | |
| RUN uv pip install --system . | |
| # 5. copy code | |
| COPY . . | |
| EXPOSE 7860 | |
| ENV GRADIO_SERVER_NAME="0.0.0.0" | |
| # Ensure we run from the root so imports like 'from vampnet' work | |
| CMD ["python", "vampnet/app.py"] | |