diff --git a/Dockerfile b/Dockerfile index 99d7cc70b..bbde988ae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -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 user’s 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 diff --git a/entrypoint.sh b/entrypoint.sh index 9b844eb1d..cbaec72f9 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -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