Files
alzeo/dashboard/engines.py
T
Hasan BasbunarandClaude Opus 5.5 7525869354 cockpit: the Inkling 2 Mini lane's engine is known by the version its image says, 0.0.0.dev1+inkling2
The engines table held the image's commit, 03fde9cc, as what its engine reports, which was never read:
on the reference box /server_info says 0.0.0.dev1+inkling2 (the lane's own unit, 2026-11-24). No live
version matched, and the card read "SGLang 0.0.0.dev1+inkling2", the form the page keeps for an
operator's own image, instead of "SGLang nightly 03fde9cc" (code review of v1.59.0). The test fails on
the code before.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-24 16:38:13 +01:00

122 lines
9.3 KiB
Python

"""The engine each lane runs, and its version, as the cockpit names them everywhere (decision 1178 of Hasan,
2026-11-07: « voir quel moteur est utilisé pour chaque lane, chaque modèle dans le cockpit »).
One table, by unit: the engine's name, its version as its makers number it, and what the lane's installer pins
for it (an image by its digest, or a wheel by its version). tests/test_engines.py reads each installer and fails
when a pin moves without this table: a version said here is the one the box installs.
Each version was read in the pinned image itself on the reference box on 2026-11-08 (importlib.metadata in the
image's Python, or the image's /workspace/build-metadata.yaml), never from a tag name alone.
reports: the version string the engine itself says when it serves the pinned image (SGLang's /server_info, vLLM's
/version: its package's own version, read in each image the same day, in the image the lane runs; llama.cpp's /props,
its build_info). The page says the serving lane's engine by what it reports: a version other than this one is an image
of the operator's. None for the diffusion lanes, whose version the cockpit does not read."""
ENGINES = {
# install.sh IMAGE ; the image's sglang distribution says 0.5.22
"qwen38-sglang.service": {
"engine": "SGLang", "version": "0.5.22", "reports": "0.5.22",
"pin": "lmsysorg/sglang@sha256:e3a4f06001a29542fc4a8638536d9ffc5eb9c9942b08603c09b19a56eae4a1ae",
"tag": "lmsysorg/sglang:v0.5.22"},
# install.sh FLASH_IMAGE, the nightly-cu134-20261011-53295c6 tag ; its sglang says 0.0.0.dev1+g53295c697
"qwen38-flash.service": {
"engine": "SGLang", "version": "nightly 53295c6", "reports": "0.0.0.dev1+g53295c697",
"pin": "lmsysorg/sglang@sha256:3e79541d1e2a6818979c4aa9ca1fa63d6961d7bc50120867953ea6baaf1d8f62",
"tag": "lmsysorg/sglang:nightly-cu134-20261011-53295c6"},
# install-flash-local.sh FLASH_LOCAL_IMAGE ; build-metadata.yaml: vLLM of local-inference-lab, branch
# dev/karmic-kraken, commit 8244d1c, built 2026-10-15, with b12x
"qwen38-flash-local.service": {
"engine": "vLLM", "version": "b12x build 8244d1c", "reports": "0.1.dev21830+g8244d1c44.d20261015",
"pin": "eugr/spark-vllm-b12x@sha256:03a956544e9f9b4b7ba91690469fbe7848bdbef29a7d2e0f5788368467bb3595"},
# install-ornith-122b.sh takes the Flash FP4-Local lane's image
"qwen38-ornith-122b.service": {
"engine": "vLLM", "version": "b12x build 8244d1c", "reports": "0.1.dev21830+g8244d1c44.d20261015",
"pin": "eugr/spark-vllm-b12x@sha256:03a956544e9f9b4b7ba91690469fbe7848bdbef29a7d2e0f5788368467bb3595"},
# install-kolibri.sh KOLIBRI_BASE_IMAGE (vLLM 0.29.0) and KOLIBRI_PLUGIN_VERSION, Aleph Alpha's plugin
"qwen38-kolibri.service": {
"engine": "vLLM", "version": "0.29.0 + Aleph Alpha plugin 1.0.0", "reports": "0.29.0",
"pin": "vllm/vllm-openai@sha256:18372a7224938643461b846fb64c5c9d3d6e9727e82caf2dc3043e620c9d4d7a",
# the image install-kolibri.sh builds on the pin with the plugin, the tag its unit starts (LOCAL_IMAGE)
"unit_image": "qwen38-kolibri:vllm0.29.0-aai1.0.0-18372a72249386434"},
# install-nemotron.sh NEMOTRON_VLLM_LABEL and NEMOTRON_B12X_VERSION, built on NEMOTRON_BASE_IMAGE
"qwen38-nemotron.service": {
"engine": "vLLM", "version": "nightly 77154ca6 + b12x 1.5.1", "reports": "0.32.0rc1.dev100+g77154ca61",
"pin": "vllm/vllm-openai@sha256:1ee85ca80e0fc110017d79ea2081a0cbef9a208a05d7f22724801bcf6a956620",
# the image install-nemotron.sh builds on the pin with b12x, the tag its unit starts (LOCAL_IMAGE)
"unit_image": "qwen38-nemotron:vllm77154ca6-b12x1.5.1-1ee85ca80e0fc"},
"qwen38-nemotron-super.service": {
"engine": "vLLM", "version": "nightly 77154ca6 + b12x 1.5.1", "reports": "0.32.0rc1.dev100+g77154ca61",
"pin": "vllm/vllm-openai@sha256:1ee85ca80e0fc110017d79ea2081a0cbef9a208a05d7f22724801bcf6a956620",
"unit_image": "qwen38-nemotron:vllm77154ca6-b12x1.5.1-1ee85ca80e0fc"},
# install-flash-unsloth.sh FLASH_UNSLOTH_IMAGE: llama.cpp's own server image for arm64 with CUDA 13
# (server-cuda13), its labels saying version b12316 and revision 5d4c8eeb24db049acf74bd6f354bed6eaeffc7dc (docker
# image inspect on the reference box, 2026-11-12). llama.cpp numbers its versions by build, and its /props says
# build_info as "b<build>-<commit>" (common/build-info.cpp.in), the commit as git shortens it: 9 characters in
# b12282's image, measured first, whose llama-server --version said "version: 0.9.0-dev (build 12282, commit
# aa75ff323)" (2026-11-11), hence 5d4c8eeb2 here, and its /props said "b12316-5d4c8eeb2" on the box at the lane's
# first proof (2026-11-12, in both of its windows).
"qwen38-flash-unsloth.service": {
"engine": "llama.cpp", "version": "b12316", "reports": "b12316-5d4c8eeb2",
"pin": "ghcr.io/ggml-org/llama.cpp@sha256:a5600a59c704208491adbb96505454a8d3d4cd3a9db48b03cf2760b660b7fd16"},
# install-transcribe.sh TRANSCRIBE_IMAGE: the Unsloth GGUF lane's image, by the same digest (v1.51), so the same build
"qwen38-transcribe.service": {
"engine": "llama.cpp", "version": "b12316", "reports": "b12316-5d4c8eeb2",
"pin": "ghcr.io/ggml-org/llama.cpp@sha256:a5600a59c704208491adbb96505454a8d3d4cd3a9db48b03cf2760b660b7fd16"},
# install-lfm25.sh LFM25_IMAGE: the 27B lane's image, by the same digest, so the same SGLang
"qwen38-lfm25.service": {
"engine": "SGLang", "version": "0.5.22", "reports": "0.5.22",
"pin": "lmsysorg/sglang@sha256:e3a4f06001a29542fc4a8638536d9ffc5eb9c9942b08603c09b19a56eae4a1ae",
"tag": "lmsysorg/sglang:v0.5.22"},
# install-lfm3.sh LFM3_IMAGE: vLLM's own nightly image of commit 60bd6dd; its vllm distribution says
# 0.34.0rc1.dev571+g60bd6dd2e (importlib.metadata in the image, 2026-11-16)
"qwen38-lfm3.service": {
"engine": "vLLM", "version": "nightly 60bd6dd", "reports": "0.34.0rc1.dev571+g60bd6dd2e",
"pin": "vllm/vllm-openai@sha256:19cfbac06cfed28a2eb2c08950e62b4b07fd6e20685ad6e10f9422236d39e519"},
# install-inkling.sh INKLING_IMAGE: SGLang's inkling-2-mini image, whose build label (ai.sglang.image.tag, docker image
# inspect on the reference box, 2026-11-24) says nightly-dev-20261120-03fde9cc, commit 03fde9cc392a. Its engine says
# 0.0.0.dev1+inkling2 in /server_info (the lane's own unit on the reference box, 2026-11-24), a version that names no
# commit: reports holds it as said, and the pin is named by the build label. reports held the commit, which no live
# version matched, and the card read "SGLang 0.0.0.dev1+inkling2", the form the page keeps for an operator's own image
# (code review of v1.59.0, 2026-11-24)
"qwen38-inkling.service": {
"engine": "SGLang", "version": "nightly 03fde9cc", "reports": "0.0.0.dev1+inkling2",
"pin": "lmsysorg/sglang@sha256:bc811ac7ac68c6fca116a49750baca817b8613a30abface8a347682b55d132e3"},
# install-image.sh and install-video.sh WHEEL: SGLang's diffusion runtime in the lane's own venv
"qwen38-image.service": {"engine": "SGLang Diffusion", "version": "0.5.21", "reports": None,
"pin": "sglang[diffusion]==0.5.21"},
"qwen38-video.service": {"engine": "SGLang Diffusion", "version": "0.5.21", "reports": None,
"pin": "sglang[diffusion]==0.5.21"},
# install-image-h3.sh PIN and WHEEL: SGLang's main at a commit, over the v0.5.23 wheel, in the lane's own venv
"qwen38-image-h3.service": {"engine": "SGLang Diffusion", "version": "main 49f1a44", "reports": None,
"pin": "sglang[diffusion]==0.5.23 at 49f1a44ee348"},
}
def label(unit: str) -> str:
"""« SGLang 0.5.22 » : the engine and its version, the one way the cockpit says them; '' for a unit it has none."""
e = ENGINES.get(unit)
return f"{e['engine']} {e['version']}" if e else ""
def page_table() -> dict:
"""What the page reads (its config): by unit, the engine, its version, the label, the pin, which the Library
compares with a recipe's image (a recipe of the operator's may name another image), and what the engine reports
when it serves the pin."""
return {u: {"engine": e["engine"], "version": e["version"], "label": label(u), "pin": e["pin"],
"reports": e["reports"]} for u, e in ENGINES.items()}
def runs_pin(unit: str, images) -> "bool | None":
"""Whether a unit that starts these images runs its pinned engine: the pin by its digest, or, for a lane that
builds its image on the pin, the exact tag its installer gives that build (unit_image: its plugin, its b12x and
its base in the name), or the moving tag of the pin (tag). None when that cannot be told: no image read (no unit file), or a pin that is a wheel (the
diffusion lanes). A build tag guessed by its digest's first hex digits held 13 of them for Nemotron, one more
character in its pins away from failing, and said nothing of its b12x (code review of v1.45.0)."""
e = ENGINES[unit]
if "@sha256:" not in e["pin"] or not images:
return None
digest = e["pin"].split("@sha256:", 1)[1]
# or its moving tag, which install.sh itself offers when the digest cannot be pulled (IMAGE=lmsysorg/sglang:v0.5.22)
return any(digest in image or image in (e.get("unit_image"), e.get("tag")) for image in images)