build: add stable-diffusion server to musa and vulkan container images#504
build: add stable-diffusion server to musa and vulkan container images#504mostlygeek merged 5 commits intomainfrom
Conversation
Layer sd-server from stable-diffusion.cpp container images onto the base llama-swap image for supported architectures (musa, vulkan). - add llama-swap-sd.Containerfile as a thin layer on top of the base image - update build-container.sh to build base first, then layer SD on top - add sd-server example config to config.example.yaml - add set -euo pipefail and env var defaults to build script closes #450
|
Warning Rate limit exceeded
⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. WalkthroughAdds Stable Diffusion server layering to the container build flow: strict bash error handling and debug flags in the build script, new SD_IMAGE/SD_TAG build args, a conditional post-build step that builds an sd-server layer for musa and vulkan architectures, a new Containerfile to copy the sd-server binary into the final image, and an example config entry for a "z-image" model. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In `@docker/build-container.sh`:
- Line 114: The SD_TAG variable is set to an architecture-specific tag (SD_TAG)
that doesn't exist for musa/vulkan and causes the COPY --from stage to fail;
update the SD_TAG assignment (the SD_TAG variable used by the COPY --from step)
to use an upstream-compatible tag format (e.g.,
master-<build-number>-<git-short-sha>) or implement a lookup to fetch a valid
master-* tag from ghcr.io/leejet/stable-diffusion.cpp before the COPY --from
step, or alternatively ensure you build/publish architecture-specific images
yourself so the COPY --from stage can pull them; adjust any places referencing
SD_TAG accordingly.
In `@docker/config.example.yaml`:
- Around line 20-33: The z-image model entry is missing the proxy field and uses
a literal block for cmd which preserves newlines; add a proxy:
"http://127.0.0.1:9999" key to the z-image mapping and convert the cmd from a
literal block (|) to a folded block (>) so the command becomes a single-line
string (ensure all flags and paths for /app/sd-server, --listen-port,
--diffusion-model, --vae, --llm, --offload-to-cpu, --cfg-scale,
--height/--width, --steps remain space-separated) so llama-swap can route to the
spawned server and parse the command correctly.
Use a named multi-stage build (sd-source) so Docker can resolve the SD image reference. COPY --from cannot use build ARGs directly.
|
@mostlygeek perhaps it would be worth adding some info to the readme to improve discoverability of this feature? |
|
@rare-magma oh yes, that's a good idea. Would you mind opening a PR with the config changes you introduced? Those were good. |
mostlygeek#504) Add sd-server from stable-diffusion.cpp docker image for vulkan and musa containers. closes mostlygeek#450
Summary
llama-swap-sd.Containerfileis a thin 10-line layer on top of the base image (instead of duplicating the full 49-line Containerfile)set -euo pipefail, env var defaults,${GITHUB_TOKEN:-}fix)config.example.yamlSupersedes #450 with a DRY approach.
Summary by CodeRabbit
New Features
Chores
✏️ Tip: You can customize this high-level summary in your review settings.