Seed writable Pi runtime config in Docker

This commit is contained in:
2026-07-30 20:31:10 -04:00
parent 1a63da77f3
commit 8d6c471b10
4 changed files with 21 additions and 4 deletions
+13
View File
@@ -0,0 +1,13 @@
#!/bin/sh
set -eu
# The mounted Pi configuration contains credentials and must stay read-only. Pi's auth storage
# takes a lock beside auth.json, so seed a writable per-container copy before the app starts.
# That lets ModelRuntime read and refresh credentials without ever mutating the host mount.
if [ -d /run/pi-agent-config ]; then
mkdir -p "$HOME/.pi/agent"
cp -a /run/pi-agent-config/. "$HOME/.pi/agent/"
chmod -R u+rwX "$HOME/.pi/agent"
fi
exec "$@"