services: comfyui: # Built locally from the Dockerfile in this repo (docker compose build) image: comfyui-gfx1151:v1.0 container_name: comfyui build: context: . # Bump this in the Dockerfile (FROM rocm/pytorch:...) and here when updating # Shared memory for PyTorch / ComfyUI internals. # Must NOT be larger than available RAM. This is NOT VRAM. shm_size: 8G volumes: # Clone ComfyUI into this directory first (see README): # git clone https://github.com/comfyanonymous/ComfyUI - ./ComfyUI:/opt/ComfyUI # Persist JIT kernel caches (aiter + Triton) so container recreates # don't recompile everything on startup (first boot takes minutes). - ./cache/aiter:/usr/local/lib/python3.12/dist-packages/aiter/jit/build - ./cache/triton:/root/.triton ports: - "8188:8188" environment: - TORCH_ROCM_AOTRITON_ENABLE_EXPERIMENTAL=1 devices: - /dev/kfd:/dev/kfd - /dev/dri:/dev/dri group_add: - video - render cap_add: - SYS_PTRACE security_opt: - seccomp:unconfined ipc: host