ai-dock/stable-diffusion-webui

How do I disable Syncthing and Jupyter Notebook on startup or remove them completely from build?

Quakumei opened this issue · 2 comments

Hello @robballantyne! Thanks a lot for maintaining the docker container for A1111 webui, it's been very helpful and handy to use for me. Service portal is fire in means of monitoring and observing the container. Caddy proxy is lit.

Currently my aim is to create a minimal container to provide Stable Diffusion services via API, and I was wondering whether or not there is a possibility to remove Jupyter Notebook and Syncthing services from the docker container, or atleast, disable them on container startup to reduce overhead and bloat in logs?

I've skimmed through Dockerfile, init.sh, other .sh scripts and couldn't find where those services are being boot. In README.md and base image container documentation there is only enough information to come up with script for disabling services after the startup via supervisorctl. (README.md#Additional services + 1.0-Included-Software)

Apparently, there is an opportunity to use base container without jupyter somehow as described in 5.0-Building-the-Image, but there is scarcely any information about installation / disabling of Syntching server.

Can you give me a hint on how to disable those services on startup or remove them from build completely? Or where at least I should look for to achieve what I want?

I believe that such possibility to disable unnescessary services would be handy to have for other people too.

Hope to hear from you soon

Ilya

Hi @Quakumei

Thanks for the kind words - I appreciate it!

Currently there is no way to disable these services and doing so in the build would conflict with the license. However, I think adding support for this is really important.

I'm very focused on API usage with these containers (lots of changes coming for that) and reducing unnecessary load makes sense.

I'll add a configuration option to make this easy.

In the meantime you could add the following to your provisioning script to stop the services:

sudo supervisorctl stop jupyter
sudo supervisorctl stop syncthing

Hope this helps and I'll update here when I've added the new config options

Thanks a lot for your reply! Looking forward to updates for API usage :)

And thanks for the tip with provisioning script, that'll help me a lot.

Have a good day!