adding stuff

This commit is contained in:
Brian Gebel 2025-04-28 10:42:47 -07:00
parent 7e5892f0cc
commit 73b2e33326
6 changed files with 56 additions and 5 deletions

4
.env.example Normal file
View file

@ -0,0 +1,4 @@
PUID=1000
PGID=1000
DEVICE_DRIVER=nvidia

7
TASK.md Normal file
View file

@ -0,0 +1,7 @@
- [] Update docker-compose to be a more readable
- [] Add support for swarm
- [] Pin / configurable versions
- [] rocm / zluda support
- [] persistant vol for custom extensions
- [] generally better workflow vol mappings
- [] auto custom node loader for comfyui

28
docker-compose.v2.yml Normal file
View file

@ -0,0 +1,28 @@
services:
comfyui:
build: ./services/ComfyUI/
image: comfyui
# user: ${PUID:-1000}:${PGID:-1000}
# environment:
# - PUID=${PUID:-1000}
# - PGID=${PGID:-1000}
# - CLI_ARGS=
volumes:
- /etc/localtime:/etc/localtime:ro
- /etc/timezone:/etc/timezone:ro
- ./data:/data
- ./output:/output
ports:
- "7860:7860"
stop_signal: SIGKILL
tty: true
deploy:
resources:
reservations:
devices:
- driver: ${DEVICE_DRIVER:-nvidia}
device_ids: ['0']
capabilities: [compute, utility]
restart: unless-stopped

View file

@ -1,4 +1,8 @@
x-base_service: &base_service
user: ${PUID:-1000}:${PGID:-1000}
environment:
- PUID=${PUID:-1000}
- PGID=${PGID:-1000}
ports:
- "${WEBUI_PORT:-7860}:7860"
volumes:

View file

@ -4,11 +4,18 @@ ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1
RUN apt-get update && apt-get install -y git && apt-get clean
# Set USER here? https://stackoverflow.com/questions/24549746/switching-users-inside-docker-image-to-a-non-root-user
# USER ${uid}:${gid}
# RUN --mount=type=cache,target=/root/.cache/pip \
# put Cache somehwere else or don't define target?
# PIP_CACHE_DIR pip cache dir
ENV ROOT=/stable-diffusion
RUN --mount=type=cache,target=/root/.cache/pip \
git clone https://github.com/comfyanonymous/ComfyUI.git ${ROOT} && \
cd ${ROOT} && \
git checkout v0.3.30 && \
git checkout v0.3.19 && \
pip install -r requirements.txt
WORKDIR ${ROOT}

View file

@ -19,7 +19,8 @@ a111:
custom_nodes: config/comfy/custom_nodes
# TODO: I am unsure about these, need more testing
# style_models: config/comfy/style_models
# t2i_adapter: config/comfy/t2i_adapter
# clip_vision: config/comfy/clip_vision
# diffusers: config/comfy/diffusers
# style_models: data/config/comfy/style_models
# t2i_adapter: data/config/comfy/t2i_adapter
# clip_vision: data/config/comfy/clip_vision
# diffusers: data/config/comfy/diffusers
# download_model_base: data/models