From de513ab08031c6e0a4dabcaef06f87058eca1aa6 Mon Sep 17 00:00:00 2001 From: Frank Date: Sat, 26 Sep 2026 17:08:13 -0700 Subject: [PATCH] deploy-remote: stat the frank-primary payload, do not wc it wc -c falls back to reading the whole stream when its fstat shortcut does not apply, and this gate runs over a 377 GiB GGUF: the 2026-09-26 cutover deploy sat in wc for minutes (30 s of CPU, NVMe-bound) before it could reach the cutover at all. stat -c %s is metadata-only and equally exact. --- scripts/deploy-remote.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/deploy-remote.sh b/scripts/deploy-remote.sh index 7b333fe..6e1fa0c 100755 --- a/scripts/deploy-remote.sh +++ b/scripts/deploy-remote.sh @@ -1345,8 +1345,11 @@ deploy_llm_primary() { echo "frank-primary: podman build --build-arg LUCE_HIP_ARCHES=gfx1201 --build-arg ROCM_VERSION=7.14.1-full -t localhost/lucebox-rocm:gfx1201 -f Dockerfile.rocm . (see runbook)" >&2 missing=1 fi - local got_size - got_size="$(wc -c < "$model" 2>/dev/null || echo 0)" + # stat -c %s, never `wc -c < FILE`. wc falls back to reading the whole + # stream whenever its fstat shortcut does not apply, and this payload is + # 377 GiB: on 2026-09-26 a deploy sat in wc for minutes (30 s of CPU, + # NVMe-bound) before it could even reach the cutover. + got_size="$(stat -c %s "$model" 2>/dev/null || echo 0)" if [[ "$got_size" != "$want_size" ]]; then echo "ERROR: model absent or incomplete at $model (have $got_size, want $want_size)" >&2 missing=1