mirror of
https://github.com/hasso5703/alzeo.git
synced 2026-12-05 12:24:28 +01:00
install-image.sh: one block says what a serving lane does, and the tests that read it
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f3a2818065
commit
a6eb9ff888
4 files changed
+8
-8
No files matched your search
+5
-5
@@ -241,11 +241,11 @@ install_service(){
|
||||
# A serving image lane restarts to run them (Hasan, 2026-10-30, v1.40.6): about 70 s, and an image being made
|
||||
# then is lost. Its own sockets' filter came in with a unit, which a lane that kept serving never read. The
|
||||
# video lane, 12 to 15 min to boot, keeps its NOTE.
|
||||
if [ "$SMOKE" -eq 0 ] && [ -n "${QWEN38_KEEPS_SERVING:-}" ] && lane_serves_older "$UNIT" "${LANE_FILES[@]}"; then
|
||||
echo "NOTE: the image lane, started by hand, goes on serving with the files it started with: its next start takes the new ones"
|
||||
elif [ "$SMOKE" -eq 0 ] && lane_serves_older "$UNIT" "${LANE_FILES[@]}"; then
|
||||
echo "the image lane serves older files than the ones installed now (its unit, its runtime or its start scripts): restarting it (about 70 s)"
|
||||
sudo systemctl restart "$UNIT" \
|
||||
if [ "$SMOKE" -eq 0 ] && lane_serves_older "$UNIT" "${LANE_FILES[@]}"; then
|
||||
# not under a run of install.sh that starts and stops no lane (QWEN38_KEEPS_SERVING)
|
||||
[ -z "${QWEN38_KEEPS_SERVING:-}" ] || echo "NOTE: the image lane, started by hand, goes on serving with the files it started with: its next start takes the new ones"
|
||||
[ -n "${QWEN38_KEEPS_SERVING:-}" ] || echo "the image lane serves older files than the ones installed now (its unit, its runtime or its start scripts): restarting it (about 70 s)"
|
||||
[ -n "${QWEN38_KEEPS_SERVING:-}" ] || sudo systemctl restart "$UNIT" \
|
||||
|| echo "NOTE: the image lane did not restart; it runs the older files until: sudo systemctl restart $UNIT"
|
||||
fi
|
||||
# Installed, not switched to: the lane this box serves stays the lane it serves. The image
|
||||
|
||||
@@ -307,7 +307,7 @@ class SudosTimestampLastsAsLongAsTheRun(Tmp):
|
||||
class AnInstallBesideALaneStartedByHand(Tmp):
|
||||
"""The image lane is restarted to run new files (v1.40.6), but not under a run that says it starts and stops none."""
|
||||
TEXT = (REPO / "install-image.sh").read_text()
|
||||
BLOCK = TEXT[TEXT.index(' if [ "$SMOKE" -eq 0 ] && [ -n "${QWEN38_KEEPS_SERVING:-}" ]'):]
|
||||
BLOCK = TEXT[TEXT.index(' if [ "$SMOKE" -eq 0 ] && lane_serves_older "$UNIT" "${LANE_FILES[@]}"; then'):]
|
||||
BLOCK = BLOCK[:BLOCK.index("\n fi\n") + 6]
|
||||
|
||||
def run_block(self, **env):
|
||||
|
||||
@@ -98,7 +98,7 @@ class TheFileThatWinsIsEditedToo(unittest.TestCase):
|
||||
|
||||
def test_the_fit_reads_it_as_a_file_of_its_own(self):
|
||||
text = (REPO / "oc-fit-limits.py").read_text()
|
||||
self.assertIn('("user", Path.home() / ".config/opencode/opencode.jsonc")', text)
|
||||
self.assertIn('*(("user", p) for p in shadow_config())', text)
|
||||
self.assertIn('"OC_ONE_FILE": "1"', text)
|
||||
h = Home(block(1, 1), block(2, 2))
|
||||
self.assertEqual(h.run("oc-merge-limits.py", h.json, "qwen38", "qwen3.8-27b", 548000, 32000, OC_ONE_FILE="1").returncode, 0)
|
||||
|
||||
@@ -36,7 +36,7 @@ CALLS = {
|
||||
("install-image.sh", '"$VENV/bin/python" "$HERE/ckpt-fetch.py" "$MODEL" "$MODEL_REV" --refs-main pin'),
|
||||
"switch-model.sh, the image lane":
|
||||
("switch-model.sh", '"$IMG_PY" "$REPO_DIR/ckpt-fetch.py" "$IMG_MODEL" "$IMG_REV" --offline-first \\\n'
|
||||
' --need-gb 34 --free-gb "$(dl_free_gb "${IMG_HF:-$HF_CACHE}")" --refs-main pin'),
|
||||
' --need-gb 34 --free-gb "$(dl_free_gb "${IMG_HF:-$HF_CACHE}")" --refs-main "$IMG_REFS"'),
|
||||
"install-video.sh":
|
||||
("install-video.sh", '"$VENV/bin/python" "$HERE/ckpt-fetch.py" "$MODEL" "$MODEL_REV" --allow "$ALLOW" --refs-main pin'),
|
||||
"switch-model.sh, the video lane":
|
||||
|
||||
Reference in new issue
Block a user