diff --git a/docker-compose.yml b/docker-compose.yml index 4305e80..bf1ab00 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -241,15 +241,19 @@ services: # this command is required, not optional, or the container exits 0 # immediately and restart-loops. Runs as root (image's only user); # group_add above is what actually grants /dev/kfd + /dev/dri access. + # + # --base-directory fully replaces ComfyUI's custom_nodes/input/output/ + # user/temp dirs with ones under /storage (confirmed in folder_paths.py) + # rather than adding to the image's baked-in ones — so first boot must + # seed /storage/custom_nodes from the image's copy (ComfyUI-Manager + # lives there) or it's gone, and main.py hard-crashes if custom_nodes + # doesn't exist yet at all. + entrypoint: ["sh", "-c"] command: - - python - - main.py - - --listen - - "0.0.0.0" - - --port - - "8188" - - --base-directory - - /storage + - > + mkdir -p /storage/custom_nodes /storage/input /storage/output /storage/user && + [ -z "$(ls -A /storage/custom_nodes)" ] && cp -r /workspace/ComfyUI/custom_nodes/. /storage/custom_nodes/ || true; + exec python main.py --listen 0.0.0.0 --port 8188 --base-directory /storage # # Published host port (unlike llama-server's ai-stack-only pattern): # ComfyUI's own UI is meant to be reachable directly too, for a planned