From 4a8fc1dd717223e74235a86fa53cb3923d2401b5 Mon Sep 17 00:00:00 2001 From: PassiveLemon Date: Mon, 17 Apr 2023 16:22:56 -0400 Subject: [PATCH] Revert "Merge + update" This reverts commit 4d05480e640f3e9f3a92ae77e6c8c8e41e6559b4. --- data/.gitignore | 2 - docker-compose.yml | 10 ++-- services/AUTOMATIC1111/Dockerfile | 52 ++++++++++++--------- services/AUTOMATIC1111/clone.sh | 11 ----- services/AUTOMATIC1111/entrypoint.sh | 2 - services/comfy/Dockerfile | 35 +++++++------- services/download/download.sh | 2 +- services/invoke/Dockerfile | 68 ++++++++++++++++------------ services/invoke/entrypoint.sh | 17 ++++--- services/invoke/models.yaml | 23 ++++++++++ services/sygil/Dockerfile | 42 +++++++++-------- 11 files changed, 147 insertions(+), 117 deletions(-) delete mode 100644 services/AUTOMATIC1111/clone.sh create mode 100644 services/invoke/models.yaml diff --git a/data/.gitignore b/data/.gitignore index 5194313..cb0a526 100644 --- a/data/.gitignore +++ b/data/.gitignore @@ -20,5 +20,3 @@ /VAE /embeddings /Lora -/ControlNet -/openpose diff --git a/docker-compose.yml b/docker-compose.yml index 7864f45..1b7a9aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -28,7 +28,7 @@ services: <<: *base_service profiles: ["auto"] build: ./services/AUTOMATIC1111 - image: sd-auto:51 + image: sd-auto:49 environment: - CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api @@ -43,10 +43,10 @@ services: <<: *base_service profiles: ["invoke"] build: ./services/invoke/ - image: sd-invoke:27 + image: sd-invoke:26 environment: - PRELOAD=true - - CLI_ARGS=--no-nsfw_checker --no-safety_checker --xformers + - CLI_ARGS= sygil: &sygil <<: *base_service @@ -67,8 +67,8 @@ services: <<: *base_service profiles: ["comfy"] build: ./services/comfy/ - image: sd-comfy:6 + image: sd-comfy:1 volumes: - *v2 environment: - - CLI_ARGS= \ No newline at end of file + - CLI_ARGS= diff --git a/services/AUTOMATIC1111/Dockerfile b/services/AUTOMATIC1111/Dockerfile index a610d0c..b2d44d8 100644 --- a/services/AUTOMATIC1111/Dockerfile +++ b/services/AUTOMATIC1111/Dockerfile @@ -1,6 +1,14 @@ +# syntax=docker/dockerfile:1 + FROM alpine/git:2.36.2 as download -COPY clone.sh /clone.sh +SHELL ["/bin/sh", "-ceuxo", "pipefail"] + +RUN < /clone.sh +mkdir -p repositories/"$1" && cd repositories/"$1" && git init && git remote add origin "$2" && git fetch origin "$3" --depth=1 && git reset --hard "$3" && rm -rf .git +EOE +EOF RUN . /clone.sh taming-transformers https://github.com/CompVis/taming-transformers.git 24268930bf1dce879235a7fddd0b2355b84d7ea6 \ && rm -rf data assets **/*.ipynb @@ -22,19 +30,21 @@ RUN aria2c -x 5 --dir / --out wheel.whl 'https://github.com/AbdBarho/stable-diff FROM python:3.10.9-slim +SHELL ["/bin/bash", "-ceuxo", "pipefail"] + ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1 -RUN --mount=type=cache,target=/root/.cache/pip \ - pip install torch==1.13.1+cu117 torchvision --extra-index-url https://download.pytorch.org/whl/cu117 +RUN PIP_NO_CACHE_DIR=1 pip install torch==1.13.1+cu117 torchvision --extra-index-url https://download.pytorch.org/whl/cu117 RUN apt-get update && apt install fonts-dejavu-core rsync git jq moreutils -y && apt-get clean -RUN --mount=type=cache,target=/root/.cache/pip \ - git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git && \ - cd stable-diffusion-webui && \ - git reset --hard d7aec59c4eb02f723b3d55c6f927a42e97acd679 && \ - pip install -r requirements_versions.txt +RUN --mount=type=cache,target=/root/.cache/pip <=4.24' # add info COPY . /docker/ -RUN chmod +x /docker/entrypoint.sh +RUN < req.txt +pip install -r req.txt +rm req.txt +EOF + # patch match: # https://github.com/invoke-ai/InvokeAI/blob/main/docs/installation/INSTALL_PATCHMATCH.md -RUN --mount=type=cache,target=/var/cache/apt \ - apt-get update && \ - apt-get install make g++ git libopencv-dev -y && \ - apt-get clean && \ - cd /usr/lib/x86_64-linux-gnu/pkgconfig/ && \ - ln -sf opencv4.pc opencv.pc +RUN <=4.24' # add info COPY . /docker/ -RUN python /docker/info.py /stable-diffusion/frontend/frontend.py && \ - chmod +x /docker/mount.sh /docker/run.sh && \ - # streamlit \ - sed -i -- 's/8501/7860/g' /stable-diffusion/.streamlit/config.toml +RUN <