From 1c129ee19023073fa89c3d2621c1239a122b6f06 Mon Sep 17 00:00:00 2001 From: PassiveLemon Date: Sun, 7 May 2023 09:52:08 -0400 Subject: [PATCH] Automated install of pip packages for nodes --- services/comfy/entrypoint.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/services/comfy/entrypoint.sh b/services/comfy/entrypoint.sh index 5ffc6bc..a962ac5 100755 --- a/services/comfy/entrypoint.sh +++ b/services/comfy/entrypoint.sh @@ -44,4 +44,16 @@ for to_path in "${!MOUNTS[@]}"; do echo Mounted $(basename "${from_path}") done +if [ "$(ls -A /stable-diffusion/custom_nodes)" ]; then + chmod 777 -R "/stable-diffusion/custom_nodes/" + apt-get install build-essential -y + for dir in "/stable-diffusion/custom_nodes/*/"; do + if [ -d $dir ]; then + echo $dir + cd $dir + pip install -r requirements.txt + fi + done +fi + exec "$@"