From 16c7a68b59579a7b36f22dbc2bfce21c95d5a35c Mon Sep 17 00:00:00 2001 From: AbdBarho Date: Mon, 13 Nov 2023 21:49:26 +0100 Subject: [PATCH] Invoke 3.3.0post3 --- docker-compose.yml | 2 +- services/invoke/Dockerfile | 20 +++++++------------- services/invoke/entrypoint.sh | 6 ++++++ 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 93fba1d..0a9d64d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -44,7 +44,7 @@ services: <<: *base_service profiles: ["invoke"] build: ./services/invoke/ - image: sd-invoke:30 + image: sd-invoke:31 environment: - PRELOAD=true - CLI_ARGS=--xformers diff --git a/services/invoke/Dockerfile b/services/invoke/Dockerfile index a4d7d55..1346cc5 100644 --- a/services/invoke/Dockerfile +++ b/services/invoke/Dockerfile @@ -3,6 +3,7 @@ RUN apk add --no-cache aria2 RUN aria2c -x 5 --dir / --out wheel.whl 'https://github.com/AbdBarho/stable-diffusion-webui-docker/releases/download/6.0.0/xformers-0.0.21.dev544-cp310-cp310-manylinux2014_x86_64-pytorch201.whl' +# TODO: next version is going to support pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime FROM pytorch/pytorch:2.0.1-cuda11.7-cudnn8-runtime ENV DEBIAN_FRONTEND=noninteractive PIP_EXISTS_ACTION=w PIP_PREFER_BINARY=1 @@ -17,26 +18,19 @@ RUN --mount=type=cache,target=/var/cache/apt \ ln -sf opencv4.pc opencv.pc +WORKDIR / ENV ROOT=/InvokeAI -RUN git clone https://github.com/invoke-ai/InvokeAI.git ${ROOT} -WORKDIR ${ROOT} +RUN git clone --depth 1 https://github.com/invoke-ai/InvokeAI.git ${ROOT} +WORKDIR ${ROOT} RUN --mount=type=cache,target=/root/.cache/pip \ + # dont fetch entire repo, it is HUGE! + git fetch origin dedead672f2e9f995b6b96d7ada37456dab15b55 --depth=1 && \ git reset --hard dedead672f2e9f995b6b96d7ada37456dab15b55 && \ pip install -e . - -ARG BRANCH=main SHA=dedead672f2e9f995b6b96d7ada37456dab15b55 RUN --mount=type=cache,target=/root/.cache/pip \ - git fetch && \ - git reset --hard && \ - git checkout ${BRANCH} && \ - git reset --hard ${SHA} && \ - pip install -U -e . - -RUN --mount=type=cache,target=/root/.cache/pip \ - --mount=type=bind,from=xformers,source=/wheel.whl,target=/xformers-0.0.21-cp310-cp310-linux_x86_64.whl \ - pip install -U opencv-python-headless triton /xformers-0.0.21-cp310-cp310-linux_x86_64.whl && \ + pip install -U opencv-python-headless xformers==0.0.22 && \ python3 -c "from patchmatch import patch_match" diff --git a/services/invoke/entrypoint.sh b/services/invoke/entrypoint.sh index 348bb2b..8902243 100755 --- a/services/invoke/entrypoint.sh +++ b/services/invoke/entrypoint.sh @@ -43,3 +43,9 @@ if "${PRELOAD}" == "true"; then fi exec "$@" + +# TODO: We still need to adapt our code to the new structure, it seems that our current folder structure is not +# supported anymore by invoke, they have their own nested folder hierarchy with different models and different kinds +# separate v1 and v2, upscalers, etc... +# it is likely the case the we would need to have a separate folder for invoke stuff, merging it with our `data` might +# be uselessly complicated.