@@ -14,13 +14,6 @@ FROM python:3.12.12-trixie
1414# Install cmake, which is an indirect installation dependencies
1515RUN apt-get update && apt-get install -y --no-install-recommends cmake
1616
17- # Create a mount point for user-generated data.
18- RUN mkdir -p \
19- /data/input \
20- /data/output \
21- /data/temp \
22- /data/user
23-
2417# Create a regular user whose UID and GID will match the host user's at runtime.
2518# Also create a home directory for this user (-m), as some common Python tools
2619# (such as uv) interact with the user’s home directory.
@@ -57,24 +50,24 @@ COPY requirements.txt manager_requirements.txt ./
5750RUN pip install --no-cache-dir --disable-pip-version-check \
5851 -r requirements.txt
5952
60- # Install ComfyUI and link the data mount points.
53+ # Install ComfyUI
6154COPY . .
62- RUN ln -sf /data/* .
6355
6456# Purely declarative: inform Docker and image users that this image is designed
6557# to listen on port 8188 for the web GUI.
6658EXPOSE 8188
6759
68- # Declare persistent volumes:
69- # - /data: stores user-generated data from ComfyUI,
70- # - /comfyui/.venv: stores Python data generated by the entrypoint and custom
71- # node managers,
72- # - /comfyui/custom_nodes: stores custom nodes installed at runtime by custom
73- # node managers,
74- # - /comfyui/models: Stores models installed by model managers,
75- # - /home/comfyui: stores data from Python packages that may write outside the
76- # virtual environment and into the user’s home directory.
77- VOLUME [ "/data" , "/comfyui/.venv" , "/comfyui/custom_nodes" , "/comfyui/models" , "/home/comfyui" ]
60+ # Declare persistent volumes. We assign one volume per data directory to match
61+ # ComfyUI’s natural file layout and to let users selectively choose which
62+ # directories they want to mount.
63+ VOLUME /comfyui/.venv
64+ VOLUME /comfyui/custom_nodes
65+ VOLUME /comfyui/input
66+ VOLUME /comfyui/models
67+ VOLUME /comfyui/output
68+ VOLUME /comfyui/temp
69+ VOLUME /comfyui/user
70+ VOLUME /home/comfyui
7871
7972# Switch back to root to run the entrypoint and to install additional system
8073# dependencies
0 commit comments