Add containerized ComfyUI deployment

This commit is contained in:
2026-07-14 23:30:28 -04:00
commit 027d9287d4
3 changed files with 31 additions and 0 deletions
+2
View File
@@ -0,0 +1,2 @@
data
.env
+11
View File
@@ -0,0 +1,11 @@
FROM docker.io/pytorch/pytorch:2.6.0-cuda12.4-cudnn9-runtime
ARG COMFYUI_VERSION=v0.27.1
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential git \
&& rm -rf /var/lib/apt/lists/*
RUN git clone --depth 1 --branch ${COMFYUI_VERSION} \
https://github.com/comfyanonymous/ComfyUI /app
WORKDIR /app
RUN pip install --no-cache-dir -r requirements.txt
EXPOSE 8188
CMD ["python", "main.py", "--listen", "0.0.0.0"]
+18
View File
@@ -0,0 +1,18 @@
services:
comfyui:
build:
context: .
image: localhost/comfyui:latest
restart: unless-stopped
container_name: comfyui
ports:
- "${ENDPOINT:?}:8188"
volumes:
- ./data/models:/app/models
- ./data/input:/app/input
- ./data/output:/app/output
- ./data/user:/app/user
- ./data/custom_nodes:/app/custom_nodes
- ./data/triton-cache:/root/.triton
devices:
- nvidia.com/gpu=all