Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ComfyUI Docker CUDA base

A reusable ComfyUI runtime built from one Dockerfile, with selectable PyTorch CUDA 12.6, 12.8, or 13.0 wheels. It does not inherit from a prebuilt ComfyUI image.

The only container parent is Rocky Linux. PyTorch, NVIDIA runtime libraries, ComfyUI, ComfyUI Manager, CuPy, TAESD, and common workflow dependencies are installed by instructions owned in this repository.

The release target is linux/amd64, matching Runpod's x86-64 NVIDIA workers. ARM images are not built or supported.

Supported variants

Build argument Image suffix PyTorch Runtime Blackwell support
126 cu126 2.11.0 CUDA 12.6 No
128 cu128 2.11.0 CUDA 12.8 Yes
130 cu130 2.11.0 CUDA 13.0 Yes

CUDA 12.8 is the recommended general-purpose Runpod build. CUDA 12.6 reaches older driver hosts but should not be used for Blackwell GPUs. CUDA 13.0 requires an R580-or-newer host driver.

These are runtime images. They include CUDA through PyTorch's wheels but do not include nvcc or a full CUDA development toolkit. A downstream custom node that compiles CUDA source should use a separate devel image design or install a wheel matching the selected PyTorch/CUDA combination.

Build

Build the recommended CUDA 12.8 image:

make build

Build an individual variant:

make build-126
make build-128
make build-130

Or call Docker directly:

docker buildx build \
  --platform linux/amd64 \
  --build-arg CUDA_VERSION=128 \
  --build-arg COMFYUI_REF=v0.28.2 \
  --load \
  -t comfyui-docker-cuda:base-cu128-pt2.11.0 \
  .

CUDA_VERSION accepts only 126, 128, or 130. An unsupported value fails at the stage-selection step. COMFYUI_REF must be an explicit Git tag or commit available from the configured ComfyUI repository.

Runtime layout

The image contains an immutable template at:

/default-comfyui-bundle/ComfyUI

At first start, the entrypoint overlays that template into:

/root/ComfyUI

Existing files are not overwritten. This permits persistent Pod storage and also preserves files added by older downstream images under /root/ComfyUI. The image deliberately does not declare VOLUME /root, so derived-image writes are retained.

Start ComfyUI:

docker run --rm --gpus all \
  -p 8188:8188 \
  -e CLI_ARGS="--fast" \
  comfyui-docker-cuda:base-cu128-pt2.11.0

Use from a workflow image

Publish the base to your own registry, then pin its digest in downstream Dockerfiles. Add build-time nodes and models to the template path:

FROM ghcr.io/your-org/comfyui-docker-cuda:base-cu128-pt2.11.0@sha256:YOUR_DIGEST

WORKDIR /default-comfyui-bundle/ComfyUI/custom_nodes

RUN git clone --depth=1 \
    https://github.com/Lightricks/ComfyUI-LTXVideo.git

RUN python -m pip install \
    -c /opt/comfyui-build/constraints.txt \
    -r ComfyUI-LTXVideo/requirements.txt

WORKDIR /default-comfyui-bundle/ComfyUI

Download workflow models into the appropriate directory under /default-comfyui-bundle/ComfyUI/models. Pin repository commits, Python package versions, image digests, model URLs, and model SHA-256 checksums in production images.

Legacy derived Dockerfiles that write into /root/ComfyUI/custom_nodes or /root/ComfyUI/models continue to work: on first startup, the core template is copied around those existing files without replacing them. New images should prefer the template path so the complete application can be validated during the image build.

Build contract

The Dockerfile owns the mapping rather than accepting independently supplied PyTorch and CUDA combinations:

CUDA argument PyTorch index CuPy package Host guard
126 cu126 cupy-cuda12x cuda>=12.6
128 cu128 cupy-cuda12x cuda>=12.8
130 cu130 cupy-cuda13x cuda>=13.0

xFormers, FlashAttention, SageAttention, and other compiled accelerators are intentionally excluded. Install them in a CUDA-specific downstream image only after verifying their PyTorch ABI and GPU architecture support.

Validation

Run static checks for every variant:

make check

After building, inspect the embedded runtime without requiring a GPU:

make inspect CUDA_VERSION=128

Run the GPU matrix-multiplication and scaled-dot-product-attention smoke test:

make smoke CUDA_VERSION=128

Before publishing a tag, qualify it on a compatible NVIDIA worker. A CPU build or import test confirms packaging but cannot prove that CUDA kernels execute. For LTX 2.3, also run a small real workflow in the downstream image and verify the output with ffprobe.

Publishing

The GitHub Actions workflow uses Blacksmith's Docker builder and runs this amd64-only matrix in parallel:

Matrix value Stable tags
126 base-cu126-pt2.11.0, cu126
128 base-cu128-pt2.11.0, cu128
130 base-cu130-pt2.11.0, cu130

Every published build also receives an immutable cu<VERSION>-sha-<commit> tag. A Git tag such as v1.0.0 additionally publishes v1.0.0-cu126, v1.0.0-cu128, and v1.0.0-cu130.

Pull requests build all three variants without pushing. Pushes to main, v* tags, and manual workflow runs build and publish to:

ghcr.io/<owner>/comfyui-docker-cuda

The workflow authenticates with GITHUB_TOKEN; it does not need Hugging Face or Civitai secrets because this base image does not download gated models.

Publish explicit tags that expose both CUDA and PyTorch versions:

base-cu126-pt2.11.0
base-cu128-pt2.11.0
base-cu130-pt2.11.0

Example release build:

docker buildx build \
  --platform linux/amd64 \
  --build-arg CUDA_VERSION=128 \
  --provenance=mode=max \
  --sbom=true \
  --push \
  -t ghcr.io/your-org/comfyui-docker-cuda:base-cu128-pt2.11.0 \
  .

Ownership and external inputs

This project removes the dependency on yanwk/comfyui-boot. It necessarily still consumes external software: an operating-system root filesystem, Python packages, NVIDIA runtime libraries, and Git repositories. Eliminating all third-party inputs would require maintaining a Linux distribution, CUDA, PyTorch, and ComfyUI themselves.

See NOTICE.md and LICENSE for attribution and terms.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages