Expose build args to container which allow the web service
to run as given uid:gid.
By default, this behavior is "off". Building via docker compose still
defaults to root:root on everything. Unless these args are explicitly
set, no users should notice a difference.
Build arguments are also exposed as Docker environment variables, so they can
be freely referenced in the `entrypoint.sh`
Output files will be owned by PUID and PGID, so if set, no more root:root
images (unless desired).
New arguments:
- ARG PUID=0
- ARG PGID=0
- ARG USER_HOME=/root
New environment variable:
- RSYNC_FLAGS
- NFS share doesn't like `-a` changing every bit on a directory
Example docker-compose.override.yaml using these flags
```
version: '3.9'
services:
auto:
environment:
RSYNC_FLAGS: -vrlgotO
build:
args:
USER_HOME: /opt/stablediffusion
PUID: 1000
PGID: 1002
volumes:
- /media/data:/data
- /tmp:/output
download:
volumes:
- /media/data:/data
```
Perform a full extension installation process instead of just installing
dependencies
Some extensions do not include `requirements.txt` but install
dependencies in `install.py`, and all extensions include `install.py`,
so it is safe to use it for extended dependency installation
This is because the extension development of AUTOMATIC1111's webui does
not require the existence of `requirements.txt` but uses `install.py` to
initialize the extension
https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Developing-extensions#installpy
`jq` merge direction in this case is right to left so if the user had
set up custom paths it would replace them with the default ones.
This PR switches the direction to use the defaults as fallback instead
of overwriting user settings.
----
Didn't want to create an issue for the tiny change.
Thanks for your work on the repo, it saved me a lot of time, 👍
---------
Co-authored-by: AbdBarho <ka70911@gmail.com>
Upon enabling the ControlNet addon from
https://github.com/AbdBarho/stable-diffusion-webui-docker/pull/385 one
might want to use the `openpose` preprocessors. Those are downloaded by
the addon the first time they are used. Without proper mounts those
networks will be downloaded on usage after each container start.
This PR enables those mounts to reduce data traffic.
The ControlNet addon
[sd-webui-controlnet](https://github.com/Mikubill/sd-webui-controlnet)
requires the `data/ControlNet` folder to be mounted into
`models/ControlNet`.
This PR enables said mount and adds the ControlNet folder to
`.gitignore` file.
---------
Co-authored-by: AbdBarho <ka70911@gmail.com>
Rename the UIs in docker compose to their new names
Changes folder names
Changes output folder structure
Closes issue #263
Adds `sygil-sl` instead of docker compose flag.
Builds on top of #150
Thanks to @pirahtays
Co-authored-by: Imaginator <mriegel@gmail.com>
Co-authored-by: pirahtays <35934562+pirahtays@users.noreply.github.com>