mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-04-19 15:02:44 +08:00
chore(dockerfile): remove strict duplicate libcairo2 and add onnxruntime-gpu
- Remove libcairo2 from apt since libcairo2-dev already depends on and installs it; avoids redundant listing while keeping Cairo headers needed for builds. - Add onnxruntime-gpu to Python dependencies so CUDAExecutionProvider is available without runtime installation steps.
This commit is contained in:
parent
f4d9284f63
commit
fba33ec275
@ -33,7 +33,6 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
ninja-build \
|
ninja-build \
|
||||||
patch \
|
patch \
|
||||||
pkg-config \
|
pkg-config \
|
||||||
libcairo2 \
|
|
||||||
libcairo2-dev \
|
libcairo2-dev \
|
||||||
&& echo "deb http://deb.debian.org/debian trixie main contrib non-free non-free-firmware" > /etc/apt/sources.list.d/non-free.list \
|
&& 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 \
|
&& wget https://developer.download.nvidia.com/compute/cuda/repos/debian12/x86_64/cuda-keyring_1.1-1_all.deb \
|
||||||
@ -51,7 +50,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
|
|||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& rm cuda-keyring_1.1-1_all.deb
|
&& rm cuda-keyring_1.1-1_all.deb
|
||||||
|
|
||||||
# Install uv (latest) by copying binaries from Astral's official distroless image
|
# Install uv (latest)
|
||||||
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
|
COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /usr/local/bin/
|
||||||
|
|
||||||
# Patch CUDA math_functions.h for glibc 2.41 compatibility
|
# Patch CUDA math_functions.h for glibc 2.41 compatibility
|
||||||
@ -97,12 +96,12 @@ WORKDIR /app/ComfyUI
|
|||||||
# Copy requirements with optional handling
|
# Copy requirements with optional handling
|
||||||
COPY requirements.txt* ./
|
COPY requirements.txt* ./
|
||||||
|
|
||||||
# Core Python deps (torch CUDA 12.9, ComfyUI reqs), media/NVML libs, and CuPy (CUDA 12.x wheel)
|
# Core Python deps (torch CUDA 12.9, ComfyUI reqs, media/NVML libs, CuPy (CUDA 12.x wheel), and ORT-GPU)
|
||||||
RUN python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu129 \
|
RUN python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu129 \
|
||||||
&& python -m pip install triton \
|
&& python -m pip install triton \
|
||||||
&& python -m pip install --prefer-binary cupy-cuda12x \
|
&& python -m pip install --prefer-binary cupy-cuda12x \
|
||||||
&& if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi \
|
&& if [ -f requirements.txt ]; then python -m pip install -r requirements.txt; fi \
|
||||||
&& python -m pip install imageio-ffmpeg "av>=14.2" nvidia-ml-py
|
&& python -m pip install imageio-ffmpeg "av>=14.2" nvidia-ml-py onnxruntime-gpu
|
||||||
|
|
||||||
# Copy the application
|
# Copy the application
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user