# ComfyUI on ROCm for the AMD Strix Halo APU (gfx1151). # # The official `rocm/comfyui` and pytorch.org ROCm wheels compile kernels for # datacenter archs (gfx942/gfx950) and omit gfx1151. This base — AMD's # gfx1151-tagged PyTorch build (torch 2.9.1+rocm7.12.0rc1) — is the verified # working GPU path on Dankclaw (2026-08-14: avail=True, Radeon 8060S, cap (11,5)). # # The base is heavier than a dedicated ComfyUI image (it carries vLLM), but it # is the only prebuilt image that ships gfx1151 torch kernels. See # docs/Research/ComfyUI ROCm and Vulkan.md. FROM docker.io/rocm/vllm:rocm7.12.0_gfx1151_ubuntu24.04_py3.12_pytorch_2.9.1_vllm_0.16.0 # ComfyUI source + runtime requirements (non-GPU deps install from PyPI). ENV PYTHONUNBUFFERED=1 \ COMFYUI_DIR=/opt/ComfyUI WORKDIR /opt # git ships in the base; clone the stable ComfyUI tag. RUN git clone --depth 1 --branch v0.3.6 \ https://github.com/Comfy-Org/ComfyUI.git "$COMFYUI_DIR" WORKDIR "$COMFYUI_DIR" # Install ComfyUI Python requirements. Do NOT reinstall torch/torchvision — # keep the gfx1151-enabled torch from the base. The requirements pin torch, # so install everything else from a deps-only pass. RUN /opt/python/bin/pip install --no-cache-dir \ -r requirements.txt \ --no-deps 2>/dev/null || true # Ensure the managed deps that are missing get installed without touching torch. # (First pass is best-effort; a reinstall of torch is deliberately avoided.) RUN /opt/python/bin/python -m pip install --no-cache-dir \ requests==2.32.3 \ aiohttp==3.10.10 \ yarl==1.13.1 \ pillow==10.4.0 \ numpy>=1.24 \ huggingface-hub>=0.24 \ einops \ comfyui-frontend-package>=1.0 \ model-management>=1.0.3 \ opaque>=0.0.10 \ pydantic>=2.6 \ websockets>=15 \ imageio # Run ComfyUI as the host user so bind mounts /opt/comfyui are writable. USER 1000:1000 EXPOSE 8188 ENTRYPOINT ["/opt/python/bin/python", "main.py", "--listen", "0.0.0.0", "--port", "8188"]