mirror of
https://github.com/jamiepine/voicebox.git
synced 2026-10-03 17:15:19 -07:00
fix(docker): chown ~/.cache so the app user can write caches
Docker creates /home/voicebox/.cache (parent of the huggingface-cache volume mountpoint) owned by root on every container create, and a fresh named volume is root-owned too. The app runs as the voicebox user (uid 999), so anything that writes a cache outside the HF mount (torch hub, spacy, ...) fails with Permission denied. The entrypoint already runs as root before dropping privileges via gosu — create/chown the cache dirs there (non-recursive, instant). Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
committed by
capy-ai-staging[bot]
co-authored by
Claude Fable 5
parent
b39e5b2de3
commit
49b55fcb2a
@@ -12,4 +12,10 @@ for dev in /dev/kfd /dev/dri/render*; do
|
|||||||
}
|
}
|
||||||
usermod -aG "$grp" voicebox
|
usermod -aG "$grp" voicebox
|
||||||
done
|
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 "$@"
|
exec gosu voicebox "$@"
|
||||||
|
|||||||
Reference in New Issue
Block a user