stacks/index-tts: install git-lfs in image so examples come down real

The IndexTTS-2 repo stores examples/emo_*.wav and examples/voice_*.wav
as Git LFS objects. v1 of our image cloned the repo without an LFS
pull, leaving those paths as ~130-byte pointer text files — unusable
for `docker cp` into /worktank/index-tts/{voices,emotions}/ as starter
references. (Caught when an emotion_voice="hate" call returned audio
that was actually the pointer text round-tripped through file IO.)

v2 adds git-lfs to the apt list, calls `git lfs install --system`
once, and `git lfs pull` after the checkout. Adds ~1-2 MB to the
image (the examples are small audio clips). INDEX_TTS_TAG bumped to
v2 to force a clean rebuild.
This commit is contained in:
2026-04-25 14:22:07 -07:00
parent b75f020cc9
commit 6fd35bfe37
2 changed files with 16 additions and 5 deletions
+4 -2
View File
@@ -6,8 +6,10 @@
INDEX_TTS_SHA=830f6f8f94a51fea23ab1d639027a86200075a4e
# Local image tag — bump when you change build context (Dockerfile,
# app.py, entrypoint.sh) to force a fresh layer build.
INDEX_TTS_TAG=v1
# app.py, entrypoint.sh) to force a fresh layer build. v2 = git-lfs
# added so the example WAVs in /opt/index-tts/examples/ come down as
# real audio (v1 left them as LFS pointer stubs).
INDEX_TTS_TAG=v2
# ── network ──────────────────────────────────────────────────────────
# Host port. Container listens on 8000 internally.
+12 -3
View File
@@ -15,16 +15,25 @@ ENV DEBIAN_FRONTEND=noninteractive \
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
python3.10 python3.10-venv python3-pip \
git ffmpeg libsndfile1 \
git git-lfs ffmpeg libsndfile1 \
ca-certificates wget \
&& rm -rf /var/lib/apt/lists/* \
&& python3.10 -m venv /opt/venv
&& python3.10 -m venv /opt/venv \
&& git lfs install --system
# Pinned IndexTTS-2 SHA — bump in stack .env (INDEX_TTS_SHA build arg)
# when you want upstream updates.
#
# `git lfs pull` after the checkout fetches examples/emo_*.wav and the
# example/voice_*.wav reference clips that are stored as LFS objects.
# Without it, the .wav files come down as ~130-byte LFS pointer text
# files, and `docker cp`-ing them out as starter material for
# /worktank/index-tts/{voices,emotions} produces unusable garbage.
ARG INDEX_TTS_SHA=830f6f8f94a51fea23ab1d639027a86200075a4e
RUN git clone https://github.com/index-tts/index-tts.git /opt/index-tts \
&& cd /opt/index-tts && git checkout ${INDEX_TTS_SHA}
&& cd /opt/index-tts \
&& git checkout ${INDEX_TTS_SHA} \
&& git lfs pull
# CUDA 12.8 torch wheels (per IndexTTS pyproject.toml's tool.uv.index
# pin — same versions, same source).