evals-vibevoice / Dockerfile
bezzam's picture
bezzam HF Staff
Update Dockerfile
6eefe62 verified
Raw
History Blame Contribute Delete
2.49 kB
# Runtime base is enough: run_eval.py uses sdpa attention, nothing compiles CUDA extensions.
FROM nvidia/cuda:12.9.0-runtime-ubuntu24.04
# Avoid interactive prompts during package installation
ENV DEBIAN_FRONTEND=noninteractive
# System deps: git to install the vibevoice package from GitHub; ffmpeg (Ubuntu 24.04 ships
# ffmpeg 6.x, in torchcodec 0.6's supported range) + libsndfile1 for audio I/O.
RUN apt-get update && apt-get install -y --no-install-recommends \
python3 \
python3-pip \
python3-dev \
git \
ffmpeg \
libsndfile1 \
&& rm -rf /var/lib/apt/lists/*
# Set Python alias (Ubuntu 24.04 ships Python 3.12)
RUN ln -sf /usr/bin/python3 /usr/bin/python
# Allow pip to install packages system-wide in the container (PEP 668)
ENV PIP_BREAK_SYSTEM_PACKAGES=1
# Set working directory
WORKDIR /app
# Upgrade pip so it fetches prebuilt manylinux wheels instead of building from source.
# --ignore-installed is required on Ubuntu 24.04 (Debian-installed pip has no RECORD file).
RUN pip install --no-cache-dir --upgrade --ignore-installed pip setuptools wheel
# Install PyTorch ecosystem (cu128 wheels for CUDA 12.8+/12.9 compat)
RUN pip install --no-cache-dir \
torch==2.8.0 \
torchaudio==2.8.0 \
--index-url https://download.pytorch.org/whl/cu128
# Python deps for VibeVoice-Realtime (transformers==4.51.3 pin, librosa, diffusers, ...),
# then torchcodec (audio decode backend) and the vibevoice package itself from GitHub.
# Build context is the REPO ROOT, hence the vibevoice_realtime/ prefix.
RUN pip install --no-cache-dir \
transformers==4.51.3 \
accelerate \
huggingface_hub \
diffusers \
llvmlite>=0.40.0 \
numba>=0.57.0 \
numpy \
scipy \
librosa \
tqdm \
ml-collections \
absl-py
RUN pip install --no-cache-dir torchcodec==0.6.0 \
&& pip install --no-cache-dir git+https://github.com/microsoft/VibeVoice.git
# datasets + tqdm + soundfile for the eval loop.
RUN pip install --no-cache-dir datasets tqdm soundfile
# Model weights (~0.5B, ungated) and voice presets are small and fetched at runtime via the
# bind-mounted HF cache (baking them into the default cache would be shadowed by that mount).
# Copy the full repository
COPY . /app
# Default entrypoint
ENTRYPOINT ["bash"]
# Keep-alive CMD so the Space runtime stays healthy. HF Jobs and `docker run`
# override this with their own command (e.g. run_eval.sh).
EXPOSE 7860
CMD ["-c", "python3 -m http.server 7860"]