frank-large: serve script feeds the launcher its runtime root from the SDK venv

The CIRU launcher gates on hip/lib/libamdhip64.so + rocr/lib/libhsa-runtime64.so
under its runtime root and exits 2 without them; the build links the private
venv through its RUNPATH, so point those entries at the venv's unversioned
devel symlinks (idempotent ln -sfn). Without this the unit crash-looped for
the full 2400s health gate on first deploy.
This commit is contained in:
Frank
2026-09-19 03:49:04 -07:00
parent b6ce3afb1f
commit f68bda56c7
2 changed files with 25 additions and 0 deletions
+14
View File
@@ -53,6 +53,20 @@ if [[ ! -x "$SERVER_BIN" ]]; then
echo "build it: bash $RUNTIME_DIR/scripts/ciru/setup-linux-amd.sh --install-host-deps" >&2 echo "build it: bash $RUNTIME_DIR/scripts/ciru/setup-linux-amd.sh --install-host-deps" >&2
exit 1 exit 1
fi fi
# The launcher gates on a runtime root holding hip/lib/libamdhip64.so and
# rocr/lib/libhsa-runtime64.so (it prepends both to LD_LIBRARY_PATH). Our
# build links the private SDK venv through its RUNPATH, so point those
# entries at the venv's unversioned devel symlinks. Idempotent: ln -sfn.
VENV_LIB="$(ls -d "$RUNTIME_DIR"/.venv-rocm/lib/python*/site-packages/_rocm_sdk_devel/lib 2>/dev/null | head -1 || true)"
if [[ -z "$VENV_LIB" || ! -e "$VENV_LIB/libamdhip64.so" || ! -e "$VENV_LIB/libhsa-runtime64.so" ]]; then
echo "missing SDK venv runtime under $RUNTIME_DIR/.venv-rocm (libamdhip64.so, libhsa-runtime64.so)" >&2
echo "build it: bash $RUNTIME_DIR/scripts/ciru/setup-linux-amd.sh --install-host-deps" >&2
exit 1
fi
mkdir -p "$RUNTIME_DIR/runtime/hip/lib" "$RUNTIME_DIR/runtime/rocr/lib"
ln -sfn "$VENV_LIB/libamdhip64.so" "$RUNTIME_DIR/runtime/hip/lib/libamdhip64.so"
ln -sfn "$VENV_LIB/libhsa-runtime64.so" "$RUNTIME_DIR/runtime/rocr/lib/libhsa-runtime64.so"
if [[ ! -r "$MODEL_DIR/Qwen3.8-Flash-CIRU-STRIX-Orca.gguf" ]]; then if [[ ! -r "$MODEL_DIR/Qwen3.8-Flash-CIRU-STRIX-Orca.gguf" ]]; then
echo "missing target model: $MODEL_DIR/Qwen3.8-Flash-CIRU-STRIX-Orca.gguf" >&2 echo "missing target model: $MODEL_DIR/Qwen3.8-Flash-CIRU-STRIX-Orca.gguf" >&2
echo "fetch and assemble it: bash $SCRIPT_DIR/download-frank-large-orca.sh" >&2 echo "fetch and assemble it: bash $SCRIPT_DIR/download-frank-large-orca.sh" >&2
+11
View File
@@ -72,6 +72,17 @@ REMOTE_DEPLOY="$REPO_ROOT/scripts/deploy-remote.sh"
grep -q 'preserve_thinking' "$SERVE" grep -q 'preserve_thinking' "$SERVE"
} }
@test "the serve script feeds the launcher its runtime root from the SDK venv" {
# The launcher exits 2 without hip/lib/libamdhip64.so +
# rocr/lib/libhsa-runtime64.so under its runtime root; the build links
# the private venv, so the serve script must point those entries there
# or the unit crash-loops on the gate (seen 2026-09-19).
grep -q '_rocm_sdk_devel/lib' "$SERVE"
grep -q 'runtime/hip/lib/libamdhip64.so' "$SERVE"
grep -q 'runtime/rocr/lib/libhsa-runtime64.so' "$SERVE"
grep -q 'missing SDK venv runtime' "$SERVE"
}
@test "the payload is fetched resumably and verified by sha256" { @test "the payload is fetched resumably and verified by sha256" {
grep -q 'jcbtc/Qwen3.8-Flash-CIRU-STRIX-Orca' "$FETCH" grep -q 'jcbtc/Qwen3.8-Flash-CIRU-STRIX-Orca' "$FETCH"
grep -q -- '-fL -C -' "$FETCH" grep -q -- '-fL -C -' "$FETCH"