diff --git a/services/comfy/entrypoint.sh b/services/comfy/entrypoint.sh index 6090090..d4f91e3 100755 --- a/services/comfy/entrypoint.sh +++ b/services/comfy/entrypoint.sh @@ -22,16 +22,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 [ -e "$dir/requirements.txt" ]; then - echo $dir - cd $dir - pip install -r requirements.txt - fi - done +if [ -f "/data/config/comfy/startup.sh" ]; then + pushd ${ROOT} + . /data/config/comfy/startup.sh + popd fi +shopt -s nullglob +list=(${ROOT}/custom_nodes/*/requirements.txt) +for req in "${list[@]}"; do + pip install -r "$req" +done + exec "$@"