From 6fd35bfe373b117fe169731711290cd341d516e3 Mon Sep 17 00:00:00 2001 From: Vuong Hoang Date: Sat, 25 Apr 2026 14:22:07 -0700 Subject: [PATCH] stacks/index-tts: install git-lfs in image so examples come down real MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- stacks/index-tts/.env.example | 6 ++++-- stacks/index-tts/Dockerfile | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/stacks/index-tts/.env.example b/stacks/index-tts/.env.example index ac7b338..f8d60bc 100644 --- a/stacks/index-tts/.env.example +++ b/stacks/index-tts/.env.example @@ -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. diff --git a/stacks/index-tts/Dockerfile b/stacks/index-tts/Dockerfile index 00c5a22..c91dd23 100644 --- a/stacks/index-tts/Dockerfile +++ b/stacks/index-tts/Dockerfile @@ -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).