mirror of
https://github.com/AbdBarho/stable-diffusion-webui-docker.git
synced 2026-03-19 19:44:44 +01:00
Update comfyui & pre-install requirements
This commit is contained in:
parent
99928ec800
commit
01f26a3704
|
|
@ -112,7 +112,7 @@ services:
|
||||||
- ./data/models:/SwarmUI/Models
|
- ./data/models:/SwarmUI/Models
|
||||||
- ./data/embeddings:/SwarmUI/Models/Embeddings
|
- ./data/embeddings:/SwarmUI/Models/Embeddings
|
||||||
# comfyui
|
# comfyui
|
||||||
- ./data/config/comfy/custom_nodes:/SwarmUI/dlbackend/ComfyUI/custom_nodes*
|
- ./data/config/comfy/custom_nodes:/SwarmUI/dlbackend/ComfyUI/custom_nodes
|
||||||
# TODO fix permissions
|
# TODO fix permissions
|
||||||
- ./data/models/configs:/SwarmUI/dlbackend/ComfyUI/user/default/
|
- ./data/models/configs:/SwarmUI/dlbackend/ComfyUI/user/default/
|
||||||
# output
|
# output
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# Defines the versions of ComfyUI, ComfyUI Manager, and PyTorch to use
|
# Defines the versions of ComfyUI, ComfyUI Manager, and PyTorch to use
|
||||||
ARG COMFYUI_VERSION=v0.3.50
|
ARG COMFYUI_VERSION=v0.3.52
|
||||||
ARG COMFYUI_MANAGER_VERSION=3.33.8
|
ARG COMFYUI_MANAGER_VERSION=3.33.8
|
||||||
ARG PYTORCH_VERSION=2.7.1-cuda12.8-cudnn9-runtime
|
ARG PYTORCH_VERSION=2.7.1-cuda12.8-cudnn9-runtime
|
||||||
|
|
||||||
|
|
@ -50,12 +50,17 @@ RUN pip3 install --no-cache-dir \
|
||||||
sageattention \
|
sageattention \
|
||||||
psutil
|
psutil
|
||||||
|
|
||||||
|
# Pre-install previously used custom nodes requirements from volume
|
||||||
|
COPY ./install/merged-requirements.txt* /docker/requirements.txt
|
||||||
|
RUN sh -c '[ -f /docker/requirements.txt ] && pip install --no-cache-dir -r /docker/requirements.txt \
|
||||||
|
|| echo "merged-requirements.txt not found, skipping pre-install."'
|
||||||
|
|
||||||
# Sets the working directory to the ComfyUI directory
|
# Sets the working directory to the ComfyUI directory
|
||||||
WORKDIR /opt/comfyui
|
WORKDIR /opt/comfyui
|
||||||
COPY . /docker/
|
COPY . /docker/
|
||||||
RUN chmod u+x /docker/entrypoint.sh && cp /docker/extra_model_paths.yaml /opt/comfyui
|
RUN chmod u+x /docker/entrypoint.sh && cp /docker/extra_model_paths.yaml /opt/comfyui
|
||||||
|
|
||||||
ENV NVIDIA_VISIBLE_DEVICES=all PYTHONPATH="${PYTHONPATH}:${PWD}" CLI_ARGS=""
|
ENV NVIDIA_VISIBLE_DEVICES=all PYTHONPATH="\${PYTHONPATH}:\${PWD}" CLI_ARGS=""
|
||||||
EXPOSE 7861
|
EXPOSE 7861
|
||||||
|
|
||||||
# Adds the startup script to the container; the startup script will create all necessary directories in the models and custom nodes volumes that were
|
# Adds the startup script to the container; the startup script will create all necessary directories in the models and custom nodes volumes that were
|
||||||
|
|
|
||||||
2
services/comfy/install/.gitignore
vendored
Normal file
2
services/comfy/install/.gitignore
vendored
Normal file
|
|
@ -0,0 +1,2 @@
|
||||||
|
reqs
|
||||||
|
merged-requirements.txt
|
||||||
52
services/comfy/install/install.sh
Normal file
52
services/comfy/install/install.sh
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# Get custom nodes requirements and merge latest versions
|
||||||
|
REQ_PATH="data/config/comfy/custom_nodes"
|
||||||
|
BUILD_PATH="services/comfy/install"
|
||||||
|
|
||||||
|
mkdir -p ${BUILD_PATH}/reqs
|
||||||
|
for f in ${REQ_PATH}/*/requirements.txt; do \
|
||||||
|
node=$(basename $(dirname "$f")); \
|
||||||
|
cp "$f" ${BUILD_PATH}/reqs/${node}-requirements.txt; \
|
||||||
|
done
|
||||||
|
find ${BUILD_PATH}/reqs -maxdepth 1 -name "*requirements.txt" -exec cat {} + \
|
||||||
|
| grep -v '^#' \
|
||||||
|
| grep -v '^git' \
|
||||||
|
| sed 's/==.*//' \
|
||||||
|
| awk '{print tolower($0)}' \
|
||||||
|
| sed 's/[[:space:]]//g' \
|
||||||
|
| sort -u \
|
||||||
|
| awk '
|
||||||
|
{
|
||||||
|
line = $0;
|
||||||
|
if (line ~ /^[[:space:]]*$/) { next }
|
||||||
|
if (line ~ /git\+/ || line ~ /\[.*\]/) {
|
||||||
|
print "Z_" line, "0", line
|
||||||
|
next
|
||||||
|
}
|
||||||
|
split(line, a, "[<>=]")
|
||||||
|
package = a[1]
|
||||||
|
version = a[2]
|
||||||
|
gsub(/[[:space:]]+/, "", package)
|
||||||
|
gsub(/_/, "-", package)
|
||||||
|
if (version == "") {
|
||||||
|
version = "0"
|
||||||
|
}
|
||||||
|
print package, version, line
|
||||||
|
}
|
||||||
|
' \
|
||||||
|
| sort -k1,1 -V -k2,2 \
|
||||||
|
| awk '
|
||||||
|
{
|
||||||
|
if (prev_package != $1) {
|
||||||
|
if (NR > 1) {
|
||||||
|
print prev_line
|
||||||
|
}
|
||||||
|
prev_package = $1
|
||||||
|
}
|
||||||
|
prev_line = $3
|
||||||
|
}
|
||||||
|
END {
|
||||||
|
print prev_line
|
||||||
|
}
|
||||||
|
' \
|
||||||
|
> ${BUILD_PATH}/merged-requirements.txt
|
||||||
Loading…
Reference in a new issue