fix(docker): skip system package upgrades to avoid Debian conflicts

Remove pip/setuptools/wheel upgrade to prevent "Cannot uninstall wheel, 
RECORD file not found" error when attempting to upgrade system packages 
installed via apt.

Ubuntu 24.04 CUDA images include system-managed Python packages that lack 
pip RECORD files, causing upgrade failures. Since the pre-installed versions 
are sufficient for our dependencies, we skip upgrading them and focus on 
installing only the required application packages.

This approach:
- Avoids Debian package management conflicts
- Reduces Docker build complexity  
- Maintains functionality while improving reliability
- Eliminates pip uninstall errors for system packages

Resolves error: "Cannot uninstall wheel 0.42.0, RECORD file not found"
This commit is contained in:
clsferguson 2025-09-22 09:12:45 -06:00 committed by GitHub
parent bc2dffa0b0
commit 3f50cbf91c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -47,8 +47,8 @@ WORKDIR /app/ComfyUI
COPY requirements.txt ./
# Core Python deps (torch CUDA 12.8, ComfyUI reqs), media/NVML libs
RUN python -m pip install --upgrade pip setuptools wheel \
&& python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu128 \
# Skip upgrading system pip/setuptools/wheel to avoid Debian package conflicts
RUN python -m pip install torch torchvision torchaudio --extra-index-url https://download.pytorch.org/whl/cu128 \
&& python -m pip install triton \
&& python -m pip install -r requirements.txt \
&& python -m pip install imageio-ffmpeg "av>=14.2" nvidia-ml-py