Skip to content

Tolerate missing .git in Marian, document --env local, bake engines into Dockerfile - #4

Open
wheatear-dev wants to merge 3 commits into
masterfrom
feat/marian-git-patch-and-docs
Open

Tolerate missing .git in Marian, document --env local, bake engines into Dockerfile#4
wheatear-dev wants to merge 3 commits into
masterfrom
feat/marian-git-patch-and-docs

Conversation

@wheatear-dev

Copy link
Copy Markdown
Collaborator

Summary

  • Patch Marian's hard file(READ ../.git ...) version-string read so builds survive a source tree with .git stripped (e.g. slimmed-down Docker base images), instead of crashing CMake configure.
  • Document the --env local flag requirement for scripts/serenade/bin/run.py when running services outside real Docker Compose networking (without it, core can't resolve code-engine/speech-engine hostnames).
  • Bake core/code-engine/speech-engine builds into config/Dockerfile via a scoped gradle installDist, so the image ends up with all three engine services built in rather than just their C++ dependencies.

Test plan

  • Applied the Marian patch against a fresh checkout of the pinned commit, reproduced the original .git-missing crash, confirmed the patch fixes it, verified normal (non-missing-.git) builds still work.
  • Verified gradle core:installDist code-engine:installDist speech-engine:installDist succeeds against the exact directory set the modified Dockerfile copies in.
  • Ran the full live voice pipeline (mic → speech-engine → core → code-engine) end-to-end against services built this way; correct transcription results with no errors.

🤖 Generated with Claude Code

wheatear-dev and others added 3 commits July 15, 2026 20:40
build-cleanup.sh --minimal deliberately strips marian/.git to save
image size, which is fine for a one-shot build, but CMake hard-fails
with "file failed to open for reading" if you ever need to
reconfigure/rebuild Marian afterward (e.g. after changing a related
CMakeLists.txt), since it unconditionally tries to read .git to embed
a version string with no existence check.

Verified: applied against a fresh checkout of the pinned Marian
commit (in the same order build-marian.sh uses), and confirmed the
actual failure scenario (a stripped .git) now reconfigures cleanly
and embeds a "unknown" placeholder revision instead of erroring.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Cost real debugging time: without it, core silently gets the raw,
unflattened services.yaml merged into its environment (since
serenade.config.services(None) returns the whole default/docker/local
structure rather than a flattened profile), so CODE_ENGINE_HOST etc.
are never actually set and core falls back to bare service-name
hostnames that only resolve via Compose's network aliases.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Copies the Gradle subprojects each service needs (excluding client/,
which .dockerignore blocks anyway) and runs a scoped installDist so
the image ends up with all three engine services built in, not just
their C++ dependencies.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
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.

1 participant