From d0ac0d1ca42d66a0b84abd98d4a54116fe0c59b8 Mon Sep 17 00:00:00 2001 From: igneum-labs <337424239+igneum-labs@users.noreply.github.com> Date: Tue, 6 Oct 2026 11:52:18 +0000 Subject: [PATCH] tools/fleet: publish the rented-GPU fleet page's data to the downloads host The page lives at an unlisted path on dl.igneum.network (name in ~/.config/igneum/fleet-path) and reads fleet.json every 30 s; this script copies a fleet.json in and deploys, then checks the edge serves it. Co-Authored-By: Claude Fable 5.1 --- tools/fleet/publish-fleet.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 tools/fleet/publish-fleet.sh diff --git a/tools/fleet/publish-fleet.sh b/tools/fleet/publish-fleet.sh new file mode 100755 index 000000000..eb9cb932c --- /dev/null +++ b/tools/fleet/publish-fleet.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +# Publish the rented-GPU fleet page's data: copies a fleet.json into the downloads site's fleet folder and deploys. +# tools/fleet/publish-fleet.sh (the fleet agent calls this after every change, at most once a minute) +# The folder name is in ~/.config/igneum/fleet-path; the page is dl.igneum.network// (noindex, unlisted). +set -euo pipefail +JSON="${1:?fleet.json path}" +DLSITE="$(cat "$HOME/.config/igneum/dlsite-dir")"; P="$(cat "$HOME/.config/igneum/fleet-path")" +python3 -c "import json,sys; json.load(open(sys.argv[1]))" "$JSON" +cp "$JSON" "$DLSITE/$P/fleet.json" +(cd "$DLSITE" && npx --yes vercel@latest --global-config "$HOME/.config/igneum/vercel" deploy --prod --yes >/dev/null 2>&1) || { echo "deploy failed" >&2; exit 1; } +for i in $(seq 1 12); do + if curl -fsS --max-time 10 "https://dl.igneum.network/$P/fleet.json?t=$(date +%s)" | python3 -c "import json,sys; d=json.load(sys.stdin); sys.exit(0 if d.get('spend',{}).get('updated_at')==json.load(open('$JSON')).get('spend',{}).get('updated_at') else 1)" 2>/dev/null; then echo "live: https://dl.igneum.network/$P/"; exit 0; fi + sleep 5 +done +echo "deployed but the edge still serves the previous file" >&2; exit 2