engine: opt-in Original serve without a KAR archive (LELEKA_ORIGINAL_SERVE_GGUF_PLE=1, set by rtx5090-32g-gguf-ple); install script takes the engine binary

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Pavlo Ratushnyi
2026-11-05 10:48:41 +01:00
co-authored by Claude Sonnet 5.5
parent 02c578e24d
commit dc988dc53b
6 changed files with 31 additions and 9 deletions
+8 -5
View File
@@ -1,10 +1,11 @@
#!/usr/bin/env bash
# Install the KAR on / off tools on the server (run ON the server): kar_off_install.sh LELEKA_BINARY SCRIPTS_DIR
# Install the KAR on / off tools on the server (run ON the server): kar_off_install.sh LELEKA_BINARY SCRIPTS_DIR [LELEKA_INFERENCE_BINARY]
# LELEKA_BINARY the `leleka` built from the kar_source=none commit (Linux x86_64) SCRIPTS_DIR scripts/e2e/kar-off copied to the server
# LELEKA_INFERENCE_BINARY the engine built from the same commit (the GGUF-PLE opt-in LELEKA_ORIGINAL_SERVE_GGUF_PLE); both arms then run this engine
# Creates /data/leleka-e2e/kar-off-ab/{tools,pkg,inputs.sha256,INSTALL.sha256,pkg.sha256}. The package is the release 17e3729 binaries (hard links, no copy) with `leleka` replaced; nothing under
# codex-compare/ or spd-gap/ is changed. Frozen measurement inputs (tools + the recorded requests of the two cells) are listed with their sha256.
set -euo pipefail
BIN=${1:?leleka binary}; SRC=${2:?scripts dir}
BIN=${1:?leleka binary}; SRC=${2:?scripts dir}; ENG=${3:-}
K=/data/leleka-e2e/kar-off-ab; CMP=/data/leleka-e2e/codex-compare
mkdir -p "$K/tools" "$K/pkg/bin" "$K/runs"
chmod u+w "$K"/tools/* "$K"/pkg/bin/leleka "$K"/*.sha256 2>/dev/null || true
@@ -13,11 +14,13 @@ install -m 0555 /data/leleka-e2e/spd-gap/tools/replay_fwd.py "$K/tools/replay_fw
OURS=$CMP/ours-pkg
for b in leleka-cli leleka-daemon leleka-inference leleka-seal-exec strata-next; do ln -f "$OURS/bin/$b" "$K/pkg/bin/$b" 2>/dev/null || cp -p "$OURS/bin/$b" "$K/pkg/bin/$b"; done
install -m 0555 "$BIN" "$K/pkg/bin/leleka"
python3 -I - "$OURS/MANIFEST.json" "$K/pkg/MANIFEST.json" "$K/pkg/bin/leleka" <<'PY'
[ -n "$ENG" ] && install -m 0555 "$ENG" "$K/pkg/bin/leleka-inference"
python3 -I - "$OURS/MANIFEST.json" "$K/pkg/MANIFEST.json" "$K/pkg/bin" <<'PY'
import hashlib, json, sys
m = json.load(open(sys.argv[1]))
m["binaries"]["leleka"] = hashlib.sha256(open(sys.argv[3], "rb").read()).hexdigest()
m["kar_off_ab_note"] = "`leleka` rebuilt from the kar_source=none commit (docs/experiments/kar-off-ab-5090.md); every other binary is the release 17e3729 one"
for b in ("leleka", "leleka-inference"):
m["binaries"][b] = hashlib.sha256(open(sys.argv[3] + "/" + b, "rb").read()).hexdigest()
m["kar_off_ab_note"] = "`leleka` and `leleka-inference` rebuilt from the kar_source=none commits (docs/experiments/kar-off-ab-5090.md); the other binaries are the release 17e3729 ones"
json.dump(m, open(sys.argv[2], "w"), indent=2)
PY
( cd "$K/pkg" && sha256sum bin/* MANIFEST.json > ../pkg.sha256 )
+3 -1
View File
@@ -71,6 +71,8 @@ def main():
ap.add_argument("--md")
ap.add_argument("--json")
a = ap.parse_args()
if hasattr(sys.stdout, "reconfigure"):
sys.stdout.reconfigure(encoding="utf-8")
runs = {}
for d in sorted(glob.glob(os.path.join(a.run_dir, "*-p[0-9]*"))):
m = re.match(r"(kar|gguf)-p(\d+)$", os.path.basename(d))
@@ -104,7 +106,7 @@ def main():
text = "\n".join(lines) + "\n"
print(text)
if a.md:
open(a.md, "w").write(text)
open(a.md, "w", encoding="utf-8").write(text)
if a.json:
json.dump({"runs": {f"{k[0]}-p{k[1]}": v for k, v in runs.items()}, "summary": summary}, open(a.json, "w"), indent=1)
return 0