feat: improve llama.cpp base image tag for cpu#391
feat: improve llama.cpp base image tag for cpu#391mostlygeek merged 1 commit intomostlygeek:mainfrom ryan-steed-usa:cpu-build-tag
Conversation
Refactor the container build script to resolve llama.cpp base image for CPU, also tag these builds accordingly. - For CPU containers, now fetch the latest 'server' tagged llama.cpp image instead of using a generic 'server' tag - Cleans up the docker build command to use dynamic BASE_TAG variable - Maintains existing push functionality for built images
WalkthroughThe Docker build container script is refactored to dynamically fetch llama.cpp versions from the GitHub Container registry instead of using fixed tags. Container tags are derived based on fetched versions and build architecture, while the build and push logic is restructured to use unified tag generation with BASE_TAG and LS_VER as build arguments. Changes
Sequence DiagramsequenceDiagram
participant Script as build-container.sh
participant Registry as ghcr.io/mostlygeek
participant Docker as Docker Build
Script->>Registry: Fetch latest server-tagged version
Registry-->>Script: Return LCPP_TAG
alt LCPP_TAG is empty
Script->>Script: ABORT with error
else Valid LCPP_TAG
Script->>Script: Derive BASE_TAG based on arch
Script->>Script: Generate CONTAINER_TAG and CONTAINER_LATEST
Note over Script: v${LS_VER}-${ARCH}-${LCPP_TAG}
Note over Script: ${ARCH} (latest tag)
Script->>Docker: Build with BASE_TAG and LS_VER args
Docker-->>Script: Build complete
alt PUSH_IMAGES is true
Script->>Registry: Push CONTAINER_TAG
Script->>Registry: Push CONTAINER_LATEST
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Pre-merge checks and finishing touches✅ Passed checks (3 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Closes #390 |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
docker/build-container.sh (1)
29-32: Consider adding error handling for API calls.The
curlandjqcommands on lines 29–32 and 35–38 can fail silently or return invalid data. The existing check on line 43 validates thatLCPP_TAGis non-empty, but does not account for malformed responses or API failures that might still produce a non-empty but incorrect value.Consider adding early validation (e.g., checking HTTP status codes with
curl -f, or verifying jq output format) to surface API errors earlier.Also applies to: 35-38
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docker/build-container.sh(1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-27T16:04:23.381Z
Learnt from: ryan-steed-usa
Repo: mostlygeek/llama-swap PR: 368
File: docker/llama-swap.Containerfile:14-20
Timestamp: 2025-10-27T16:04:23.381Z
Learning: In docker/llama-swap.Containerfile, the user/group creation logic intentionally supports adding a non-root user (non-zero UID) to the root group (GID=0) as a valid configuration. This allows flexible UID/GID customization where users can specify only a UID or both UID and GID.
Applied to files:
docker/build-container.sh
|
I tested it and it works as expected so far. |
Refactor the container build script to resolve llama.cpp base image for CPU, also tag these builds accordingly. - For CPU containers, now fetch the latest 'server' tagged llama.cpp image instead of using a generic 'server' tag - Cleans up the docker build command to use dynamic BASE_TAG variable - Maintains existing push functionality for built images
Refactor the container build script to resolve llama.cpp base image for CPU, also tag these builds accordingly. - For CPU containers, now fetch the latest 'server' tagged llama.cpp image instead of using a generic 'server' tag - Cleans up the docker build command to use dynamic BASE_TAG variable - Maintains existing push functionality for built images
Refactor the container build script to resolve llama.cpp base image for CPU, also tag these builds accordingly. - For CPU containers, now fetch the latest 'server' tagged llama.cpp image instead of using a generic 'server' tag - Cleans up the docker build command to use dynamic BASE_TAG variable - Maintains existing push functionality for built images
Refactor the container build script to resolve llama.cpp base image for CPU, also tag these builds accordingly.
servertagged llama.cpp image instead of using a genericservertagSummary by CodeRabbit