Hello everyone,
I’m sharing here my custom docker setup for ComfyUI. I’m actively using it and trying to find improvements as I go. Tested various other setups but none of them performed very well or the way i liked, each with their own issues.
Here you can find a github repo with the docker image: GitHub - luix93/DGX-Spark-ComfyUI: An optimized setup for running ComfyUI on DGX Spark · GitHub
Main features:
-
CUDA 13.1 base — full
nvccsupport for GB10 (sm_121), enabling CUDA extension compilation -
PyTorch cu130 — prebuilt ARM64 wheels from PyTorch’s cu130 index
-
SageAttention 2 — compiled from source directly against sm_121 for full hardware attention acceleration
-
Comfy Kitchen (
comfy_kitchen) — NVFP4 quantization support for Blackwell -
Unified-memory optimized flags — carefully tuned
COMFYUI_FLAGSthat avoid fighting the Grace-Blackwell memory fabric -
Double-VRAM bug fix — patches
comfy/utils.pyto setcopy=Falseintensor.to(), fixing the double memory usage on unified memory systems with--disable-mmap -
Disabled dynamic vram — uses
--disable-dynamic-vramas it doesn’t work properly on the Spark, if models fit in memory they won’t be unloaded, faster prompt changes to final image/video -
ComfyUI-Manager — auto-installed at container startup into the mounted
custom_nodesvolume -
ComfyUIMini — lightweight mobile/tablet UI proxying to the ComfyUI backend (optional second service)
-
Health checks — both services expose health check endpoints for reliable
depends_onstartup ordering -
Persistent volumes — models, custom nodes, outputs, inputs, user settings, and workflows are all mounted from the host
Would love to know if you find this useful, and also very interested in case you find additional potential optimizations that might speed things up.