Skip to content

.github,docker/unified: improve caching and fix bugs#598

Merged
mostlygeek merged 4 commits intomainfrom
unified-container-improvements
Mar 23, 2026
Merged

.github,docker/unified: improve caching and fix bugs#598
mostlygeek merged 4 commits intomainfrom
unified-container-improvements

Conversation

@mostlygeek
Copy link
Copy Markdown
Owner

@mostlygeek mostlygeek commented Mar 23, 2026

  • set up a GHA scheduled job to build the container nightly
  • enabling pushing a llama-swap:unified and a llama-swap:unified-Y-M-D image to ghcr.io
  • tidy up Dockerfile to use a non-root user and llama-swap as an entry point

mostlygeek and others added 4 commits March 22, 2026 23:54
The GHA cache has a limit of 10GB which the docker layers and ccache
already exceeds. Switching to the registry type cache does not have that
limit and will help eliminate unnecessary recompiling work.
- add llama-swap user
- set ENTRYPOINT to llama-swap
- remove unnecessary steps from runtime container
- Resolve llama-swap git ref to full commit hash (same as other projects)
- Update install-llama-swap.sh to map commit hash back to release tag
- Enable daily cron schedule matching containers.yml (37 5 * * *)
- Default all cpp refs to master, llama-swap to main
- Enable GHCR push with dated tag (unified-YYYY-MM-DD)
- Use registry cache only on real GHA runs (skip under act)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 23, 2026

Walkthrough

The PR updates the unified Docker workflow and build pipeline to use master/main branches as defaults for dependencies, enables Container Registry publishing in CI/CD environments (excluding local test runs), refactors version resolution to work with commit hashes and GitHub tags, introduces configuration management via example YAML, and changes the container entrypoint from interactive bash to the llama-swap service.

Changes

Cohort / File(s) Summary
Workflow Configuration
.github/workflows/unified-docker.yml
Added cron-based scheduling trigger, updated workflow_dispatch input defaults to "master" and "main", enabled Container Registry login and publishing steps (conditional on non-local environments), adjusted environment variable fallbacks for missing inputs, and enhanced publish logic with UTC date-suffixed image tagging.
Container Runtime
docker/unified/Dockerfile
Created dedicated llama-swap system user with config directory ownership, removed symlink creation and executable validation loop, changed entrypoint from bash to llama-swap service with config path and port binding, and added config example file copy.
Build Infrastructure
docker/unified/build-image.sh, docker/unified/install-llama-swap.sh
Added LLAMA_SWAP_REPO variable, replaced version resolution with commit-hash detection and GitHub tag resolution via git ls-remote, updated Docker build arguments to pass resolved hashes, integrated registry caching for non-local GitHub Actions builds, and adjusted container invocations with explicit entrypoints.
Configuration
docker/unified/config.example.yaml
New example configuration file defining service options (healthCheckTimeout, logRequests) and three model entries (llama, whisper, image) with commands and endpoint checks.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: improving caching and fixing bugs in GitHub Actions and Docker unified container.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The PR description accurately relates to the changeset, covering the three main areas: scheduled GHA builds, GHCR image publishing, and Dockerfile cleanup with non-root user and entrypoint.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch unified-container-improvements

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@mostlygeek mostlygeek merged commit 2c282dc into main Mar 23, 2026
1 of 2 checks passed
@mostlygeek mostlygeek deleted the unified-container-improvements branch March 23, 2026 13:24
rohitpaul pushed a commit to rohitpaul/llama-swap that referenced this pull request Mar 29, 2026
- set up a GHA scheduled job to build the container nightly 
- enabling pushing a llama-swap:unified and a llama-swap:unified-Y-M-D
image to ghcr.io
- tidy up Dockerfile to use a non-root user and llama-swap as an entry
point
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