build(docker): LLAMA_REF pin to rebuild llama.cpp on demand - #87
Merged
Conversation
…ible) The llama-builder stage clones+builds llama.cpp in ONE cached RUN, so a plain `docker compose build serving` reuses the old llama-server even after upstream HEAD moves — a new arch (Unlimited-OCR / deepseek-ocr, ggml-org/llama.cpp#24969) never gets picked up. New optional LLAMA_REF build arg: set a commit/tag to shallow-fetch and build llama.cpp at that pin — the changed ARG busts the layer cache (forcing a rebuild) AND makes the build reproducible. Empty = current behavior (latest HEAD). Wired on the serving service (it holds the llama-server that serves deployed models) via ${LLAMA_REF:-} and documented in .env.example. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The
llama-builderstage clones + builds llama.cpp in ONERUNwhose text never changes, so Docker caches it. A plaindocker compose build servingreuses the cached llama-server even after upstream HEAD moves — so a newly-supported arch (Unlimited-OCR / deepseek-ocr, llama.cpp#24969, merged 2026-06-24) is never picked up. My earlier "just rebuild" advice was wrong.Fix
Optional
LLAMA_REFbuild arg:Wired on the
servingservice (it holds the llama-server that serves deployed models) via${LLAMA_REF:-}, documented in.env.example.Usage
Then deploy Unlimited-OCR — the runtime log confirms the arch loads.
🤖 Generated with Claude Code