mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-15 13:02:35 +08:00
fix(docker): correct nvidia-smi package name and enable non-free repositories for Debian Trixie
Fix CUDA package installation failures by using correct Debian Trixie package names and enabling required non-free repositories. Package Name Corrections: - Replace non-existent "nvidia-utils-545" with "nvidia-smi" - nvidia-smi package is available in Debian Trixie non-free repository - Requires enabling contrib/non-free/non-free-firmware components Repository Configuration: - Add non-free repositories to /etc/apt/sources.list.d/non-free.list - Enable contrib, non-free, and non-free-firmware components for nvidia-smi access - Maintain CUDA 12.9 repository for development toolkit packages Environment Variable Fix: - Set LD_LIBRARY_PATH=/usr/local/cuda-12.9/lib64 without concatenation - Eliminates "Usage of undefined variable '$LD_LIBRARY_PATH'" warning - Ensures proper CUDA library path configuration This resolves the build error: "E: Unable to locate package nvidia-utils-545" and enables the entrypoint script to successfully detect GPUs via nvidia-smi command. Maintains all functionality while using proper Debian Trixie package ecosystem.
This commit is contained in:
parent
05dd15f093
commit
630f92b095
12
Dockerfile
12
Dockerfile
@ -13,7 +13,7 @@ ENV DEBIAN_FRONTEND=noninteractive \
|
||||
MAX_JOBS=32 \
|
||||
SAGE_ATTENTION_AVAILABLE=0
|
||||
|
||||
# System deps + minimal CUDA toolkit for building
|
||||
# Enable non-free repositories for nvidia-smi and install system deps + CUDA toolkit
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
git \
|
||||
build-essential \
|
||||
@ -27,20 +27,22 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
wget \
|
||||
gnupg2 \
|
||||
ca-certificates \
|
||||
software-properties-common \
|
||||
&& 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 \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
cuda-nvcc-12-9 \
|
||||
cuda-cudart-dev-12-9 \
|
||||
nvidia-utils-545 \
|
||||
nvidia-smi \
|
||||
&& rm -rf /var/lib/apt/lists/* \
|
||||
&& rm cuda-keyring_1.1-1_all.deb
|
||||
|
||||
# Set CUDA paths for entrypoint compilation
|
||||
# Set CUDA paths for entrypoint compilation (fix LD_LIBRARY_PATH warning)
|
||||
ENV CUDA_HOME=/usr/local/cuda-12.9 \
|
||||
PATH=/usr/local/cuda-12.9/bin:${PATH} \
|
||||
LD_LIBRARY_PATH=/usr/local/cuda-12.9/lib64:${LD_LIBRARY_PATH}
|
||||
LD_LIBRARY_PATH=/usr/local/cuda-12.9/lib64
|
||||
|
||||
# Create symlink for compatibility
|
||||
RUN ln -sf /usr/local/cuda-12.9 /usr/local/cuda
|
||||
@ -71,7 +73,7 @@ RUN set -e; \
|
||||
# Workdir
|
||||
WORKDIR /app/ComfyUI
|
||||
|
||||
# Leverage layer caching: install deps before copying full tree
|
||||
# Copy requirements with optional handling
|
||||
COPY requirements.txt* ./
|
||||
|
||||
# Core Python deps (torch CUDA 12.9, ComfyUI reqs), media/NVML libs
|
||||
|
||||
Loading…
Reference in New Issue
Block a user