From e13e9f146b2d7a23406fda8d8a7f29af9a4c2749 Mon Sep 17 00:00:00 2001 From: YAN Wenkun Date: Thu, 14 Nov 2024 07:19:36 +0800 Subject: [PATCH] 'cu124's further break down installation steps --- comfy3d-pt25/Dockerfile | 50 +++++++++++++++------------------------- cu124-cn/Dockerfile | 22 ++++++++++++------ cu124-cn/Dockerfile-cn | 22 ++++++++++++------ cu124-megapak/Dockerfile | 22 ++++++++++++------ 4 files changed, 64 insertions(+), 52 deletions(-) diff --git a/comfy3d-pt25/Dockerfile b/comfy3d-pt25/Dockerfile index 33323f8..331ad18 100644 --- a/comfy3d-pt25/Dockerfile +++ b/comfy3d-pt25/Dockerfile @@ -50,7 +50,11 @@ libnpp-devel-12-4 RUN --mount=type=cache,target=/var/cache/zypp \ zypper --gpg-auto-import-keys \ install --no-confirm --no-recommends --auto-agree-with-licenses \ -cuda-libraries-12-4 \ +cuda-libraries-12-4 + +RUN --mount=type=cache,target=/var/cache/zypp \ + zypper --gpg-auto-import-keys \ + install --no-confirm --no-recommends --auto-agree-with-licenses \ cuda-libraries-devel-12-4 ENV PATH="${PATH}:/usr/local/cuda-12.4/bin" \ @@ -96,6 +100,12 @@ python312-scikit-learn \ python312-scipy \ python312-svglib \ python312-tqdm \ + && rm /usr/lib64/python3.12/EXTERNALLY-MANAGED \ + && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 100 + +RUN --mount=type=cache,target=/var/cache/zypp \ + zypper --gpg-auto-import-keys \ + install --no-confirm --auto-agree-with-licenses \ meshlab \ Mesa-libGL1 \ Mesa-libEGL-devel \ @@ -116,8 +126,6 @@ x265 \ google-noto-sans-fonts \ google-noto-sans-cjk-fonts \ google-noto-coloremoji-fonts \ - && rm /usr/lib64/python3.12/EXTERNALLY-MANAGED \ - && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 100 \ && zypper remove --no-confirm libQt5Core5 # Temp fix for PyMeshLab ################################################################################ @@ -151,47 +159,27 @@ RUN --mount=type=cache,target=/root/.cache/pip \ && pip install \ --upgrade pip wheel setuptools -RUN --mount=type=cache,target=/root/.cache/pip \ - pip install \ - --dry-run xformers==0.0.28.post3 torch==2.5.1 torchvision torchaudio \ - --index-url https://download.pytorch.org/whl/cu124 \ - --extra-index-url https://pypi.org/simple - -RUN --mount=type=cache,target=/root/.cache/pip \ - pip install \ - --no-deps torch==2.5.1 \ - --index-url https://download.pytorch.org/whl/cu124 +ARG PIP_INDEX_URL="https://download.pytorch.org/whl/cu124" +ARG PIP_EXTRA_INDEX_URL="https://pypi.org/simple" RUN --mount=type=cache,target=/root/.cache/pip \ pip install \ - --no-deps torch==2.5.1 nvidia-cudnn-cu12 \ - --index-url https://download.pytorch.org/whl/cu124 + --dry-run xformers==0.0.28.post3 torch==2.5.1 torchvision torchaudio RUN --mount=type=cache,target=/root/.cache/pip \ pip install \ - --no-deps torch==2.5.1 nvidia-cublas-cu12 \ - --index-url https://download.pytorch.org/whl/cu124 + --no-deps torch==2.5.1 RUN --mount=type=cache,target=/root/.cache/pip \ pip install \ - --no-deps torch==2.5.1 triton \ - --index-url https://download.pytorch.org/whl/cu124 + --no-deps xformers==0.0.28.post3 torch==2.5.1 RUN --mount=type=cache,target=/root/.cache/pip \ pip install \ - --no-deps torch==2.5.1 nvidia-cusparse-cu12 \ - --index-url https://download.pytorch.org/whl/cu124 + xformers==0.0.28.post3 torch==2.5.1 torchvision torchaudio -RUN --mount=type=cache,target=/root/.cache/pip \ - pip install \ - --no-deps torch==2.5.1 nvidia-nccl-cu12 \ - --index-url https://download.pytorch.org/whl/cu124 - -RUN --mount=type=cache,target=/root/.cache/pip \ - pip install \ - xformers==0.0.28.post3 torch==2.5.1 torchvision torchaudio \ - --index-url https://download.pytorch.org/whl/cu124 \ - --extra-index-url https://pypi.org/simple +ARG PIP_INDEX_URL= +ARG PIP_EXTRA_INDEX_URL= RUN --mount=type=cache,target=/root/.cache/pip \ pip install \ diff --git a/cu124-cn/Dockerfile b/cu124-cn/Dockerfile index e417966..367312c 100644 --- a/cu124-cn/Dockerfile +++ b/cu124-cn/Dockerfile @@ -51,6 +51,12 @@ python312-scikit-learn \ python312-scipy \ python312-svglib \ python312-tqdm \ + && rm /usr/lib64/python3.12/EXTERNALLY-MANAGED \ + && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 100 + +RUN --mount=type=cache,target=/var/cache/zypp \ + zypper --gpg-auto-import-keys \ + install --no-confirm --auto-agree-with-licenses \ Mesa-libGL1 \ Mesa-libEGL-devel \ libgthread-2_0-0 \ @@ -68,9 +74,7 @@ x264 \ x265 \ google-noto-sans-fonts \ google-noto-sans-cjk-fonts \ -google-noto-coloremoji-fonts \ - && rm /usr/lib64/python3.12/EXTERNALLY-MANAGED \ - && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 100 +google-noto-coloremoji-fonts ################################################################################ # GCC 13 @@ -141,10 +145,14 @@ COPY builder-scripts/. /builder-scripts/ # 安装 ComfyUI 及扩展的依赖项 RUN --mount=type=cache,target=/root/.cache/pip \ pip install \ - -r /builder-scripts/pak3.txt \ - && pip install \ - -r /builder-scripts/pak5.txt \ - && pip install \ + -r /builder-scripts/pak3.txt + +RUN --mount=type=cache,target=/root/.cache/pip \ + pip install \ + -r /builder-scripts/pak5.txt + +RUN --mount=type=cache,target=/root/.cache/pip \ + pip install \ -r /builder-scripts/pak7.txt \ && pip list diff --git a/cu124-cn/Dockerfile-cn b/cu124-cn/Dockerfile-cn index 23cb30f..222d438 100644 --- a/cu124-cn/Dockerfile-cn +++ b/cu124-cn/Dockerfile-cn @@ -56,6 +56,12 @@ python312-scikit-learn \ python312-scipy \ python312-svglib \ python312-tqdm \ + && rm /usr/lib64/python3.12/EXTERNALLY-MANAGED \ + && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 100 + +RUN --mount=type=cache,target=/var/cache/zypp \ + zypper --gpg-auto-import-keys \ + install --no-confirm --auto-agree-with-licenses \ Mesa-libGL1 \ Mesa-libEGL-devel \ libgthread-2_0-0 \ @@ -73,9 +79,7 @@ x264 \ x265 \ google-noto-sans-fonts \ google-noto-sans-cjk-fonts \ -google-noto-coloremoji-fonts \ - && rm /usr/lib64/python3.12/EXTERNALLY-MANAGED \ - && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 100 +google-noto-coloremoji-fonts ################################################################################ # GCC 13 @@ -148,10 +152,14 @@ COPY builder-scripts/. /builder-scripts/ # 安装 ComfyUI 及扩展的依赖项 RUN --mount=type=cache,target=/root/.cache/pip \ pip install \ - -r /builder-scripts/pak3.txt \ - && pip install \ - -r /builder-scripts/pak5.txt \ - && pip install \ + -r /builder-scripts/pak3.txt + +RUN --mount=type=cache,target=/root/.cache/pip \ + pip install \ + -r /builder-scripts/pak5.txt + +RUN --mount=type=cache,target=/root/.cache/pip \ + pip install \ -r /builder-scripts/pak7.txt \ && pip list diff --git a/cu124-megapak/Dockerfile b/cu124-megapak/Dockerfile index 6833895..6db22d2 100644 --- a/cu124-megapak/Dockerfile +++ b/cu124-megapak/Dockerfile @@ -96,6 +96,12 @@ python312-scikit-learn \ python312-scipy \ python312-svglib \ python312-tqdm \ + && rm /usr/lib64/python3.12/EXTERNALLY-MANAGED \ + && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 100 + +RUN --mount=type=cache,target=/var/cache/zypp \ + zypper --gpg-auto-import-keys \ + install --no-confirm --auto-agree-with-licenses \ Mesa-libGL1 \ Mesa-libEGL-devel \ libgthread-2_0-0 \ @@ -113,9 +119,7 @@ x264 \ x265 \ google-noto-sans-fonts \ google-noto-sans-cjk-fonts \ -google-noto-coloremoji-fonts \ - && rm /usr/lib64/python3.12/EXTERNALLY-MANAGED \ - && update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.12 100 +google-noto-coloremoji-fonts ################################################################################ # GCC 13 @@ -188,10 +192,14 @@ COPY builder-scripts/. /builder-scripts/ # Deps for ComfyUI & custom nodes RUN --mount=type=cache,target=/root/.cache/pip \ pip install \ - -r /builder-scripts/pak3.txt \ - && pip install \ - -r /builder-scripts/pak5.txt \ - && pip install \ + -r /builder-scripts/pak3.txt + +RUN --mount=type=cache,target=/root/.cache/pip \ + pip install \ + -r /builder-scripts/pak5.txt + +RUN --mount=type=cache,target=/root/.cache/pip \ + pip install \ -r /builder-scripts/pak7.txt \ && pip list