diff --git a/.gitignore b/.gitignore index e15106e..9b6b8ce 100644 --- a/.gitignore +++ b/.gitignore @@ -214,3 +214,8 @@ __marimo__/ # Streamlit .streamlit/secrets.toml + +# Hugging Face artifacts +*.safetensors +*.vae +*.pt diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2b16d8a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,15 @@ +FROM pytorch/pytorch:2.9.0-cuda13.0-cudnn9-runtime AS builder +WORKDIR /app +RUN apt-get update && \ + apt-get install -y --no-install-recommends git && \ + rm -rf /var/lib/apt/lists/* +RUN git clone --branch v0.3.67 https://github.com/comfyanonymous/ComfyUI.git ComfyUI +WORKDIR /app/ComfyUI + +FROM pytorch/pytorch:2.9.0-cuda13.0-cudnn9-runtime +WORKDIR /app +COPY --from=builder /app/ComfyUI /app/ComfyUI +WORKDIR /app/ComfyUI +RUN pip install --no-cache-dir -r requirements.txt +EXPOSE 8188 +CMD ["python", "main.py", "--listen", "0.0.0.0", "--port", "8188"] diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 0000000..e39cd02 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,20 @@ +services: + comfyui: + build: . + container_name: comfyui + runtime: nvidia + environment: + - CUDA_VISIBLE_DEVICES=0 + - NVIDIA_VISIBLE_DEVICES=all + - NVIDIA_DRIVER_CAPABILITIES=compute,utility + volumes: + - ./docker/models/checkpoints:/app/ComfyUI/models/checkpoints + - ./docker/models/loras:/app/ComfyUI/models/loras + - ./docker/models/vae:/app/ComfyUI/models/vae + - ./docker/output:/app/ComfyUI/output + - ./docker/workflows:/app/ComfyUI/user/default/workflows + ports: + - "8188:8188" + restart: unless-stopped + stdin_open: true + tty: true diff --git a/docker/models/checkpoints/.gitkeep b/docker/models/checkpoints/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docker/models/loras/.gitkeep b/docker/models/loras/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docker/models/vae/.gitkeep b/docker/models/vae/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docker/output/.gitkeep b/docker/output/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/docker/workflows/.gitkeep b/docker/workflows/.gitkeep new file mode 100644 index 0000000..e69de29