Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
YanWenKun committed Mar 6, 2024
1 parent 4c1dc2e commit 22cd9c6
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 16 deletions.
21 changes: 15 additions & 6 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,9 @@ a Stable Diffusion GUI powering node-based workflow.
** For 4GB see <<q-n-a, Q & A>>.
** For AMD GPU see <<rocm, ROCm>>.
* Latest NVIDIA GPU Drivers, Both Game and Studio version will work.
** Only install drivers on your host OS. You don't need to install drivers inside containers.
* Latest NVIDIA GPU driver
** Either Game or Studio edition will work.
** You don't need to install drivers inside containers. Just make sure it's working on your host OS.
* Docker Installed
** Windows user could use https://www.docker.com/products/docker-desktop/[Docker Desktop] with WSL2 enabled.
Expand Down Expand Up @@ -138,7 +139,7 @@ https://github.com/comfyanonymous/ComfyUI/blob/master/comfy/cli_args.py[ComfyUI]

## Some commands for debugging

.Build the image, print all logs to STDOUT.
.Build the image, print all logs to STDOUT
[source,sh]
----
docker build . --progress=plain -f Dockerfile -t yanwk/comfyui-boot:latest
Expand All @@ -149,7 +150,7 @@ docker build . --progress=plain -f Dockerfile -t yanwk/comfyui-boot:latest
----
docker run -it --rm \
--gpus all -p 8188:8188 \
-v "$(pwd)"/storage:/home/runner \
--volume "$(pwd)"/storage:/home/runner \
--env CLI_ARGS="" \
yanwk/comfyui-boot:latest
----
Expand All @@ -159,12 +160,20 @@ docker run -it --rm \
----
docker run -it --rm \
--gpus all -p 8188:8188 \
-v "$(pwd)"/storage:/home/runner \
-e CLI_ARGS="" \
--volume "$(pwd)"/storage:/home/runner \
--env CLI_ARGS="" \
--user root \
yanwk/comfyui-boot:latest /bin/bash
----

### Pre-start script

You can create your own pre-start script at
----
./storage/scripts/pre-start.sh
----
It will run before ComfyUI starts, handy for debugging.
## License
Expand Down
16 changes: 12 additions & 4 deletions README.zh.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ ComfyUI 是一个使用节点工作流的 Stable Diffusion 图形界面。
** 4GB 方法见 <<q-n-a, Q & A>>
** AMD 显卡见 <<rocm, ROCm>>
* 安装好最新的 NVIDIA 显卡驱动,游戏驱动或 Studio 驱动均可。
* 安装好最新的 NVIDIA 显卡驱动
** 游戏驱动或 Studio 驱动均可。
** 只需要在宿主系统中安装驱动即可,容器中不需要再安装驱动。
* 安装好 Docker
Expand Down Expand Up @@ -149,7 +150,7 @@ docker build . --progress=plain -f Dockerfile -t yanwk/comfyui-boot:latest
----
docker run -it --rm \
--gpus all -p 8188:8188 \
-v "$(pwd)"/storage:/home/runner \
--volume "$(pwd)"/storage:/home/runner \
--env CLI_ARGS="" \
yanwk/comfyui-boot:latest
----
Expand All @@ -159,12 +160,19 @@ docker run -it --rm \
----
docker run -it --rm \
--gpus all -p 8188:8188 \
-v "$(pwd)"/storage:/home/runner \
-e CLI_ARGS="" \
--volume "$(pwd)"/storage:/home/runner \
--env CLI_ARGS="" \
--user root \
yanwk/comfyui-boot:latest /bin/bash
----

### 预启动脚本

如果需要在 ComfyUI 启动前执行脚本,可以创建这个文件:
----
./storage/scripts/pre-start.sh
----
## 声明
Expand Down
13 changes: 7 additions & 6 deletions scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@

set -e

# Install ComfyUI
cd /home/runner

# Install ComfyUI.
if [ ! -f "/home/runner/.download-complete" ] ; then
chmod +x /home/scripts/download.sh
bash /home/scripts/download.sh
fi ;

if [ -f "/home/runner/scripts/pre-start.sh" ]; then
# Run user's pre-start script
cd /home/runner
if [ -f "/home/runner/scripts/pre-start.sh" ] ; then
echo "########################################"
echo "Checking for pre-start script..."
echo "Running pre-start script..."
echo "########################################"

chmod +x /home/runner/scripts/pre-start.sh
bash /home/runner/scripts/pre-start.sh
else
echo "No pre-start script found. Skipping."
fi
fi ;


echo "########################################"
Expand Down

0 comments on commit 22cd9c6

Please sign in to comment.