From 3becc055b3e9f7bcde6f1b924273b83a15616f60 Mon Sep 17 00:00:00 2001 From: Jonathan Kovacs Date: Thu, 16 Mar 2023 17:04:19 -0400 Subject: [PATCH] Add ComfyUI service. --- .github/pull_request_template.md | 1 + .github/workflows/docker.yml | 1 + docker-compose.yml | 8 ++++++++ services/comfy/Dockerfile | 35 ++++++++++++++++++++++++++++++++ services/comfy/entrypoint.sh | 34 +++++++++++++++++++++++++++++++ 5 files changed, 79 insertions(+) create mode 100644 services/comfy/Dockerfile create mode 100644 services/comfy/entrypoint.sh diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 241f11b..6fd8686 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -11,3 +11,4 @@ Closes issue # - auto: https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/ - sygil: https://github.com/Sygil-Dev/sygil-webui/commit/ - invoke: https://github.com/invoke-ai/InvokeAI/commit/ +- comfy: https://github.com/comfyanonymous/ComfyUI/commit/ diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 2c7645e..0955d69 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -16,6 +16,7 @@ jobs: - auto - sygil - invoke + - comfy - download runs-on: ubuntu-latest name: ${{ matrix.profile }} diff --git a/docker-compose.yml b/docker-compose.yml index b6c1058..843b6f5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -63,3 +63,11 @@ services: profiles: ["sygil-sl"] environment: - USE_STREAMLIT=1 + + comfy: &comfy + <<: *base_service + profiles: ["comfy"] + build: ./services/comfy/ + image: sd-comfy:1 + environment: + - CLI_ARGS= diff --git a/services/comfy/Dockerfile b/services/comfy/Dockerfile new file mode 100644 index 0000000..1837921 --- /dev/null +++ b/services/comfy/Dockerfile @@ -0,0 +1,35 @@ +# syntax=docker/dockerfile:1 + +FROM python:3.10.9-slim + +SHELL ["/bin/bash", "-ceuxo", "pipefail"] + +ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1 + +RUN --mount=type=cache,target=/root/.cache/pip pip install torch==1.13.0 torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu117 + +RUN apt-get update && apt install fonts-dejavu-core rsync git jq moreutils -y && apt-get clean + +ARG BRANCH=master SHA=ee46bef03a98903831c01d31094a0c30ea411b28 +RUN --mount=type=cache,target=/root/.cache/pip <=4.24' + +# add info +COPY . /docker/ +RUN <