Commit Graph

10 Commits

Author SHA1 Message Date
clsferguson
7318b3f5d1
fix(build): remove unsupported --break-system-packages from pip wheel in builder 2025-09-21 23:12:06 -06:00
clsferguson
97b4d164ed
build(docker): compile SageAttention 2.2 on slim trixie using Debian CUDA toolkit; install wheel into runtime and enable flag
Switch to a two-stage Dockerfile that builds SageAttention 2.2 from source on python:3.12-slim-trixie by explicitly enabling contrib/non-free/non-free-firmware in APT and installing Debian’s nvidia-cuda-toolkit (nvcc) for compilation, then installs the produced cp312 wheel into the slim runtime so --use-sage-attention works at startup. The builder installs Torch cu129 to match the runtime for ABI compatibility and uses pip’s --break-system-packages to avoid a venv while respecting PEP 668 in a controlled way, keeping layers lean and avoiding the prior sources.list and space issues seen on GitHub runners. The final image remains minimal while bundling an up-to-date SageAttention build aligned with the Torch/CUDA stack in use.
2025-09-21 22:54:12 -06:00
clsferguson
bc0e12819d
build(docker): compile SageAttention 2.2 on slim trixie with Debian CUDA toolkit; install wheel into runtime
Switch to a two-stage build that uses python:3.12-slim-trixie as both builder and runtime, enabling contrib/non-free/non-free-firmware in APT to install Debian’s nvidia-cuda-toolkit (nvcc) for compiling SageAttention 2.2 from source. Install Torch cu129 in the builder and build a cp312 wheel, then copy and install that wheel into the slim runtime so --use-sage-attention works at startup. This removes the heavy CUDA devel base, avoids a venv by permitting pip system installs during build, and keeps the final image minimal while ensuring ABI alignment with Torch cu129.
2025-09-21 22:42:46 -06:00
clsferguson
7b448364d1
fix(build): use CUDA devel builder + venv to build and bundle SageAttention 2.2 wheel; make launch flag effective
Switch the builder stage to nvidia/cuda:12.9.0-devel-ubuntu24.04 and create a Python 3.12 venv to avoid PEP 668 “externally managed” errors, install Torch 2.8.0+cu129 in that venv, and build a cp312 SageAttention 2.2 wheel from upstream; copy and install the wheel in the slim runtime so --use-sage-attention works at startup.
This resolves prior build failures on Debian Trixie slim where CUDA toolkits were unavailable and fixes runtime ModuleNotFoundError by ensuring the module is present in the exact interpreter ComfyUI uses.
2025-09-21 22:15:28 -06:00
clsferguson
8ec3d38c77
fix(build): compile and bundle SageAttention 2.2 using CUDA devel builder so --use-sage-attention works
Switch the builder stage to an NVIDIA CUDA devel image (12.9.0) to provide nvcc and headers, shallow‑clone SageAttention, and build a cp312 wheel against the same Torch (2.8.0+cu129) as the runtime; copy and install the wheel into the slim runtime to ensure the module is present at launch. This replaces the previous approach that only added the launch flag and failed at runtime with ModuleNotFoundError, and avoids apt failures for CUDA packages on Debian Trixie slim while keeping the final image minimal and ABI‑aligned.
2025-09-21 22:07:14 -06:00
clsferguson
f655b2a960
feat(build,docker): add multi-stage build to compile and bundle SageAttention 2.2; enable via --use-sage-attention
Introduce a two-stage Docker build that compiles SageAttention 2.2/2++ from the upstream repository using Debian’s CUDA toolkit (nvcc) and the same Torch stack (cu129) as the runtime, then installs the produced wheel in the final slim image. This ensures the sageattention module is present at launch and makes the existing --use-sage-attention flag functional. The runtime image remains minimal while the builder stage carries heavy toolchains; matching Torch across stages prevents CUDA/ABI mismatch. Also retains the previous launch command so ComfyUI auto-enables SageAttention on startup.
2025-09-21 21:45:26 -06:00
clsferguson
051c46b6dc
feat(build,docker): bake SageAttention 2.2 from source and enable in ComfyUI with --use-sage-attention
Adds a multi-stage Docker build that compiles SageAttention 2.2/2++ from the upstream repository head into a wheel using nvcc, then installs it into the slim runtime to keep images small. Ensures the builder installs the same Torch CUDA 12.9 stack as the runtime so the compiled extension ABI matches at load time. Shallow clones the SageAttention repo during build to always pull the latest version on each new image build. Updates the container launch to pass --use-sage-attention so ComfyUI enables SageAttention at startup when the package is present. This change keeps the runtime minimal while delivering up-to-date, high-performance attention kernels for modern NVIDIA GPUs in ComfyUI.
2025-09-21 21:03:24 -06:00
clsferguson
db7f8730db
build: install PyAV 14+, add nvidia-ml-py, fix torch index
This adds av>=14.2 to satisfy Comfy’s API-node canary, ensuring video/audio nodes import without error, and uses the standard PyTorch CUDA 12.9 index URL syntax for reliability. It also installs nvidia-ml-py to align with the ecosystem shift away from deprecated pynvml, reducing future NVML warnings while preserving current functionality. The rest of the base remains unchanged, and existing ComfyUI requirements continue to install as before.
2025-09-17 12:09:26 -06:00
clsferguson
d4b1a405f5
Switch to Python 3.12 base and add CMake for native builds
Update the Dockerfile to use python:3.12.11-slim-trixie to align with available cp312 wheels (notably MediaPipe) and avoid 3.13 ABI gaps, add cmake alongside build-essential to support native builds like dlib, keep the CUDA-enabled PyTorch install via the vendor index, and leave user/workdir/entrypoint/port settings unchanged to preserve runtime behavior.
2025-09-17 09:54:02 -06:00
clsferguson
cd50c9265a
Add Dockerfile for ComfyUI application setup 2025-09-06 21:41:07 -06:00