Skip to content

fix(audiocraft): restore image and application dependency contracts - #4972

Closed
tang-vu wants to merge 3 commits into
Osmantic:public-betafrom
tang-vu:fix/beta-audiocraft-dependency-contract-20260914
Closed

tang-vu wants to merge 3 commits into
Osmantic:public-betafrom
tang-vu:fix/beta-audiocraft-dependency-contract-20260914

Conversation

@tang-vu

@tang-vu tang-vu commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Ready for independent review (2026-09-15). Candidate 0fe7830f99391121762e2b12f0f09aa2f6f208c9 has a successful GitHub check rollup and no base-branch conflict at this review snapshot. This supersedes earlier draft-status wording only. All validation gaps, migration requirements, live gates and independent human review requirements below remain in force; this is not a merge-ready approval.

Restore the AudioCraft image build and the application contract that follows it. The old base-image digest does not exist, and the pinned AudioCraft 1.3.0 package requires Torch 2.1 while the Dockerfile requests Torch 2.3. A successful dependency installation alone also exposed a Gradio/Pydantic incompatibility when opening the web page.

Why this matters

Enabling this build-based extension cannot produce a usable image from the shipped definition. Use a verified Python 3.10 Bookworm base, the Torch/TorchAudio ABI versions required by AudioCraft 1.3.0, the native headers needed to build PyAV 11, compatible NumPy/Transformers/Hub/spaCy versions, and a verified FastAPI/Pydantic pair for Gradio 4.44. Both installation layers run pip check.

The application health probe now uses the Python interpreter present in the image instead of missing wget. Explicit UID 1000 and manifest metadata connect the image to the existing host-agent directory preparation. HF_HOME points to the existing host model directory mounted at /app/models, so the non-root process uses that cache rather than an unused /root mount. README describes startup weight downloads and removes unsupported ARM performance/readiness claims.

Overlap check

Searched open and closed upstream PRs for AudioCraft, dependency/build failures, and changes to its Dockerfile/Compose/manifest. #530 introduced the original hardening and invalid digest; #385 covers GPU overlays, #564 ports, #1110 build-context staging, and #3979 changes Bark rather than AudioCraft. None repairs this dependency/application contract. The Makefile addition is additive with the beta batch's other tests. PR #4968 separately declares Jupyter's image UID; this PR changes only AudioCraft's application setup.

Regression and validation

  • Baseline Docker build fails resolving its base digest. AudioCraft 1.3.0 requirements establish the Torch 2.1 contract.
  • First repaired build and real package imports pass, but the actual Gradio root route fails with TypeError: argument of type 'bool' is not iterable under newly resolved Pydantic. This negative result led to the verified HTTP pins; it is not counted as a passing application test.
  • Final docker build succeeds; both pip check steps pass. After the CI portability correction below, the verified local manifest digest is sha256:57749752ee8668b1e567da5c69e5c393cc5622d401bc5cc6da4dab234c9353bf.
  • ods/tests/test-audiocraft-image.py inside that image with networking disabled: imports real AudioCraft/Torch/Gradio, constructs the shipped app, exercises /, /config and /info (all 200), and writes/reads both real 3200-frame WAV outputs as UID 1000. Only pretrained model loading and model generation are replaced by a small tensor fixture. FFmpeg/audio writing and ASGI handlers are real.
  • python3 ods/tests/test-audiocraft-compose.py: resolved Compose output/cache paths, Python health probe and manifest UID pass. Wired into make test; a paths-filtered CI workflow rebuilds the image and runs both boundary checks.
  • Scoped pre-commit and git diff --check: pass. make gate reproduces the baseline root/WSL no-sudo fixture failure; full gate is not green.
  • Follow-up 0fe7830f: the first GitHub image job rejected the inherited spaced heredoc delimiter (unknown instruction: import). Use <<'EOF' so the runner recognizes the Docker heredoc. Local rebuild and the full image boundary test pass again after this change; the replacement GitHub image job passed on 2026-09-14 (run 34821604024).

Review gates and limitations

Still requires independent review and a real NVIDIA activation run. The checks above prove a Linux amd64 build and the application without production weights, not model download completion, GPU inference, browser playback, full ODS install/reinstall/doctor, or ARM/macOS performance. Dependencies remain old because this patch restores the shipped AudioCraft/Gradio contract; upgrading those applications is a separate compatibility project.

Generated output paths stay in data/audiocraft; standard weights can be downloaded again, and the README calls out preserving an old cache before removing its container. Direct Compose and custom/rootless users still need matching writable host directories. Reverting the definition leaves host output/model files in place but restores the previous build failure; retain a working image if rollback is required.

Final candidate 0fe7830f99391121762e2b12f0f09aa2f6f208c9: 33 successful CI checks, 4 conditionally skipped; no pending or failed checks.

Batch integration receipt

This is one of 30 independently branched public-beta PRs. The published synthetic integration head is 61f4c6fccc81bea697f4941683fefb5089ba77f4, built from baseline d49ad4bbc760be319de7f4c9b9a93b1f18fe3922 in this reproducible order:

#4946 → #4948 → #4951 → #4954 → #4972 → #4960 → #4961 → #4957 → #4964 → #4967 → #4968 → #4971 → #4975 → #4976 → #4984 → #4982 → #4990 → #4988 → #4989 → #4997 → #5003 → #5006 → #5007 → #5009 → #5012 → #5011 → #5013 → #5014 → #5020 → #5021

Reconciliation preserved all 146 files owned by a single PR byte-for-byte against their exact candidate heads. The eight shared paths preserve both CLI STT/TTS commands and help, every added Makefile test, both environment schema additions and all Extensions UI behavior. LanguageTool and Kroki both remain headless API entries. Canonical regeneration yields 76 catalog entries and 47 library manifests; all README rows are retained. Shared-file changes need these additive resolutions when merged independently.

Combined validation: 2,852 API tests passed / 1 skipped; 1,082 UI tests passed; 47 manifests passed; all 12 added Makefile commands passed; 12 catalog boundary tests passed / 12 opt-in runtime tests skipped in this combined run. Individual exact-image results remain documented above. UI lint/build, scoped secret hooks, diff checks, four platform smoke tests and installer simulation passed. Compose plans for NVIDIA/AMD/Apple each contain 20 services and no duplicate published bindings across the core plus 12 new recipes; this is static plan evidence, not simultaneous startup or GPU inference.

The first unrestricted UI run timed out in two tests under concurrent load; the complete rerun used --maxWorkers=2 with unchanged assertions and timeouts and passed. ESLint reports zero errors and 603 warnings, including the existing JSX usage-detection pattern. Full local make gate still fails the no-sudo Docker baseline covered by #3158. BATS records 416 passed / 5 failed on this root/WSL host (platform detection, root preflight and a 15 GiB versus 20 GiB free-space expectation). Neither full local gate nor BATS is described as green.

This integration receipt supplements each PR's own regression and does not waive its independent review, live hardware/browser/upgrade gates or rollback requirements. The PRs remain drafts; none was merged upstream.

This was referenced Sep 14, 2026
@tang-vu
tang-vu marked this pull request as ready for review September 15, 2026 01:32
@Lightheartdevs

Copy link
Copy Markdown
Collaborator

Thanks for this contribution. public-beta was promoted into main on 2026-09-24 and no longer receives changes, so we're closing pull requests that target it. This isn't a judgment on the change itself. If it's still needed, please rebase onto main and open a focused PR. See #7253 for details and the contribution policy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants