From 84372231313baff7d6dcfa23f85b9a4ff960a8e6 Mon Sep 17 00:00:00 2001 From: Imaginator Date: Mon, 17 Oct 2022 20:51:43 -0400 Subject: [PATCH] Reordered, moved optional install to script. --- docker-compose.yml | 10 --------- services/AUTOMATIC1111/Dockerfile | 21 ++++++------------- .../AUTOMATIC1111/optional-deepdanbooru.sh | 5 +++++ 3 files changed, 11 insertions(+), 25 deletions(-) create mode 100644 services/AUTOMATIC1111/optional-deepdanbooru.sh diff --git a/docker-compose.yml b/docker-compose.yml index e99080d..ec5c4b1 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,16 +38,6 @@ services: environment: - CLI_ARGS=--allow-code --medvram --xformers - auto-deepdanbooru: - <<: *automatic - profiles: ["auto-deepdanbooru"] - build: - context: ./services/AUTOMATIC1111 - args: - - DEEPDANBOORU=1 - environment: - - CLI_ARGS=--allow-code --medvram --xformers --deepdanbooru - auto-cpu: <<: *automatic profiles: ["auto-cpu"] diff --git a/services/AUTOMATIC1111/Dockerfile b/services/AUTOMATIC1111/Dockerfile index 421dcc9..19589a9 100644 --- a/services/AUTOMATIC1111/Dockerfile +++ b/services/AUTOMATIC1111/Dockerfile @@ -53,6 +53,11 @@ RUN pip install --prefer-binary --no-cache-dir -r ${ROOT}/repositories/CodeForme # TODO: move to top RUN apt-get install jq moreutils -y +COPY . /docker +RUN chmod +x /docker/*.sh + +ARG DEEPDANBOORU="0" +RUN [[ ${DEEPDANBOORU:-"0"} == "0" ]] && : || /docker/optional-deepdanbooru.sh # Note: don't update the sha of previous versions because the install will take forever # instead, update the repo state in a later step @@ -73,21 +78,7 @@ RUN pip install --prefer-binary --no-cache-dir opencv-python-headless \ COPY --from=xformers /wheel.whl xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl RUN pip install xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl -ARG DEEPDANBOORU=0 -RUN <