diff --git a/Dockerfile b/Dockerfile index b1f335c..b83e306 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,19 @@ -FROM rocm/pytorch:rocm7.2.4_ubuntu24.04_py3.12_pytorch_release_2.9.1 +FROM rocm/pytorch:rocm10.1.0_ubuntu24.04_py3.12_pytorch_release_2.13.0 + +# ROCm 10.x images no longer ship /opt/rocm: the ROCm SDK is packaged inside +# pip wheels (_rocm_sdk_core = runtime libs, _rocm_sdk_devel = headers + +# unversioned .so files for linking). +# - LD_LIBRARY_PATH: runtime loading (the torch wheel does this itself at +# import time, but aiter's JIT subprocesses need it globally). +# - LIBRARY_PATH: link time. Without this, aiter's JIT builds fail with +# "ld: cannot find -lamdhip64" when flash-attention delegates to aiter. +ENV LD_LIBRARY_PATH=/usr/local/lib/python3.12/dist-packages/_rocm_sdk_devel/lib:/usr/local/lib/python3.12/dist-packages/_rocm_sdk_core/lib${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} +ENV LIBRARY_PATH=/usr/local/lib/python3.12/dist-packages/_rocm_sdk_devel/lib:/usr/local/lib/python3.12/dist-packages/_rocm_sdk_core/lib${LIBRARY_PATH:+:$LIBRARY_PATH} + +# git is no longer bundled in the ROCm 10.x images +RUN apt-get update && \ + apt-get install -y --no-install-recommends git && \ + rm -rf /var/lib/apt/lists/* # "Installing" flash-attention # - Not sure if branch `main_perf` is actually better, diff --git a/README.md b/README.md index 00ba8a0..e33b58e 100644 --- a/README.md +++ b/README.md @@ -16,8 +16,8 @@ Reported working on: Versions used: -* ROCm: 7.2.4 -* PyTorch: 2.9.1 +* ROCm: 10.1.0 +* PyTorch: 2.13.0 * Python: 3.12 * ComfyUI: whatever you clone (see below) diff --git a/docker-compose.yml b/docker-compose.yml index f9763c9..6b235c0 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,7 +1,7 @@ services: comfyui: # Built locally from the Dockerfile in this repo (docker compose build) - image: comfyui-gfx1151:v0.8 + image: comfyui-gfx1151:v1.0 container_name: comfyui build: context: . @@ -13,6 +13,10 @@ services: # 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: diff --git a/docker-run.sh b/docker-run.sh index 84ab513..5e93b60 100755 --- a/docker-run.sh +++ b/docker-run.sh @@ -5,7 +5,7 @@ set -e -docker build -t comfyui-gfx1151:v0.8 . +docker build -t comfyui-gfx1151:v1.0 . docker run -it --rm \ --cap-add=SYS_PTRACE \ @@ -20,4 +20,4 @@ docker run -it --rm \ -v $(pwd)/ComfyUI:/opt/ComfyUI \ --shm-size 8G \ --name comfyui \ - comfyui-gfx1151:v0.8 + comfyui-gfx1151:v1.0 diff --git a/scripts/check-comfyui.sh b/scripts/check-comfyui.sh index ad00013..48e148f 100644 --- a/scripts/check-comfyui.sh +++ b/scripts/check-comfyui.sh @@ -5,5 +5,6 @@ if [ ! -e /opt/ComfyUI/requirements.txt ]; then echo "No ComfyUI detected, copying a built-in (pre-cloned) one..." + mkdir -p /opt/ComfyUI cp -r /opt/ComfyUI-pre-cloned/{.,}* /opt/ComfyUI/ fi