Skip to content

The open-source AI voice studio. Clone, dictate, create.

fix(docker): chown ~/.cache so the app user can write caches

Thiago Margatho49b55fcb2a03
diff --git a/scripts/rocm-entrypoint.sh b/scripts/rocm-entrypoint.sh
index 6f3965e4..73812e1b 100644
--- a/scripts/rocm-entrypoint.sh
+++ b/scripts/rocm-entrypoint.sh
@@ -12,4 +12,10 @@ for dev in /dev/kfd /dev/dri/render*; do
}
usermod -aG "$grp" voicebox
done
+# Docker creates the HF volume mountpoint's parent (~/.cache) as root on every
+# container create, and a fresh volume is root-owned too — without this the app
+# user can't write any cache (torch, spacy) outside the HF mount.
+mkdir -p /home/voicebox/.cache/huggingface
+chown voicebox:voicebox /home/voicebox/.cache /home/voicebox/.cache/huggingface
+
exec gosu voicebox "$@"