Skip to content

fix(docker): refresh CUDA/ROCm images, restore share assets, and update entrypoint - #1125

Draft
Graffioh wants to merge 1 commit into
mainfrom
chore/docker-refresh
Draft

Graffioh wants to merge 1 commit into
mainfrom
chore/docker-refresh

Conversation

@Graffioh

@Graffioh Graffioh commented Dec 1, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Audited the Docker build, runtime images, entrypoint, CI workflow, and local tooling against main (a0a071cb) and fixed the build break, missing runtime assets, model-handling gaps, and legacy bloat.

Fixes

  • CUDA 12 build break: add missing #include <cstddef> to server/src/common/concurrency/paged_kv_pool.h (broke GCC 11.4 in Docker prebuilds → cuda12).
  • Missing server/share/ assets in both runtime images: builder prune previously deleted build/share/ (status.html, deepseek41/*), runtime never copied them, and .dockerignore's **/*.bin excluded server/share/deepseek41/router_bias_lucebox_40x384_f32.bin. Restores server/share/, adds !server/share/**/*.bin, symlinks build/share -> ../share, and asserts all files exist during image build.
  • server/scripts/entrypoint.sh + server/test/test_entrypoint.sh:
    • Support deepseek41 (prefer 4.1 DSpark draft, drop draft on paged serving, skip --ddtree).
    • Support inkling2 / inkling2_loop (mtp.safetensors DSpark draft, never pick .gguf, skip --ddtree).
    • Support qwen3.8 draft pattern ahead of generic *dflash*, prevent qwen4exp from picking unrelated DFlash drafts, skip auto-draft for bailingmoe3 / qwen3.
    • Guard --ddtree on PAGED=0 and model_capabilities.h DDTree-capable architectures (fixes concurrent Qwen 3.5/3.6/3.8 --paged-attention + DFlash2, which feature_gate.cpp previously rejected with --paged-attention does not support DDTree).
    • Add LUCE_KV_CACHE_DIR support and /opt/lucebox-hub/kv-cache VOLUME (mode 1777) so the on-disk KV session cache stays off the container overlay and works under non-root -u uid:gid.

Image & Build Refresh

  • Drop Python / uv / PyTorch cu128 (~3+ GB) from both runtime images (including NVIDIA cu128 PyTorch that was being installed into :rocm) — runtime images only exec native C++ luce_server.
  • Ship luce_server only: drop test_dflash and test_server_unit (each duplicated static libluce_common.a fat-binary kernels) and configure with -DLUCE_TESTS=OFF without copying server/test.
  • Align cuda12 with ci.yml and :rocm: bump UBUNTU_VERSION from 22.04 to 24.04 (GCC 13) and pass -DLUCE_FA_ALL_QUANTS=OFF (keeps all symmetric KV quants, ~3× faster CUDA builds).
  • ROCm linking: pass -fuse-ld=lld when ROCm's ld.lld is present in Dockerfile.rocm.
  • CI / tooling / docs: update .github/workflows/docker.yml path triggers (server/share/**, share/model_cards/**, server/hip_compat/**, server/scripts/entrypoint.sh; drop server/test/**, pyproject.toml, uv.lock), add rocm support to scripts/build_image.sh, and update README.md Docker docs.

Follow-up (intentionally left out of this PR)

  • Slimming Dockerfile.rocm runtime off rocm/dev-ubuntu-24.04 to ubuntu:24.04 + ROCm runtime packages (best tested directly on an AMD host in a dedicated PR).

Validation

  • bash server/test/test_entrypoint.sh server/scripts/entrypoint.sh → PASS
  • bash -n on entrypoint.sh, test_entrypoint.sh, build_image.sh → PASS
  • c++ -std=gnu++17 -fsyntax-only on paged_kv_pool.h → PASS
  • .githooks/pre-push + YAML validation on .github/workflows/docker.yml → PASS
  • Full cuda12 + rocm image builds will be verified by the Docker prebuilds PR workflow.

View guided diff

…te entrypoint

- Fix cuda12 build break on main by adding missing <cstddef> to paged_kv_pool.h
- Restore server/share/ (status.html, deepseek41/*) in both runtime images and un-ignore server/share/**/*.bin in .dockerignore
- Drop unused Python/uv/PyTorch cu128 (~3+ GB) and test_dflash/test_server_unit from runtime images; build luce_server only with -DLUCE_TESTS=OFF
- Move cuda12 from Ubuntu 22.04 to 24.04 with -DLUCE_FA_ALL_QUANTS=OFF; enable ROCm ld.lld in Dockerfile.rocm
- Update entrypoint.sh + test_entrypoint.sh for deepseek41, inkling2/inkling2_loop, qwen3.8, qwen4exp, gemma4, paged attention (--ddtree guard), and LUCE_KV_CACHE_DIR + /opt/lucebox-hub/kv-cache volume
- Update docker.yml path filters, add ROCm support to scripts/build_image.sh, and refresh README.md Docker docs
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