mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-15 13:02:35 +08:00
fix(docker): add complete CUDA development libraries for Sage Attention compilation
Add missing CUDA development headers required for successful Sage Attention builds, specifically addressing cusparse.h compilation errors. Missing Development Libraries Added: - libcusparse-dev-12-9: Fixes "fatal error: cusparse.h: No such file or directory" - libcublas-dev-12-9: CUBLAS linear algebra library headers - libcurand-dev-12-9: CURAND random number generation headers - libcusolver-dev-12-9: CUSOLVER dense/sparse solver headers - libcufft-dev-12-9: CUFFT Fast Fourier Transform headers Build Performance Enhancement: - ninja-build: Eliminates "could not find ninja" warnings and speeds up compilation Root Cause: Previous installation only included cuda-nvcc-12-9 and cuda-cudart-dev-12-9, but Sage Attention compilation requires the complete set of CUDA math library development headers for linking against PyTorch's CUDA extensions. Compilation Error Resolved: "/usr/local/lib/python3.12/site-packages/torch/include/ATen/cuda/CUDAContextLight.h:8:10: fatal error: cusparse.h: No such file or directory" GPU Detection and Strategy Selection Already Working: - 5x RTX 3060 GPUs detected correctly - PyTorch CUDA compatibility confirmed - RTX 30/40 optimization strategy selected appropriately - Triton 3.4.0 installation successful This provides the complete CUDA development environment needed for Sage Attention source compilation while maintaining the slim image approach.
This commit is contained in:
parent
2870b96895
commit
20731f2039
@ -27,6 +27,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
wget \
|
||||
gnupg2 \
|
||||
ca-certificates \
|
||||
ninja-build \
|
||||
&& echo "deb http://deb.debian.org/debian trixie main contrib non-free non-free-firmware" > /etc/apt/sources.list.d/non-free.list \
|
||||
&& wget https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb \
|
||||
&& dpkg -i cuda-keyring_1.1-1_all.deb \
|
||||
@ -34,6 +35,11 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
cuda-nvcc-12-9 \
|
||||
cuda-cudart-dev-12-9 \
|
||||
libcusparse-dev-12-9 \
|
||||
libcublas-dev-12-9 \
|
||||
libcurand-dev-12-9 \
|
||||
libcusolver-dev-12-9 \
|
||||
libcufft-dev-12-9 \
|
||||
nvidia-smi \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& rm cuda-keyring_1.1-1_all.deb
|
||||
|
||||
Loading…
Reference in New Issue
Block a user