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