frank-primary: persist rad-tune kernel cache on a host mount
The engine's kernel selector reads $RADIANCE_HOME/tune/<machine>.tune at boot; $RADIANCE_HOME defaults to /opt/radiance, which lives in the image, so a cache written by a --rm scratch container dies with it. Pre-create $FRANK_PRIMARY_STATE_DIR/tune and bind-mount it at /opt/radiance/share/radiance/tune so the rad-tune cache (generated in a stopped-service window) survives and is read at every production boot.
This commit is contained in:
1 parent
bb3532dfec
commit
7fef3cb907
2 files changed
+14
No files matched your search
@@ -59,6 +59,11 @@ FRANK_PRIMARY_IMAGE=stilldeadcode/radiance@sha256:4c3f484564bb2872784e46b0a59cbd
|
|||||||
FRANK_PRIMARY_MODEL_DIR=/home/dank/models/rad
|
FRANK_PRIMARY_MODEL_DIR=/home/dank/models/rad
|
||||||
FRANK_PRIMARY_MODEL_FILE=qwen4exp-fp8-native.rad
|
FRANK_PRIMARY_MODEL_FILE=qwen4exp-fp8-native.rad
|
||||||
FRANK_PRIMARY_STATE_DIR=/home/dank/radiance-state
|
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/<machine>.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
|
# 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
|
# name across systemctl and podman ps. The runtime changes; the name does
|
||||||
# not. The legacy list retires every predecessor identity that could hold
|
# not. The legacy list retires every predecessor identity that could hold
|
||||||
|
|||||||
@@ -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
|
# 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.
|
# 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/<machine>.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
|
if [ ! -e /dev/kfd ] || [ ! -d /dev/dri ]; then
|
||||||
echo "ERROR: GPU device nodes absent (/dev/kfd, /dev/dri)" >&2
|
echo "ERROR: GPU device nodes absent (/dev/kfd, /dev/dri)" >&2
|
||||||
exit 1
|
exit 1
|
||||||
@@ -165,6 +173,7 @@ podman run -d --name "$FRANK_PRIMARY_CONTAINER" \
|
|||||||
--device /dev/kfd --device /dev/dri \
|
--device /dev/kfd --device /dev/dri \
|
||||||
-v "$FRANK_PRIMARY_MODEL_DIR":/models:ro \
|
-v "$FRANK_PRIMARY_MODEL_DIR":/models:ro \
|
||||||
-v "$FRANK_PRIMARY_STATE_DIR":/data \
|
-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 \
|
-v "$FRANK_PRIMARY_TEMPLATE":/templates/template.jinja:ro \
|
||||||
"$FRANK_PRIMARY_IMAGE" \
|
"$FRANK_PRIMARY_IMAGE" \
|
||||||
--model "/models/$FRANK_PRIMARY_MODEL_FILE" \
|
--model "/models/$FRANK_PRIMARY_MODEL_FILE" \
|
||||||
|
|||||||
Reference in new issue
Block a user