stable-diffusion-webui-docker/services/AUTOMATIC1111
Seth Moore a5367ace32
AUTOMATIC1111: Enable running as non root user.
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
```
2023-07-13 18:23:11 -04:00
..
clone.sh Make Dockerfiles OCI compliant (#408) 2023-04-16 10:32:03 +02:00
config.py Fix overwriting existing values in config.json in auto (#418) 2023-05-06 07:38:36 +02:00
Dockerfile AUTOMATIC1111: Enable running as non root user. 2023-07-13 18:23:11 -04:00
entrypoint.sh AUTOMATIC1111: Enable running as non root user. 2023-07-13 18:23:11 -04:00
info.py Add gcc (#66) 2022-09-15 20:45:21 +02:00