diff --git a/scripts/frank-primary.env b/scripts/frank-primary.env index ef9e5fd..14586c1 100644 --- a/scripts/frank-primary.env +++ b/scripts/frank-primary.env @@ -59,6 +59,11 @@ FRANK_PRIMARY_IMAGE=stilldeadcode/radiance@sha256:4c3f484564bb2872784e46b0a59cbd FRANK_PRIMARY_MODEL_DIR=/home/dank/models/rad FRANK_PRIMARY_MODEL_FILE=qwen4exp-fp8-native.rad FRANK_PRIMARY_STATE_DIR=/home/dank/radiance-state +# The state dir's tune/ subdirectory holds rad-tune's kernel-selection +# cache (the engine's selector reads $RADIANCE_HOME/tune/.tune +# at boot; $RADIANCE_HOME defaults to /opt/radiance, in the image, so the +# cache must ride a host mount — serve script mounts it, see the runbook's +# "Tuning levers"). # Container identity is the SERVICE name (Frank's call, 2026-10-05): one # name across systemctl and podman ps. The runtime changes; the name does # not. The legacy list retires every predecessor identity that could hold diff --git a/scripts/serve-frank-primary.sh b/scripts/serve-frank-primary.sh index 3190ded..a0bf8a2 100755 --- a/scripts/serve-frank-primary.sh +++ b/scripts/serve-frank-primary.sh @@ -101,6 +101,14 @@ mkdir -p "$FRANK_PRIMARY_STATE_DIR/kvcache/frank-primary" # left the SSD prefix tier off (measured 2026-10-06 boot ledger). Pre-create # the full path on the host so the tier opens on first boot. +mkdir -p "$FRANK_PRIMARY_STATE_DIR/tune" +# rad-tune's kernel-selection cache (see the runbook's "Tuning levers"): +# the engine's selector reads $RADIANCE_HOME/tune/.tune at boot; +# $RADIANCE_HOME defaults to /opt/radiance, which lives in the image, so +# the cache must ride a host mount or it dies with the --rm container +# that wrote it. The dir is pre-created for the same reason as kvcache +# (the engine's create is not recursive). + if [ ! -e /dev/kfd ] || [ ! -d /dev/dri ]; then echo "ERROR: GPU device nodes absent (/dev/kfd, /dev/dri)" >&2 exit 1 @@ -165,6 +173,7 @@ podman run -d --name "$FRANK_PRIMARY_CONTAINER" \ --device /dev/kfd --device /dev/dri \ -v "$FRANK_PRIMARY_MODEL_DIR":/models:ro \ -v "$FRANK_PRIMARY_STATE_DIR":/data \ + -v "$FRANK_PRIMARY_STATE_DIR/tune":/opt/radiance/share/radiance/tune \ -v "$FRANK_PRIMARY_TEMPLATE":/templates/template.jinja:ro \ "$FRANK_PRIMARY_IMAGE" \ --model "/models/$FRANK_PRIMARY_MODEL_FILE" \