Files
club-3090/services/comfyui/docker-compose.yml
T
noonghunnaandClaude Opus 4.8 092b7c7a46 image-studio P1: pin ComfyUI commit + drop hardcoded OWUI secret
Hardening from the live cutover validation:
- ComfyUI pinned to a known-good commit (COMFYUI_REF default cb9f6394… — has
  Ideogram-4) instead of floating HEAD, so an upstream change can't silently break
  users. Set COMFYUI_REF=HEAD to float. Entrypoint is now mounted into the container
  so pin/bootstrap edits apply on `up` without a 30-min image rebuild (kept +x — a
  non-exec mounted entrypoint = OCI "permission denied", caught in validation).
- OWUI WEBUI_SECRET_KEY no longer hardcoded to "change-this-secret-key" (a shared,
  forgeable secret); now empty → OWUI generates+persists a strong per-deployment key
  in the data volume. Override via host env only to share sessions across replicas.

Live-validated on the committed compose: end-to-end gen OWUI :8080 → ComfyUI →
Ideogram-4 (81 s); boot log confirms "pinned to cb9f6394" + GPU0 pin; OWUI on the
persisted key file.

Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
2026-06-09 04:22:19 +00:00

47 lines
2.1 KiB
YAML

services:
comfyui:
build: .
image: comfyui-local:latest
container_name: comfyui
restart: "no"
ports:
- "8188:8188"
volumes:
# ComfyUI source + venv-installed custom-node code persists here
- /mnt/models/comfyui/ComfyUI:/workspace/ComfyUI
# Models tree (overrides ComfyUI/models nested mount)
- /mnt/models/comfyui/models:/workspace/ComfyUI/models
- /mnt/models/comfyui/input:/workspace/ComfyUI/input
- /mnt/models/comfyui/output:/workspace/ComfyUI/output
- /mnt/models/comfyui/user:/workspace/ComfyUI/user
# Folder-aliasing yaml so loaders find files whether they look in unet/ or diffusion_models/
- ./extra_model_paths.yaml:/workspace/ComfyUI/extra_model_paths.yaml:ro
# Mount the entrypoint (overrides the image-baked copy) so bootstrap/pin changes
# apply on `up` without a full image rebuild.
- ./entrypoint.sh:/entrypoint.sh:ro
# Pip cache so re-launches don't re-download every wheel
- /mnt/models/comfyui/pip-cache:/root/.cache/pip
# Share existing HF cache (so anything already pulled by vLLM/SGLang is reusable)
- /mnt/models/huggingface:/root/.cache/huggingface
environment:
- HUGGING_FACE_HUB_TOKEN=${HF_TOKEN:-}
- HF_HOME=/root/.cache/huggingface
- PYTHONUNBUFFERED=1
# GPU pin (opt-in): empty = all reserved GPUs visible (default — image on cuda:0,
# video can use both). Set to e.g. "0" to confine ComfyUI to one card so a chat LLM
# can run on the other (the `gpu-mode image-studio` 2-card split passes "0").
# Honored in entrypoint.sh (only exported when non-empty — empty CUDA_VISIBLE_DEVICES
# would hide ALL GPUs).
- COMFYUI_CUDA_VISIBLE_DEVICES=${COMFYUI_CUDA_VISIBLE_DEVICES:-}
# ComfyUI version pin: empty → the entrypoint's pinned commit (reproducible, has
# Ideogram-4). Set COMFYUI_REF=HEAD to float on upstream master (bleeding edge).
- COMFYUI_REF=${COMFYUI_REF:-}
shm_size: "8gb"
deploy:
resources:
reservations:
devices:
- driver: nvidia
count: all
capabilities: [gpu]