audio: give the audiocraft venv every dependency it declares

Three build cycles, three different missing modules — xformers, then torch at
install time, then transformers. The list had been trimmed against what the MAIN
venv provides, which is exactly backwards: an isolated venv starts with nothing,
so it needs the whole declared set, minus only the torch pins we choose and the
dev-only tools.

Verified in a throwaway container against the real core image before building
anything: audiocraft 1.3.0 on torch 2.5.1+cu121 with xformers 0.0.28.post3, and
MusicGen and AudioGen both import. That check takes two minutes; the image build
it replaces takes fifteen, which is why the last three rounds were so expensive.
Co-Authored-By: 's avatarClaude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0182DhR1eFNPQyGmDrpHbedY
parent b024ec33
...@@ -25,15 +25,17 @@ torch==2.5.1 ...@@ -25,15 +25,17 @@ torch==2.5.1
torchaudio==2.5.1 torchaudio==2.5.1
torchvision==0.20.1 torchvision==0.20.1
# audiocraft's real runtime dependencies. Its dev-only ones (pytest, flake8, # EVERYTHING audiocraft declares, minus only the torch pins above and its
# mypy, coverage, pdoc3) and gradio are deliberately absent: a pod serves an # dev-only tools (pytest, flake8, mypy, coverage, pdoc3).
# API, it does not run the library's test suite or its demo UI. torchtext is
# absent too — it is abandoned, unbuildable here, and unused at inference.
# #
# xformers IS needed: audiocraft imports it at module load, so leaving it out # The earlier version of this list was trimmed against what the MAIN venv has —
# turned the build's import check into a ModuleNotFoundError — which is exactly # transformers, demucs and the rest. That is exactly wrong: this venv is
# what that check is for. Pinned to the version whose wheel matches the torch # isolated, so it starts with nothing, and the trimming produced three build
# above; see the note there for why that torch and not audiocraft's. # cycles that each died on a different missing module. An isolated venv needs
# the whole list.
# xformers: audiocraft imports it at module load (audiocraft/modules/
# transformer.py), so without it the import check dies. Pinned to the version
# whose cp312 wheel matches the torch above — see the note there.
xformers==0.0.28.post3 xformers==0.0.28.post3
av>=11.0.0 av>=11.0.0
einops einops
...@@ -46,7 +48,10 @@ sentencepiece ...@@ -46,7 +48,10 @@ sentencepiece
spacy>=3.6.1 spacy>=3.6.1
huggingface_hub huggingface_hub
tqdm tqdm
transformers>=4.31.0
demucs
librosa librosa
gradio
torchmetrics torchmetrics
encodec encodec
protobuf protobuf
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment