ComfyUI Docker 🐳

Production-ready Docker setup for ComfyUI
A complete containerized deployment of ComfyUI with GPU acceleration, flexible deployment profiles, and persistent data management. Built with Docker Buildx Bake for efficient multi-stage builds.
Table of Contents
Key Features
- 🚀 Current Accelerators: NVIDIA CUDA 13.0, AMD ROCm 7.2, Intel XPU, and CPU
- 🎯 Versioned ComfyUI: Stable release tags by default, explicit nightly builds when wanted
- 📁 Persistent Storage: Individual volume mounts for models, outputs, custom nodes, etc.
- 🐳 Production Ready: Multi-stage builds, layer caching, and pre-built GHCR images
- ⚡ Performance Optimized: Dynamic VRAM, async offload, CUDA graphs, Comfy Kitchen, and architecture-specific SageAttention images
- 🔧 Extensible: Custom node support via volume mounts
- 🔄 CI/CD Ready: Automated builds, nightly upstream tracking
- 🔒 Security: Runs as non-root by default, supports Docker Compose PUID/PGID and Kubernetes securityContext
Quick Start
Prerequisites
- Docker 20.10+ and Docker Compose 2.x
- NVIDIA GPU + drivers (for GPU modes) - Install Guide
- 8GB+ VRAM recommended for complete mode
- 20GB+ disk space for models and images
1. Clone the Repository
git clone https://github.com/pixeloven/ComfyUI-Docker.git
cd ComfyUI-Docker
2. Launch ComfyUI
Choose an example directory and start the service:
Core GPU (recommended for most users):
cd examples/core-gpu
docker compose up -d
Complete GPU (extra custom-node dependencies):
cd examples/complete-gpu
docker compose up -d
Core CPU (no GPU required):
cd examples/core-cpu
docker compose up -d
3. Access the Interface
Open your browser to: http://localhost:8188
4. Download Models
Place your Stable Diffusion checkpoints in ./data/models/checkpoints/ or download them through the ComfyUI interface.
Deployment Profiles
ComfyUI Docker offers five deployment examples to match your hardware and use case:
| Example | Container | Image | Best For | Features |
|---|
core-gpu | comfyui-core-gpu | ghcr.io/pixeloven/comfyui/core:cuda-latest | Most users | Essential ComfyUI + GPU acceleration |
complete-gpu | comfyui-complete-gpu | ghcr.io/pixeloven/comfyui/complete:cuda-latest | Power users | Pre-installed common custom-node dependencies |
core-amd | comfyui-core-amd | ghcr.io/pixeloven/comfyui/core:rocm-latest | AMD Linux | PyTorch ROCm 7.2 |
core-intel | comfyui-core-intel | ghcr.io/pixeloven/comfyui/core:xpu-latest | Intel Arc Linux | PyTorch XPU |
core-cpu | comfyui-core-cpu | ghcr.io/pixeloven/comfyui/core:cpu-latest | Testing/Compatibility | No GPU required |
Core GPU (examples/core-gpu) ⚡
Fast, lightweight ComfyUI with GPU support.
cd examples/core-gpu
docker compose up -d
- ✅ Essential ComfyUI functionality
- ✅ GPU acceleration (CUDA 13.0 / PyTorch cu130)
- ✅ Fast startup
- ✅ Smaller image size
Complete GPU (examples/complete-gpu) 🚀
CUDA deployment with pre-installed Python dependencies used by common custom nodes.
cd examples/complete-gpu
docker compose up -d
- ✅ Everything core has
- ✅ Pre-installed Python dependencies for common custom node setups
- ✅ Current Comfy Kitchen attention backend available with
CLI_ARGS=--use-ck-attention
- ✅ SageAttention 2.2.0 variants for Ampere through Blackwell GPUs
- ⚠️ Larger image size
For SageAttention, select the tag matching the GPU compute capability and add
--use-sage-attention to CLI_ARGS. For example, RTX 50-series (Blackwell)
uses ghcr.io/pixeloven/comfyui/complete:cuda-sm120-latest. See the
Performance Tuning Guide for
the full architecture table and verification steps.
Core CPU (examples/core-cpu)
No GPU required, universal compatibility.
cd examples/core-cpu
docker compose up -d
- ✅ Works without NVIDIA GPU
- ⚠️ Slower generation times
- ✅ Lower resource requirements
Data & Storage