From dcb0e205ad4be6a0d9d68b5c695ebd6e22a43189 Mon Sep 17 00:00:00 2001 From: YAN Wenkun Date: Tue, 6 Feb 2024 08:45:01 +0800 Subject: [PATCH] Deps for ComfyUI InstantID --- Dockerfile | 9 ++++++++- Dockerfile-rocm | 20 +++++++++++++++----- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index df7f286..e0a39a4 100644 --- a/Dockerfile +++ b/Dockerfile @@ -10,8 +10,10 @@ LABEL maintainer="code@yanwk.fun" RUN --mount=type=cache,target=/var/cache/zypp \ set -eu \ && zypper install --no-confirm \ - python311 python311-pip python311-devel \ + python311 python311-pip \ python311-wheel python311-setuptools python311-numpy \ + python311-devel python311-Cython \ + gcc-c++ cmake \ shadow git aria2 \ Mesa-libGL1 libgthread-2_0-0 \ && rm /usr/lib64/python3.11/EXTERNALLY-MANAGED @@ -33,6 +35,11 @@ RUN --mount=type=cache,target=/root/.cache/pip \ pip install --break-system-packages \ -r https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/main/requirements.txt +# Deps for ComfyUI InstantID +RUN --mount=type=cache,target=/root/.cache/pip \ + pip install --break-system-packages \ + -r https://raw.githubusercontent.com/ZHO-ZHO-ZHO/ComfyUI-InstantID/main/requirements.txt + # Fix for libs (.so files) ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib64/python3.11/site-packages/torch/lib" ENV LD_LIBRARY_PATH="${LD_LIBRARY_PATH}:/usr/lib/python3.11/site-packages/nvidia/cufft/lib" diff --git a/Dockerfile-rocm b/Dockerfile-rocm index 657a37b..f8a5068 100644 --- a/Dockerfile-rocm +++ b/Dockerfile-rocm @@ -11,10 +11,13 @@ LABEL maintainer="code@yanwk.fun" RUN --mount=type=cache,target=/var/cache/zypp \ set -eu \ && zypper install --no-confirm \ - python311 python311-pip python311-devel \ + python311 python311-pip \ python311-wheel python311-setuptools python311-numpy \ + python311-devel python311-Cython \ + gcc-c++ cmake \ shadow git aria2 \ - Mesa-libGL1 + Mesa-libGL1 libgthread-2_0-0 \ + && rm /usr/lib64/python3.11/EXTERNALLY-MANAGED # Install PyTorch nightly RUN --mount=type=cache,target=/root/.cache/pip \ @@ -23,12 +26,19 @@ RUN --mount=type=cache,target=/root/.cache/pip \ # Deps for main app RUN --mount=type=cache,target=/root/.cache/pip \ - pip install --break-system-packages -r https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/requirements.txt + pip install --break-system-packages \ + -r https://raw.githubusercontent.com/comfyanonymous/ComfyUI/master/requirements.txt # Deps for ControlNet Auxiliary Preprocessors RUN --mount=type=cache,target=/root/.cache/pip \ - pip install --break-system-packages -r https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/main/requirements.txt \ - --extra-index-url https://download.pytorch.org/whl/nightly/rocm5.7 + pip install --break-system-packages \ + -r https://raw.githubusercontent.com/Fannovel16/comfyui_controlnet_aux/main/requirements.txt \ + --extra-index-url https://download.pytorch.org/whl/nightly/rocm5.7 + +# Deps for ComfyUI InstantID +RUN --mount=type=cache,target=/root/.cache/pip \ + pip install --break-system-packages \ + -r https://raw.githubusercontent.com/ZHO-ZHO-ZHO/ComfyUI-InstantID/main/requirements.txt # Create a low-privilege user. RUN printf 'CREATE_MAIL_SPOOL=no' > /etc/default/useradd \