Skip to content

Commit

Permalink
Docs for 'rocm'
Browse files Browse the repository at this point in the history
  • Loading branch information
YanWenKun committed Apr 11, 2024
1 parent 427269e commit 6ddeb3f
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 1 deletion.
2 changes: 1 addition & 1 deletion rocm/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,5 @@ USER root
VOLUME /root
WORKDIR /root
EXPOSE 8188
ENV CLI_ARGS="--use-pytorch-cross-attention"
ENV CLI_ARGS=""
CMD ["bash","/runner-scripts/entrypoint.sh"]
51 changes: 51 additions & 0 deletions rocm/README.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Run ComfyUI with ROCm on AMD GPU

## In case of WSL2

If you are using WSL2 with AMD/Intel GPU, try
link:../docs/wsl-directml.adoc[Run ComfyUI on WSL2 with DirectML].
It's slower than ROCm but still faster than CPU, and even works on an APU.

## Prepare

* Make sure
https://rocm.docs.amd.com/projects/radeon/en/latest/docs/install/install-radeon.html[Radeon software for Linux with ROCm]
is installed on your Linux host.
## Run

.Run with Docker
[source,sh]
----
mkdir -p storage
docker run -it --rm \
--name comfyui-rocm \
--device=/dev/kfd --device=/dev/dri \
--group-add=video --ipc=host --cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
--security-opt label=disable \
-p 8188:8188 \
-v "$(pwd)"/storage:/root \
-e CLI_ARGS="" \
yanwk/comfyui-boot:rocm
----

.Run with Podman
[source,sh]
----
mkdir -p storage
podman run -it --rm \
--name comfyui-rocm \
--device=/dev/kfd --device=/dev/dri \
--group-add=video --ipc=host --cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
--security-opt label=disable \
-p 8188:8188 \
-v "$(pwd)"/storage:/root \
-e CLI_ARGS="" \
docker.io/yanwk/comfyui-boot:rocm
----

Once the app is loaded, visit http://localhost:8188/
50 changes: 50 additions & 0 deletions rocm/README.zh.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 基于 AMD GPU + ROCm 运行 ComfyUI

## 提醒: WSL2

如果你在用 WSL2 + AMD/Intel GPU, 可以考虑:
link:../docs/wsl-directml.zh.adoc[在 WSL2 环境下通过 DirectML 运行 ComfyUI]。
该方法比纯 CPU 快,比 Linux 下的 ROCm 慢,且支持的 GPU 型号更多(甚至核显也能跑)。

## 准备工作

* 确保 Linux 宿主机上正确安装了
https://rocm.docs.amd.com/projects/radeon/en/latest/docs/install/install-radeon.html[Radeon software for Linux with ROCm]。
## 运行

.使用 Docker
[source,sh]
----
mkdir -p storage
docker run -it --rm \
--name comfyui-rocm \
--device=/dev/kfd --device=/dev/dri \
--group-add=video --ipc=host --cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
--security-opt label=disable \
-p 8188:8188 \
-v "$(pwd)"/storage:/root \
-e CLI_ARGS="" \
yanwk/comfyui-boot:rocm
----

.使用 Podman
[source,sh]
----
mkdir -p storage
podman run -it --rm \
--name comfyui-rocm \
--device=/dev/kfd --device=/dev/dri \
--group-add=video --ipc=host --cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
--security-opt label=disable \
-p 8188:8188 \
-v "$(pwd)"/storage:/root \
-e CLI_ARGS="" \
docker.io/yanwk/comfyui-boot:rocm
----

启动完成后,访问 http://localhost:8188/

0 comments on commit 6ddeb3f

Please sign in to comment.