mirror of
https://github.com/hasso5703/alzeo.git
synced 2026-12-05 12:24:28 +01:00
Every room check of the installers, of a lane's first Load and of the switch holds what df -BG prints (GiB) against a need counted in GiB, and said both in "GB". They say GiB now, with the parts they name (the Docker image's label, the video checkpoint's share) and the line that says what is left of the image and video checkpoints to download; ckpt-fetch.py says each side in its own unit. No check asks for more or for less than it did. The vLLM lanes' installers, check-pins.sh and three refusals of switch-model.sh name each lane by the title lane_registry.py gives it (Kolibri-1, Nemotron 3.5 Bolt, Nemotron 3.5 Super VL, Qwen3.8 Flash-Next FP4-Local). Also: "about 79 GB to download", 33 and 963 GB for the FP4-Local n-gram table in the sums, docs/pi.md and pi-gen.py's header. tests/test_room_unit_and_lane_names.py is new (its rule finds 24 lines in v1.46.2 and none now); nine test files quote the messages in GiB. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
454 lines
25 KiB
Bash
Executable File
454 lines
25 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Does every pin in install.sh still resolve upstream?
|
|
#
|
|
# The repo pins twice on purpose: a checkpoint revision at download time AND the
|
|
# same --revision passed to the server, plus image digests. That protects what is
|
|
# served from an upstream push, and it means a pin that upstream deletes turns a
|
|
# working install into a failing one on a machine that does not have the bytes
|
|
# yet. This script asks, once, over the network. It changes nothing.
|
|
#
|
|
# ./check-pins.sh # every pin
|
|
# ./check-pins.sh flash # only the pins whose name matches
|
|
#
|
|
# Exit 0 when every checked pin resolves, 1 otherwise: a pin that could not be
|
|
# asked about (no answer, no registry token) has not resolved. CI does not run this
|
|
# (a green build must not depend on Hugging Face being up); run it before a
|
|
# release and when an install fails on a fresh box. The "pin watch" scheduled
|
|
# workflow runs it daily and files a labeled issue when a pin dies: a watch,
|
|
# never a gate; the build stays offline-honest either way.
|
|
set -uo pipefail
|
|
REPO_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
FILTER="${1:-}"
|
|
FAIL=0
|
|
FAILED=0
|
|
UNASKED=0
|
|
CHECKED=0
|
|
|
|
# A failure is one of two kinds. A pin asked about and answered "gone" (a 404, a digest that
|
|
# changed) is dead. A pin that could not be asked about (no answer, a 5xx, a rate limit, no
|
|
# registry token) is not resolved either, and says nothing about the pin: the scheduled run of
|
|
# 2026-10-01 filed issue #33 on three 504s of the GitHub API, and every pin resolved after.
|
|
failed() { FAIL=1; FAILED=$((FAILED + 1)); }
|
|
unasked() { failed; UNASKED=$((UNASKED + 1)); }
|
|
no_answer() { # $1 http code ("000": none), [$2 x-ratelimit-remaining]: 0 when it is no answer
|
|
case "$1" in
|
|
000|""|429|5[0-9][0-9]) return 0 ;;
|
|
403) [ "${2:-}" = 0 ] && return 0 ;; # GitHub's rate limit, a 403 that says so
|
|
esac
|
|
return 1
|
|
}
|
|
said() { [ "${1:-000}" = 000 ] && echo "no answer" || echo "HTTP $1"; }
|
|
|
|
pins="$(grep -E '^(STOCK|UNC|FP8|UNCFP8|FLASH|FLASH_NVDA|FLASH_UNC|DRAFT|DRAFT2)_(REPO|REV)=' "$REPO_DIR/install.sh")"
|
|
eval "$pins"
|
|
# The pins that do not live in the pin block: opencode's release and its digest, and the
|
|
# image lane's checkpoint, source commit and wheel. None of them was checked, so a release
|
|
# or a commit removed upstream went unseen (found in review, 2026-09-24).
|
|
more="$(grep -E '^(OPENCODE_VERSION|OPENCODE_SHA256)=' "$REPO_DIR/install.sh")"
|
|
eval "$more"
|
|
lane="$(grep -E '^(IMAGE_MODEL_PIN|IMAGE_MODEL_PIN_REV|IMAGE_TURBO_PIN|IMAGE_TURBO_PIN_REV|PIN|WHEEL)=' "$REPO_DIR/install-image.sh")"
|
|
eval "$lane"
|
|
IMAGE_PIN="$PIN"; IMAGE_WHEEL="$WHEEL"
|
|
vline="$(grep -E '^(VIDEO_MODEL_PIN|VIDEO_MODEL_PIN_REV|VIDEO_TURBO_REPO|VIDEO_TURBO_REV|VIDEO_TURBO_FILE|PIN|WHEEL)=' "$REPO_DIR/install-video.sh")"
|
|
eval "$vline"
|
|
VIDEO_PIN="$PIN"; VIDEO_WHEEL="$WHEEL"
|
|
# The Kolibri lane's: its two checkpoints, the vLLM image its build starts from and the
|
|
# plugin's wheel, which nothing checked either (found in review, 2026-10-14). The wheel is the
|
|
# very file its build downloads, by URL, and its sha256 (the release alone until the audit of
|
|
# 2026-10-16).
|
|
kline="$(grep -E '^KOLIBRI_(BASE_IMAGE|PLUGIN_VERSION|PLUGIN_URL|PLUGIN_SHA256|FP8_REPO|FP8_REV|NVFP4_REPO|NVFP4_REV)=' "$REPO_DIR/install-kolibri.sh")"
|
|
eval "$kline"
|
|
# The Nemotron lane's: the model and its drafter, the vLLM nightly its build starts from and the
|
|
# b12x wheel, by URL and sha256 as well.
|
|
nline="$(grep -E '^NEMOTRON_(BASE_IMAGE|B12X_VERSION|B12X_URL|B12X_SHA256|BOLT_REPO|BOLT_REV|BOLT_DRAFT_REPO|BOLT_DRAFT_REV)=' "$REPO_DIR/install-nemotron.sh")"
|
|
eval "$nline"
|
|
# The Nemotron Super lane's: the model and its drafter (its image is the Nemotron lane's, checked above).
|
|
sline="$(grep -E '^NEMOTRON_SUPER_(REPO|REV|DRAFT_REPO|DRAFT_REV)=' "$REPO_DIR/install-nemotron-super.sh")"
|
|
eval "$sline"
|
|
# The Qwen3.8 Flash-Next FP4-Local lane's: NVIDIA's checkpoint and the image its model card names, pulled as is.
|
|
fline="$(grep -E '^FLASH_LOCAL_(REPO|REV|IMAGE)=' "$REPO_DIR/install-flash-local.sh")"
|
|
eval "$fline"
|
|
# The Ornith lane's: its authors' checkpoint (its image is the Qwen3.8 Flash-Next FP4-Local lane's, checked below).
|
|
oline="$(grep -E '^ORNITH_122B_(REPO|REV)=' "$REPO_DIR/install-ornith-122b.sh")"
|
|
eval "$oline"
|
|
# The speech lane's: llama.cpp's commit, each recognizer's two GGUF at its revision with the
|
|
# sha256 the install checks, and Kokoro's two files, which nothing checked either (found in the
|
|
# audit of 2026-10-16). Each recognizer size is a branch of install-speech.sh's case on
|
|
# SPEECH_ASR, read below one at a time; Kokoro's files are assets of a GitHub release.
|
|
spline="$(grep -E '^(LLAMA_CPP_PIN|KOKORO_URL|KOKORO_MODEL_FILE|KOKORO_VOICES_FILE)=' "$REPO_DIR/install-speech.sh")"
|
|
eval "$spline"
|
|
ASR_SIZES="$(sed -n 's/^ \([0-9][0-9.]*b\))$/\1/p' "$REPO_DIR/install-speech.sh")"
|
|
KOKORO_GH="${KOKORO_URL#https://github.com/}"
|
|
KOKORO_TAG="${KOKORO_GH##*/releases/download/}"; KOKORO_GH="${KOKORO_GH%%/releases/download/*}"
|
|
|
|
# Hugging Face answers an anonymous request with 401 both for a gated repo and for one that
|
|
# does not exist (or is private): only its x-error-code tells a gated repo apart, so the
|
|
# answer's code and that header are read together. HF_TOKEN, when set, is sent the way the
|
|
# installer's download sends it, and goes in on stdin rather than on the command line.
|
|
hf_answer() { # $1 url, [$2 "body" to keep the body, then the status on a line of its own]: prints "<http code> <x-error-code>"
|
|
local cfg="" out=(-o /dev/null) nl=""
|
|
[ -n "${HF_TOKEN:-}" ] && cfg="header = \"Authorization: Bearer $HF_TOKEN\""
|
|
[ "${2:-}" = body ] && { out=(); nl='\n'; }
|
|
printf '%s\n' "$cfg" | curl -s ${out[@]+"${out[@]}"} -m 25 -K - -w "$nl%{http_code} %header{x-error-code}" "$1"
|
|
}
|
|
|
|
# GitHub answers an anonymous caller 60 requests an hour per address, and a runner's address is
|
|
# shared: the scheduled run of 2026-10-02 got 403 with the limit spent, on both of its tries ten
|
|
# minutes apart, and filed issue #34. GITHUB_TOKEN (the workflow's own token), when set, is sent
|
|
# the way HF_TOKEN is, on stdin rather than on the command line.
|
|
gh_api() { # $1 url, $2 curl -w format, [$3 "nobody" to drop the body]: body, then the -w output
|
|
local cfg="" out=()
|
|
[ -n "${GITHUB_TOKEN:-}" ] && cfg="header = \"Authorization: Bearer $GITHUB_TOKEN\""
|
|
[ "${3:-}" = nobody ] && out=(-o /dev/null)
|
|
printf '%s\n' "$cfg" | curl -s ${out[@]+"${out[@]}"} -m 25 -K - -w "$2" "$1"
|
|
}
|
|
|
|
check_model() { # $1 label, $2 repo, $3 revision, [$4 a file at its root, default config.json, [$5 its sha256]]
|
|
case "$1" in *"$FILTER"*) ;; *) return 0 ;; esac
|
|
CHECKED=$((CHECKED + 1))
|
|
local answer code err sum
|
|
# With a sha256 the body is kept: /raw/ answers an LFS file with its pointer (134 bytes for a
|
|
# recognizer GGUF), which names the sum of the bytes a download of that revision gets.
|
|
answer="$(hf_answer "https://huggingface.co/$2/raw/$3/${4:-config.json}" ${5:+body})"
|
|
read -r code err <<<"${answer##*$'\n'}"
|
|
sum="$(sed -n 's/^oid sha256:\([0-9a-f]*\)$/\1/p' <<<"$answer")"
|
|
case "$code:$err" in
|
|
200:*) if [ -z "${5:-}" ] || [ "$sum" = "$5" ]; then
|
|
printf ' \033[0;32mok\033[0m %-14s %s @ %s\n' "$1" "$2" "${3:0:12}"
|
|
elif [ -z "$sum" ]; then
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s @ %s %s (no LFS pointer for it from Hugging Face, so its sha256 was not checked)\n' "$1" "$2" "${3:0:12}" "$4"; unasked
|
|
else
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s @ %s %s (its sha256 there is %s: installs refuse it)\n' "$1" "$2" "${3:0:12}" "$4" "$sum"; failed
|
|
fi ;;
|
|
40[13]:GatedRepo)
|
|
# the repo exists, and a fresh install without a token that accepted its terms cannot
|
|
# download it: nothing in this repo expects a gated checkpoint
|
|
if [ -n "${HF_TOKEN:-}" ]; then
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s @ %s (gated: accept its terms on huggingface.co with the account of HF_TOKEN)\n' "$1" "$2" "${3:0:12}"
|
|
else
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s @ %s (gated: a fresh install needs an HF_TOKEN that accepted its terms)\n' "$1" "$2" "${3:0:12}"
|
|
fi
|
|
failed ;;
|
|
40[13]:*) printf ' \033[0;31mFAIL\033[0m %-14s %s @ %s (HTTP %s: the repo is gone or private)\n' "$1" "$2" "${3:0:12}" "$code"; failed ;;
|
|
*) if no_answer "$code"; then
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s @ %s (%s from Hugging Face, so not checked)\n' "$1" "$2" "${3:0:12}" "$(said "$code")"; unasked
|
|
else
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s @ %s (HTTP %s)\n' "$1" "$2" "${3:0:12}" "$code"; failed
|
|
fi ;;
|
|
esac
|
|
}
|
|
|
|
# What a manifest, an index or an image config says of its platform: "linux/arm64" when it is
|
|
# that (an index naming it, the config of it), "config <digest>" for the manifest of one image,
|
|
# whose platform is in that blob, "not json", or else what it names instead. A manifest is told
|
|
# by its layers: an image config has a "config" key too, the container's (the first real run,
|
|
# 2026-10-16, read it as a manifest and failed all three single images).
|
|
platform_of() {
|
|
python3 -c '
|
|
import json, sys
|
|
try:
|
|
d = json.load(sys.stdin)
|
|
except ValueError:
|
|
d = None
|
|
if not isinstance(d, dict):
|
|
print("not json")
|
|
elif "manifests" in d:
|
|
named = sorted({"%s/%s" % ((m.get("platform") or {}).get("os"), (m.get("platform") or {}).get("architecture"))
|
|
for m in d["manifests"] if isinstance(m, dict)} - {"unknown/unknown"})
|
|
print("linux/arm64" if "linux/arm64" in named else "an index of " + (", ".join(named) or "nothing"))
|
|
elif "layers" in d:
|
|
print("config", (d.get("config") or {}).get("digest") or "none")
|
|
else:
|
|
print("%s/%s" % (d.get("os"), d.get("architecture")))
|
|
'
|
|
}
|
|
|
|
check_image() { # $1 label, $2 image reference (name@sha256:... or name:tag): it exists, and runs on linux/arm64
|
|
case "$1" in *"$FILTER"*) ;; *) return 0 ;; esac
|
|
CHECKED=$((CHECKED + 1))
|
|
local repo ref token answer code what
|
|
repo="${2%%@*}"; repo="${repo%%:*}"
|
|
case "$2" in *@*) ref="${2#*@}" ;; *) ref="${2##*:}" ;; esac
|
|
token="$(curl -s -m 25 "https://auth.docker.io/token?service=registry.docker.io&scope=repository:${repo}:pull" \
|
|
| sed -n 's/.*"token":"\([^"]*\)".*/\1/p')"
|
|
if [ -z "$token" ]; then
|
|
# not asked is not resolved: an offline run must not end in "all resolve"
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s (no registry token, so not checked: offline?)\n' "$1" "$2"
|
|
unasked
|
|
return 0
|
|
fi
|
|
answer="$(curl -s -m 25 -w '\n%{http_code}' -H "Authorization: Bearer $token" \
|
|
-H 'Accept: application/vnd.oci.image.index.v1+json' \
|
|
-H 'Accept: application/vnd.docker.distribution.manifest.list.v2+json' \
|
|
-H 'Accept: application/vnd.oci.image.manifest.v1+json' \
|
|
-H 'Accept: application/vnd.docker.distribution.manifest.v2+json' \
|
|
"https://registry-1.docker.io/v2/${repo}/manifests/${ref}")"
|
|
code="${answer##*$'\n'}"
|
|
if [ "$code" != 200 ]; then
|
|
if no_answer "$code"; then
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s (%s from the registry, so not checked)\n' "$1" "$2" "$(said "$code")"; unasked
|
|
else
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s (HTTP %s)\n' "$1" "$2" "$code"; failed
|
|
fi
|
|
return 0
|
|
fi
|
|
# The box is aarch64: a digest of no linux/arm64 image (an amd64 child pinned by mistake, an
|
|
# index without arm64) pulls, then runs nothing, and an HTTP 200 alone said "ok" (found in the
|
|
# audit of 2026-10-16). An index names its platforms; one image's config holds its own, a
|
|
# small blob away (33 to 45 KB for the three single images pinned on 2026-10-16), which the
|
|
# registry redirects to its CDN; curl does not send the token past that redirect.
|
|
what="$(printf '%s' "${answer%$'\n'*}" | platform_of)"
|
|
case "$what" in
|
|
"config "*)
|
|
answer="$(curl -s -L -m 25 -w '\n%{http_code}' -H "Authorization: Bearer $token" \
|
|
"https://registry-1.docker.io/v2/${repo}/blobs/${what#config }")"
|
|
code="${answer##*$'\n'}"
|
|
if [ "$code" != 200 ]; then
|
|
if no_answer "$code"; then
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s (%s from the registry for its config, so not checked)\n' "$1" "$2" "$(said "$code")"; unasked
|
|
else
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s (HTTP %s for its config)\n' "$1" "$2" "$code"; failed
|
|
fi
|
|
return 0
|
|
fi
|
|
what="$(printf '%s' "${answer%$'\n'*}" | platform_of)" ;;
|
|
esac
|
|
case "$what" in
|
|
linux/arm64) printf ' \033[0;32mok\033[0m %-14s %s (linux/arm64)\n' "$1" "$2" ;;
|
|
"not json") printf ' \033[0;31mFAIL\033[0m %-14s %s (the registry answered something that is not JSON, so not checked)\n' "$1" "$2"; unasked ;;
|
|
*) printf ' \033[0;31mFAIL\033[0m %-14s %s (no linux/arm64 image: %s, and the box is aarch64)\n' "$1" "$2" "$what"; failed ;;
|
|
esac
|
|
}
|
|
|
|
check_commit() { # $1 label, $2 owner/repo on GitHub, $3 commit: install-image.sh fetches it by id
|
|
case "$1" in *"$FILTER"*) ;; *) return 0 ;; esac
|
|
CHECKED=$((CHECKED + 1))
|
|
local code left
|
|
read -r code left <<<"$(gh_api "https://api.github.com/repos/$2/commits/$3" \
|
|
'%{http_code} %header{x-ratelimit-remaining}' nobody)"
|
|
case "$code" in
|
|
200) printf ' \033[0;32mok\033[0m %-14s %s @ %s\n' "$1" "$2" "${3:0:12}" ;;
|
|
*) if no_answer "$code" "$left"; then
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s @ %s (%s from the GitHub API, so not checked)\n' "$1" "$2" "${3:0:12}" "$(said "$code")"; unasked
|
|
else
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s @ %s (HTTP %s from the GitHub API: no such commit)\n' "$1" "$2" "${3:0:12}" "$code"; failed
|
|
fi ;;
|
|
esac
|
|
}
|
|
|
|
wheel_why() { # $1 package, $2 version, [$3 the URL of a file, $4 its sha256]: what PyPI lacks of it, or nothing
|
|
curl -s -m 25 "https://pypi.org/pypi/$1/$2/json" | python3 -c '
|
|
import json, sys
|
|
try:
|
|
d = json.load(sys.stdin)
|
|
except ValueError:
|
|
print("no answer from PyPI, so not checked"); sys.exit()
|
|
files = d.get("urls") or []
|
|
if (d.get("info") or {}).get("version") != sys.argv[1]:
|
|
print("not on PyPI")
|
|
elif not [u for u in files if not u.get("yanked")]:
|
|
print("every file yanked")
|
|
elif len(sys.argv) > 2:
|
|
f = next((u for u in files if u.get("url") == sys.argv[2]), None)
|
|
sha = ((f or {}).get("digests") or {}).get("sha256")
|
|
if f is None:
|
|
print("the pinned file is not one PyPI publishes for it")
|
|
elif sha != sys.argv[3]:
|
|
print("the pinned file has sha256 %s on PyPI: installs refuse it" % sha)
|
|
' "$2" ${3:+"$3" "$4"}
|
|
}
|
|
|
|
check_wheel() { # $1 label, $2 package, $3 version: released on PyPI, with a file not yanked,
|
|
# [$4 the URL of the file an install downloads, $5 its sha256: still one of that release's files, that sum]
|
|
case "$1" in *"$FILTER"*) ;; *) return 0 ;; esac
|
|
CHECKED=$((CHECKED + 1))
|
|
local why
|
|
why="$(wheel_why "$2" "$3" ${4:+"$4" "$5"})"
|
|
if [ -z "$why" ]; then
|
|
printf ' \033[0;32mok\033[0m %-14s %s==%s\n' "$1" "$2" "$3"
|
|
else
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s==%s (%s)\n' "$1" "$2" "$3" "$why"
|
|
case "$why" in *"so not checked"*) unasked ;; *) failed ;; esac
|
|
fi
|
|
}
|
|
|
|
# sglang==0.5.21, which the image and video lanes install, requires cuda-tile==1.6.0rc5, and PyPI
|
|
# holds that release as a 7 KB "wheel-stub" sdist alone: building it downloads the real wheel
|
|
# from pypi.nvidia.com, so a fresh lane needs both, and nothing watched either (found in the
|
|
# audit of 2026-10-16). The version is read from the pinned sglang's own requirements, so the
|
|
# check follows the pin. The wheel is the one a lane's venv takes, CPython 3.12 (Ubuntu 24.04's
|
|
# python3, which makes it) on aarch64, found as wheel-stub 0.5.0 finds it: in the page its
|
|
# index_url names for the project (pypi.nvidia.com/cuda-tile/), a link relative to that page.
|
|
# It is asked about with a HEAD: nothing is downloaded.
|
|
check_cuda_tile() { # $1 label, $2 the sglang release whose cuda-tile requirement is checked
|
|
case "$1" in *"$FILTER"*) ;; *) return 0 ;; esac
|
|
CHECKED=$((CHECKED + 1))
|
|
local ver why answer code wheel
|
|
ver="$(curl -s -m 25 "https://pypi.org/pypi/sglang/$2/json" | python3 -c '
|
|
import json, re, sys
|
|
try:
|
|
d = json.load(sys.stdin)
|
|
except ValueError:
|
|
d = None
|
|
if not isinstance(d, dict):
|
|
print("?")
|
|
elif (d.get("info") or {}).get("version") != sys.argv[1]:
|
|
print("-")
|
|
else:
|
|
print(next((m.group(1) for r in d["info"].get("requires_dist") or []
|
|
for m in [re.match(r"cuda[-_.]tile *== *([^ ;,]+)", r, re.I)] if m), ""))
|
|
' "$2")"
|
|
case "$ver" in
|
|
"?") printf ' \033[0;31mFAIL\033[0m %-14s cuda-tile of sglang==%s (no answer from PyPI, so not checked)\n' "$1" "$2"; unasked; return 0 ;;
|
|
-) printf ' \033[0;31mFAIL\033[0m %-14s cuda-tile of sglang==%s (sglang==%s is not on PyPI)\n' "$1" "$2" "$2"; failed; return 0 ;;
|
|
"") printf ' \033[0;31mFAIL\033[0m %-14s cuda-tile of sglang==%s (sglang==%s requires no cuda-tile: this check watches nothing, update it)\n' "$1" "$2" "$2"; failed; return 0 ;;
|
|
esac
|
|
why="$(wheel_why cuda-tile "$ver")"
|
|
if [ -n "$why" ]; then
|
|
printf " \033[0;31mFAIL\033[0m %-14s cuda-tile==%s (PyPI's stub: %s)\n" "$1" "$ver" "$why"
|
|
case "$why" in *"so not checked"*) unasked ;; *) failed ;; esac
|
|
return 0
|
|
fi
|
|
answer="$(curl -s -m 25 -w '\n%{http_code}' "https://pypi.nvidia.com/cuda-tile/")"
|
|
code="${answer##*$'\n'}"
|
|
if [ "$code" != 200 ]; then
|
|
if no_answer "$code"; then
|
|
printf ' \033[0;31mFAIL\033[0m %-14s cuda-tile==%s (%s from pypi.nvidia.com, so not checked)\n' "$1" "$ver" "$(said "$code")"; unasked
|
|
else
|
|
printf ' \033[0;31mFAIL\033[0m %-14s cuda-tile==%s (HTTP %s from pypi.nvidia.com for its index)\n' "$1" "$ver" "$code"; failed
|
|
fi
|
|
return 0
|
|
fi
|
|
wheel="$(printf '%s' "${answer%$'\n'*}" | python3 -c '
|
|
import re, sys
|
|
for href in re.findall(r"href=\"([^\"#]+)", sys.stdin.read()):
|
|
tags = href.rsplit("/", 1)[-1][:-4].split("-") if href.endswith(".whl") else []
|
|
if (len(tags) >= 5 and tags[0] == "cuda_tile" and tags[1] == sys.argv[1] and "cp312" in tags[-3].split(".")
|
|
and any(p.endswith("_aarch64") and "linux" in p for p in tags[-1].split("."))):
|
|
print(href)
|
|
break
|
|
' "$ver")"
|
|
if [ -z "$wheel" ]; then
|
|
printf ' \033[0;31mFAIL\033[0m %-14s cuda-tile==%s (pypi.nvidia.com lists no cp312 aarch64 wheel of it: a fresh image or video lane cannot install)\n' "$1" "$ver"; failed
|
|
return 0
|
|
fi
|
|
case "$wheel" in https://*) ;; /*) wheel="https://pypi.nvidia.com$wheel" ;; *) wheel="https://pypi.nvidia.com/cuda-tile/$wheel" ;; esac
|
|
code="$(curl -s -I -L -o /dev/null -m 25 -w '%{http_code}' "$wheel")"
|
|
if [ "$code" = 200 ]; then
|
|
printf ' \033[0;32mok\033[0m %-14s cuda-tile==%s, %s on pypi.nvidia.com\n' "$1" "$ver" "${wheel##*/}"
|
|
elif no_answer "$code"; then
|
|
printf ' \033[0;31mFAIL\033[0m %-14s cuda-tile==%s (%s from pypi.nvidia.com for %s, so not checked)\n' "$1" "$ver" "$(said "$code")" "${wheel##*/}"; unasked
|
|
else
|
|
printf ' \033[0;31mFAIL\033[0m %-14s cuda-tile==%s (HTTP %s from pypi.nvidia.com for %s)\n' "$1" "$ver" "$code" "${wheel##*/}"; failed
|
|
fi
|
|
}
|
|
|
|
check_asset() { # $1 label, $2 owner/repo, $3 release tag, $4 asset, $5 its sha256: GitHub's digest must match,
|
|
# [$6 "undigested": an asset GitHub keeps no digest for (uploaded before it kept them), which must exist]
|
|
case "$1" in *"$FILTER"*) ;; *) return 0 ;; esac
|
|
CHECKED=$((CHECKED + 1))
|
|
local answer status code left digest
|
|
# The body alone said "no such release", "no such asset" and "no answer" the same way, and
|
|
# issue #33 read a 504 as a release gone: the code and the rate-limit header come after it.
|
|
answer="$(gh_api "https://api.github.com/repos/$2/releases/tags/$3" '\n%{http_code} %header{x-ratelimit-remaining}')"
|
|
status="${answer##*$'\n'}"
|
|
read -r code left <<<"$status"
|
|
digest="$(printf '%s' "${answer%$'\n'*}" | python3 -c '
|
|
import json, sys
|
|
try:
|
|
d = json.load(sys.stdin)
|
|
except ValueError:
|
|
print("not json"); sys.exit()
|
|
print(next((a.get("digest") or "none" for a in d.get("assets") or [] if a.get("name") == sys.argv[1]), "absent"))
|
|
' "$4")"
|
|
if [ "$code" != 200 ] && no_answer "$code" "$left"; then
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s %s %s (%s from the GitHub API, so not checked)\n' "$1" "$2" "$3" "$4" "$(said "$code")"; unasked
|
|
return 0
|
|
fi
|
|
case "$code:$digest" in
|
|
"200:sha256:$5") printf ' \033[0;32mok\033[0m %-14s %s %s %s\n' "$1" "$2" "$3" "$4" ;;
|
|
200:absent) printf ' \033[0;31mFAIL\033[0m %-14s %s %s %s (the release has no such asset)\n' "$1" "$2" "$3" "$4"; failed ;;
|
|
200:none) if [ "${6:-}" = undigested ]; then
|
|
printf ' \033[0;32mok\033[0m %-14s %s %s %s (no digest on GitHub: the install checks its sha256)\n' "$1" "$2" "$3" "$4"
|
|
else
|
|
printf ' \033[0;31mFAIL\033[0m %-14s %s %s %s (GitHub publishes no digest for it: not checked)\n' "$1" "$2" "$3" "$4"; failed
|
|
fi ;;
|
|
"200:not json") printf ' \033[0;31mFAIL\033[0m %-14s %s %s %s (the GitHub API answered something that is not JSON, so not checked)\n' "$1" "$2" "$3" "$4"; unasked ;;
|
|
200:*) printf ' \033[0;31mFAIL\033[0m %-14s %s %s %s (its digest is now %s: installs refuse it)\n' "$1" "$2" "$3" "$4" "$digest"; failed ;;
|
|
*) printf ' \033[0;31mFAIL\033[0m %-14s %s %s %s (HTTP %s from the GitHub API: no such release)\n' "$1" "$2" "$3" "$4" "$code"; failed ;;
|
|
esac
|
|
}
|
|
|
|
echo "Checkpoints"
|
|
check_model stock "$STOCK_REPO" "$STOCK_REV"
|
|
check_model uncensored "$UNC_REPO" "$UNC_REV"
|
|
check_model fp8 "$FP8_REPO" "$FP8_REV"
|
|
check_model uncensored-fp8 "$UNCFP8_REPO" "$UNCFP8_REV"
|
|
check_model flash "$FLASH_REPO" "$FLASH_REV"
|
|
check_model flash-nvda "$FLASH_NVDA_REPO" "$FLASH_NVDA_REV"
|
|
check_model flash-unc "$FLASH_UNC_REPO" "$FLASH_UNC_REV"
|
|
check_model dflash2-draft "$DRAFT2_REPO" "$DRAFT2_REV"
|
|
check_model dspark-draft "$DRAFT_REPO" "$DRAFT_REV"
|
|
|
|
echo "Image lane and opencode"
|
|
check_model qwen-image "$IMAGE_MODEL_PIN" "$IMAGE_MODEL_PIN_REV" model_index.json
|
|
check_model qwen-image-turbo "$IMAGE_TURBO_PIN" "$IMAGE_TURBO_PIN_REV" model_index.json
|
|
check_commit sglang-source sgl-project/sglang "$IMAGE_PIN"
|
|
check_wheel sglang-wheel sglang "$IMAGE_WHEEL"
|
|
check_cuda_tile cuda-tile "$IMAGE_WHEEL"
|
|
echo "Video lane"
|
|
check_model minimax-h3 "$VIDEO_MODEL_PIN" "$VIDEO_MODEL_PIN_REV" model_index.json
|
|
check_model video-turbo "$VIDEO_TURBO_REPO" "$VIDEO_TURBO_REV" "$VIDEO_TURBO_FILE"
|
|
check_commit sglang-source-video sgl-project/sglang "$VIDEO_PIN"
|
|
check_wheel sglang-wheel-video sglang "$VIDEO_WHEEL"
|
|
check_cuda_tile cuda-tile-video "$VIDEO_WHEEL"
|
|
check_asset opencode anomalyco/opencode "v$OPENCODE_VERSION" opencode-linux-arm64.tar.gz "$OPENCODE_SHA256"
|
|
echo "Kolibri-1 lane"
|
|
check_model kolibri-fp8 "$KOLIBRI_FP8_REPO" "$KOLIBRI_FP8_REV"
|
|
check_model kolibri-nvfp4 "$KOLIBRI_NVFP4_REPO" "$KOLIBRI_NVFP4_REV"
|
|
check_wheel kolibri-plugin aleph-alpha-inference "$KOLIBRI_PLUGIN_VERSION" "$KOLIBRI_PLUGIN_URL" "$KOLIBRI_PLUGIN_SHA256"
|
|
echo "Nemotron 3.5 Bolt lane"
|
|
check_model nemotron-bolt "$NEMOTRON_BOLT_REPO" "$NEMOTRON_BOLT_REV"
|
|
check_model nemotron-draft "$NEMOTRON_BOLT_DRAFT_REPO" "$NEMOTRON_BOLT_DRAFT_REV"
|
|
check_wheel nemotron-b12x b12x "$NEMOTRON_B12X_VERSION" "$NEMOTRON_B12X_URL" "$NEMOTRON_B12X_SHA256"
|
|
echo "Nemotron 3.5 Super VL lane"
|
|
check_model nemotron-super "$NEMOTRON_SUPER_REPO" "$NEMOTRON_SUPER_REV"
|
|
check_model super-draft "$NEMOTRON_SUPER_DRAFT_REPO" "$NEMOTRON_SUPER_DRAFT_REV"
|
|
echo "Qwen3.8 Flash-Next FP4-Local lane"
|
|
check_model flash-local "$FLASH_LOCAL_REPO" "$FLASH_LOCAL_REV"
|
|
echo "Ornith 1.5 122B lane"
|
|
check_model ornith-122b "$ORNITH_122B_REPO" "$ORNITH_122B_REV"
|
|
echo "Speech lane"
|
|
check_commit speech-llama-cpp ggml-org/llama.cpp "$LLAMA_CPP_PIN"
|
|
for size in $ASR_SIZES; do
|
|
# unset first: a branch that no longer reads would otherwise check the previous size again
|
|
unset ASR_REPO ASR_REV ASR_FILE ASR_SHA MMPROJ_FILE MMPROJ_SHA
|
|
eval "$(sed -n "/^ $size)\$/,/;;\$/p" "$REPO_DIR/install-speech.sh" | grep -E '^ +(ASR_REPO|ASR_FILE|MMPROJ_FILE)=')"
|
|
check_model "speech-asr-$size" "$ASR_REPO" "$ASR_REV" "$ASR_FILE" "$ASR_SHA"
|
|
check_model "speech-mmproj-$size" "$ASR_REPO" "$ASR_REV" "$MMPROJ_FILE" "$MMPROJ_SHA"
|
|
done
|
|
check_asset speech-kokoro "$KOKORO_GH" "$KOKORO_TAG" "$KOKORO_MODEL_FILE" "$KOKORO_MODEL_SHA" undigested
|
|
check_asset speech-voices "$KOKORO_GH" "$KOKORO_TAG" "$KOKORO_VOICES_FILE" "$KOKORO_VOICES_SHA" undigested
|
|
|
|
echo "Images"
|
|
img="$(grep -E '^(IMAGE|FLASH_IMAGE)=' "$REPO_DIR/install.sh")"
|
|
eval "$img"
|
|
check_image 27b-base "$IMAGE"
|
|
check_image flash-base "$FLASH_IMAGE"
|
|
check_image kolibri-base "$KOLIBRI_BASE_IMAGE"
|
|
check_image nemotron-base "$NEMOTRON_BASE_IMAGE"
|
|
check_image flash-local "$FLASH_LOCAL_IMAGE"
|
|
|
|
echo
|
|
if [ "$FAIL" -eq 0 ]; then
|
|
printf '\033[0;32m%s pins checked, all resolve.\033[0m\n' "$CHECKED"
|
|
elif [ "$UNASKED" -eq "$FAILED" ]; then
|
|
printf '\033[0;31m%s of %s pins could not be asked about.\033[0m That says nothing about the pins\n' "$UNASKED" "$CHECKED"
|
|
printf '(no answer, or an error on the other side): run it again before re-pinning anything.\n'
|
|
else
|
|
printf '\033[0;31mSome pins do not resolve.\033[0m A removed upstream revision is not fixable\n'
|
|
printf 'from here: open an issue, and in the meantime MODEL_REV=main ./install.sh serves\n'
|
|
printf 'the current revision instead of the validated one.\n'
|
|
fi
|
|
exit "$FAIL"
|