Persist models installed by model managers

This commit is contained in:
B. Bergeron 2025-08-13 11:14:54 -04:00
parent e7ebda4b61
commit 847e3cc3a2
No known key found for this signature in database
GPG Key ID: 20A0A88F22238925
2 changed files with 8 additions and 2 deletions

View File

@ -62,9 +62,10 @@ EXPOSE 8188
# node managers,
# - /comfyui/custom_nodes: stores custom nodes installed at runtime by custom
# node managers,
# - /comfyui/models: Stores models installed by model managers,
# - /home/comfyui: stores data from Python packages that may write outside the
# virtual environment and into the users home directory.
VOLUME [ "/data", "/comfyui/.venv", "/comfyui/custom_nodes", "/home/comfyui" ]
VOLUME [ "/data", "/comfyui/.venv", "/comfyui/custom_nodes", "/comfyui/models", "/home/comfyui" ]
# Switch back to root to run the entrypoint and ensure it is executable.
USER root

View File

@ -24,7 +24,12 @@ fi
echo "[entrypoint] Changing directory ownership..."
chown -R "$user:$user_group" /data /comfyui/custom_nodes /comfyui/.venv /home/comfyui
chown -R "$user:$user_group" \
/data \
/comfyui/custom_nodes \
/comfyui/models \
/comfyui/.venv \
/home/comfyui
# Add the user to the groups owning /dev/nvidia* devices to ensure CUDA access.
# Typically, these devices belong to a single "video" group, but to be safe, we