Skip to content

Commit

Permalink
Deps for ComfyUI InstantID
Browse files Browse the repository at this point in the history
  • Loading branch information
YanWenKun committed Feb 6, 2024
1 parent da8c2f7 commit dcb0e20
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 6 deletions.
9 changes: 8 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ LABEL maintainer="[email protected]"
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
Expand All @@ -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"
Expand Down
20 changes: 15 additions & 5 deletions Dockerfile-rocm
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,13 @@ LABEL maintainer="[email protected]"
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 \
Expand All @@ -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 \
Expand Down

0 comments on commit dcb0e20

Please sign in to comment.