mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-03 21:42:21 +02:00
fix(docker): repair app cache parent ownership (#6158)
* fix(docker): repair app cache parent ownership * fix(docker): avoid walking mounted model cache * test(docker): exercise nested cache ownership --------- Co-authored-by: Raul <9117159+raultcj@users.noreply.github.com>
This commit is contained in:
+10
-1
@@ -96,7 +96,16 @@ repair_bind_mount_ownership() {
|
||||
# Repair image-owned writable paths without walking into bind-mounted host
|
||||
# trees, then repair the app-owned mount roots separately.
|
||||
repair_app_tree_ownership
|
||||
for dir in /app/data /app/logs /app/.ssh /app/.cache/huggingface /app/.local; do
|
||||
# Docker creates the parent of the HuggingFace bind mount as root before this
|
||||
# entrypoint runs. Repair only the parent directory itself so app-user caches
|
||||
# such as /app/.cache/vllm and /app/.cache/flashinfer can be created without
|
||||
# recursively walking the mounted model cache.
|
||||
chown "$PUID:$PGID" /app/.cache 2>/dev/null || true
|
||||
# The Hugging Face cache can contain hundreds of gigabytes and is a nested
|
||||
# mount with its own ownership contract. Repair its mount root so new cache
|
||||
# entries are writable, but never traverse or rewrite existing model files.
|
||||
chown "$PUID:$PGID" /app/.cache/huggingface 2>/dev/null || true
|
||||
for dir in /app/data /app/logs /app/.ssh /app/.local; do
|
||||
repair_bind_mount_ownership "$dir"
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user