Skip to content

Commit

Permalink
Update GH workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
YanWenKun committed Mar 18, 2024
1 parent eac37c6 commit 489841f
Show file tree
Hide file tree
Showing 6 changed files with 88 additions and 70 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-dev.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish "dev" to Docker Hub
name: Publish "dev" tag to Docker Hub

on:
workflow_dispatch: # Can be manually triggered
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish to Docker Hub
name: Publish "latest" tag to Docker Hub

on:
workflow_dispatch: # Can be manually triggered
Expand All @@ -8,7 +8,7 @@ on:
branches: [ main ]
paths-ignore:
- 'docker-compose*.yml'
- 'Dockerfile-xformers'
- 'Dockerfile-rocm'
- 'README*'
- 'docs/**'
- 'storage/**'
Expand Down Expand Up @@ -50,37 +50,3 @@ jobs:
file: Dockerfile
tags: yanwk/comfyui-boot:latest
push: true


build-publish-rocm:
environment: Publish to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Maximize build disk space
uses: easimon/maximize-build-space@master
with:
overprovision-lvm: 'true'
remove-android: 'true'
-
name: Git checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }}
-
name: Build and push 'rocm'
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile-rocm
tags: yanwk/comfyui-boot:rocm
push: true
52 changes: 52 additions & 0 deletions .github/workflows/build-rocm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Publish "rocm" tag to Docker Hub

on:
workflow_dispatch: # Can be manually triggered
schedule: # Runs on every Monday, 07:00 UTC
- cron: '0 7 * * 1'
push:
branches: [ main ]
paths-ignore:
- 'docker-compose*.yml'
- 'Dockerfile'
- 'README*'
- 'docs/**'
- 'storage/**'
- '.github/**'
- '!.github/workflows/build-regular.yml'


jobs:

build-publish-rocm:
environment: Publish to Docker Hub
runs-on: ubuntu-latest
steps:
- name: Maximize build disk space
uses: easimon/maximize-build-space@master
with:
overprovision-lvm: 'true'
remove-android: 'true'
-
name: Git checkout
uses: actions/checkout@v4
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESSTOKEN }}
-
name: Build and push 'rocm'
uses: docker/build-push-action@v5
with:
context: .
file: Dockerfile-rocm
tags: yanwk/comfyui-boot:rocm
push: true
5 changes: 3 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Docker image for ComfyUI

image::https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-regular.yml/badge.svg["GitHub Workflow Status"]
image:https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-latest.yml/badge.svg["GitHub Workflow Status"]
image:https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-rocm.yml/badge.svg["GitHub Workflow Status"]
image:https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-dev.yml/badge.svg["GitHub Workflow Status"]

image::docs/chart-concept.svg["Concept Design"]

Expand Down Expand Up @@ -104,7 +106,6 @@ mkdir -p storage
docker run -it \
--name comfyui \
--gpus all \
-p 8188:8188 \
-v "$(pwd)"/storage:/home/runner \
--env CLI_ARGS="--use-pytorch-cross-attention" \
Expand Down
16 changes: 8 additions & 8 deletions README.zh.adoc
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
# Docker image for ComfyUI
# 用于 ComfyUI 的 Docker 镜像

image::https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-regular.yml/badge.svg["GitHub Workflow Status"]
image:https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-latest.yml/badge.svg["GitHub Workflow Status"]
image:https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-rocm.yml/badge.svg["GitHub Workflow Status"]
image:https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-dev.yml/badge.svg["GitHub Workflow Status"]

image::docs/chart-concept.zh.svg["布局"]

用于
https://github.com/comfyanonymous/ComfyUI[ComfyUI]
https://hub.docker.com/r/yanwk/comfyui-boot[Docker 镜像] 。

ComfyUI 是一个使用节点工作流的 Stable Diffusion 图形界面
是一个使用节点工作流的 Stable Diffusion 图形界面。 +
本仓库所构建的
https://hub.docker.com/r/yanwk/comfyui-boot[Docker 镜像]
包含其依赖项,及下载/启动脚本


## 工作流程
Expand Down Expand Up @@ -104,7 +105,6 @@ mkdir -p storage
docker run -it \
--name comfyui \
--gpus all \
-p 8188:8188 \
-v "$(pwd)"/storage:/home/runner \
--env CLI_ARGS="--use-pytorch-cross-attention" \
Expand Down
45 changes: 22 additions & 23 deletions docs/README-DockerHub.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# ComfyUI

[![GitHub Workflow Status](https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-regular.yml/badge.svg)](https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-regular.yml)
[![GitHub Workflow Status](https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-latest.yml/badge.svg)](https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-latest.yml)
[![GitHub Workflow Status](https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-rocm.yml/badge.svg)](https://github.com/YanWenKun/ComfyUI-Docker/actions/workflows/build-rocm.yml)

**[CHECK THE GITHUB REPO](https://github.com/YanWenKun/ComfyUI-Docker)**

Expand All @@ -11,33 +12,31 @@ Docker images for [ComfyUI](https://github.com/comfyanonymous/ComfyUI) - a Stabl
## Usage - NVIDIA GPU

```sh
git clone https://github.com/YanWenKun/ComfyUI-Docker.git

cd ComfyUI-Docker

docker compose up --detach

# Update image (only when Python components are outdated)
git pull
docker compose pull
docker compose up --detach --remove-orphans
docker image prune
mkdir -p storage

docker run -it --rm \
--name comfyui \
--gpus all \
-p 8188:8188 \
-v "$(pwd)"/storage:/home/runner \
-e CLI_ARGS="" \
yanwk/comfyui-boot:latest
```

## Usage - AMD GPU (Experimental)

```sh
git clone https://github.com/YanWenKun/ComfyUI-Docker.git

cd ComfyUI-Docker

docker compose -f docker-compose-rocm.yml up --detach

# Update image (only when Python components are outdated)
git pull
docker compose -f docker-compose-rocm.yml pull
docker compose -f docker-compose-rocm.yml up --detach --remove-orphans
docker image prune
mkdir -p storage

docker run -it --rm \
--name comfyui \
-p 8188:8188 \
-v "$(pwd)"/storage:/home/runner \
-e CLI_ARGS="--use-pytorch-cross-attention" \
--device=/dev/kfd --device=/dev/dri \
--group-add=video --ipc=host --cap-add=SYS_PTRACE \
--security-opt seccomp=unconfined \
yanwk/comfyui-boot:rocm
```

## More
Expand Down

0 comments on commit 489841f

Please sign in to comment.