YanWenKun / ComfyUI-Docker

🐳Dockerfile for 🎨ComfyUI. | 容器镜像与启动脚本
https://hub.docker.com/r/yanwk/comfyui-boot
Other
468 stars 87 forks source link

Add ability for pre-start script #23

Closed M1kep closed 8 months ago

M1kep commented 8 months ago

This is a proposal to add the ability for users to further extend the image with their own custom startup scripts.

The startup script should be created by the user at ./storage/scripts/pre-start.sh

My particular use case is to install some additional python packages for debugging, without needing to rebuild the whole image locally(Which for some reason fails.. but I haven't looked too deeply into that.)

YanWenKun commented 8 months ago

Merged! Note that entrypoint.sh has set -e, it will stop if pre-start.sh run into error. You can override that like:

# pre-start.sh
set +e
chmod +x another-script.sh
bash another-script.sh

# another-script.sh
set -e
step1
step2
...

So the another-script.sh will stop if any step returns error. But pre-start.sh will just skip that and continue starting ComfyUI.