From 6365811f3552766b5ed8f1b459a97d397cf9f7e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E6=A5=BD=E5=9D=82=C2=B7=E5=96=B5?= Date: Sun, 25 Jun 2023 18:42:04 +0800 Subject: [PATCH 1/6] Modify installation extension dependencies (#518) 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 --- docker-compose.yml | 2 +- services/AUTOMATIC1111/entrypoint.sh | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index bff738d..8caad1d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,7 @@ services: <<: *base_service profiles: ["auto"] build: ./services/AUTOMATIC1111 - image: sd-auto:59 + image: sd-auto:60 environment: - CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api diff --git a/services/AUTOMATIC1111/entrypoint.sh b/services/AUTOMATIC1111/entrypoint.sh index 095c2d1..985f6f1 100755 --- a/services/AUTOMATIC1111/entrypoint.sh +++ b/services/AUTOMATIC1111/entrypoint.sh @@ -57,9 +57,10 @@ chown -R root ~/.cache/ chmod 766 ~/.cache/ shopt -s nullglob -list=(./extensions/*/requirements.txt) -for req in "${list[@]}"; do - pip install -r "$req" +# For install.py, please refer to https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Developing-extensions#installpy +list=(./extensions/*/install.py) +for installscript in "${list[@]}"; do + PYTHONPATH=${ROOT} python "$installscript" done if [ -f "/data/config/auto/startup.sh" ]; then From 6c45e0c2efd479a6c91bd7530db5dd20e0fa80c5 Mon Sep 17 00:00:00 2001 From: AbdBarho Date: Sun, 25 Jun 2023 20:21:41 +0200 Subject: [PATCH 2/6] Create dirs if not exist (#520) Closes #519 --- services/AUTOMATIC1111/entrypoint.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/AUTOMATIC1111/entrypoint.sh b/services/AUTOMATIC1111/entrypoint.sh index 985f6f1..5cdaacf 100755 --- a/services/AUTOMATIC1111/entrypoint.sh +++ b/services/AUTOMATIC1111/entrypoint.sh @@ -20,6 +20,8 @@ if [ ! -f /data/config/auto/styles.csv ]; then fi # copy models from original models folder +mkdir -p /data/models/VAE-approx/ /data/models/karlo/ + rsync -a --info=NAME ${ROOT}/models/VAE-approx/ /data/models/VAE-approx/ rsync -a --info=NAME ${ROOT}/models/karlo/ /data/models/karlo/ From 5e28222332a26692090c403787fd239c570189dd Mon Sep 17 00:00:00 2001 From: AbdBarho Date: Sun, 25 Jun 2023 20:33:57 +0200 Subject: [PATCH 3/6] Allow setting port through env WEBUI_PORT (#521) I am actually not happy with this solution, I would prefer if it was possible to customize the ports within `docker-compose.override.yml` --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8caad1d..8d14e57 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -2,7 +2,7 @@ version: '3.9' x-base_service: &base_service ports: - - "7860:7860" + - "${WEBUI_PORT:-7860}:7860" volumes: - &v1 ./data:/data - &v2 ./output:/output From 37a82af4b7de53e3f029b499a8a467bd388cfb0c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=A5=9E=E6=A5=BD=E5=9D=82=C2=B7=E5=96=B5?= Date: Tue, 27 Jun 2023 03:37:37 +0800 Subject: [PATCH 4/6] Add build-essential package (#522) Fix the problem that some extensions need to be installed from src Now, because the step of installing extensions is moved forward in `entrypoint.sh` instead of `startup.sh`, we cannot install some required packages before executing `install.py` When installing the extension `sd-webui-roop`, it relies on `insightface==0.7.3`, and when installing this pypi package, it is found that when building the wheel package, an error will be reported because `gcc` cannot be found https://github.com/s0md3v/sd-webui-roop/blob/ddc02ee1a914ba387fa338f9542ec16d128c56e5/requirements.txt#L1 Therefore, considering that not all pypi packages are distributed in wheel, those pypi packages distributed in src need `build-essential` to build --- services/AUTOMATIC1111/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/services/AUTOMATIC1111/Dockerfile b/services/AUTOMATIC1111/Dockerfile index 6ef8fda..08ee0b6 100644 --- a/services/AUTOMATIC1111/Dockerfile +++ b/services/AUTOMATIC1111/Dockerfile @@ -30,7 +30,7 @@ RUN --mount=type=cache,target=/var/cache/apt \ # we need those apt-get install -y fonts-dejavu-core rsync git jq moreutils aria2 \ # extensions needs those - ffmpeg libglfw3-dev libgles2-mesa-dev pkg-config libcairo2 libcairo2-dev + ffmpeg libglfw3-dev libgles2-mesa-dev pkg-config libcairo2 libcairo2-dev build-essential RUN --mount=type=cache,target=/cache --mount=type=cache,target=/root/.cache/pip \ From 95e96602f93f789166e51909263ddb5e60476633 Mon Sep 17 00:00:00 2001 From: AbdBarho Date: Mon, 26 Jun 2023 21:57:45 +0200 Subject: [PATCH 5/6] Bump auto --- docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yml b/docker-compose.yml index 8d14e57..5795e5b 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,7 @@ services: <<: *base_service profiles: ["auto"] build: ./services/AUTOMATIC1111 - image: sd-auto:60 + image: sd-auto:61 environment: - CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api From 103e11493b80d5f945eb61902a6ba23409abcd39 Mon Sep 17 00:00:00 2001 From: AbdBarho Date: Sun, 2 Jul 2023 08:15:51 +0200 Subject: [PATCH 6/6] Auto 1.4.0 (#507) https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/394ffa7b0a7fff3ec484bcd084e673a8b301ccc8 Maybe bug: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/11040 --- docker-compose.yml | 2 +- services/AUTOMATIC1111/Dockerfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5795e5b..815a9bf 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,7 +29,7 @@ services: <<: *base_service profiles: ["auto"] build: ./services/AUTOMATIC1111 - image: sd-auto:61 + image: sd-auto:62 environment: - CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api diff --git a/services/AUTOMATIC1111/Dockerfile b/services/AUTOMATIC1111/Dockerfile index 08ee0b6..55a049b 100644 --- a/services/AUTOMATIC1111/Dockerfile +++ b/services/AUTOMATIC1111/Dockerfile @@ -71,7 +71,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \ RUN apt-get -y install libgoogle-perftools-dev && apt-get clean ENV LD_PRELOAD=libtcmalloc.so -ARG SHA=20ae71faa8ef035c31aa3a410b707d792c8203a3 +ARG SHA=394ffa7b0a7fff3ec484bcd084e673a8b301ccc8 RUN --mount=type=cache,target=/root/.cache/pip \ cd stable-diffusion-webui && \ git fetch && \