stable-diffusion-webui-docker
stable-diffusion-webui-docker copied to clipboard
Entrypoint with scripts directory + moved mount.sh to scripts directory
As stated in comment https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/102#issuecomment-1260589089 I've prepared entrypoint architecture first, so there is place to divide startup scripts into smaller ones with proper functionality spearated.
mount.sh script, as container decorator, seems to ideally belong to entrypoint scripts ecosystem, so it has been moved there and Dockerfile properly changed
@DevilaN thank you for the contribution, I am not sure if https://github.com/AbdBarho/stable-diffusion-webui-docker/issues/102#issuecomment-1260589089 is the right link, it seems to talk about a totally different problem (config.json stuff).
While I do think this is a good idea, especially if the containers are uploaded to dockerhub so other users can extend them, I don't believe it adds value to this repo in this particular time.
The purpose of this repo in my mind is a low-code low-investment low-headache solution for setting up stable diffusion, extensibility is neither a priority nor a necessity, I would argue many of the users of this app have never coded before, this is the target audience.
I prefer to keep stuff as simple as possible, and I believe the complexity of the entrypoint has already converged, nothing significant will change in the short to mid term future. So an entrypoint that calls other entrypoints seems redundant.
A similar discussion was had in #57, which is why I recommend creating an issue to talk about the situation / opinions / expectations beforehand.
Again, I welcome the contribution, and future ones, and thanks for answering some questions in the issues, it means a lot!
@AbdBarho previous comment mentions about entrypoint. The linked one seems to agree with the need, but maybe I've misinterpreted it.
Responsibility for creating config.json if it does not exists in first place inside volume and place proper link to it inside original location of config.json file, can be placed on entrypoint script.
Right now there is no entrypoint in image. There is only mount.sh script conveniently added in CMD sequence before proper command running app.
Naturally for me, as a small step it was this minor change allowing to run multiple scripts in docker way, so we do not bulk up everything in mount.sh file, which seems not to mount anything at all, but links resources from volume to proper destinations in app + does few other things. Single Responsibility Principle easy way.
Next changes will be splitting mount.sh into small, manageable scripts doing proper things like maintaining merge of config.json, or allowing to use additional scripts in AUTOMATIC (I mean those which are selectable from drop-down menu).
Again, sorry for misunderstanding and mess with not creating dedicated issue for this PR.
Regards
I am closing this PL, beacause entrypoint has been implemented with other solution and this PR makes no sense right now.