Update versions (#320)

- auto:
226d840e84
- invoke:
80c5322ccc


Remove `accelerate` for startup. Refs #317 

Use `SIGINT` Fixes #319
This commit is contained in:
AbdBarho
2023-02-02 19:53:48 +01:00
committed by GitHub
parent 15e9841860
commit 3c860d6eaa
3 changed files with 11 additions and 13 deletions

View File

@@ -6,6 +6,7 @@ x-base_service: &base_service
volumes: volumes:
- &v1 ./data:/data - &v1 ./data:/data
- &v2 ./output:/output - &v2 ./output:/output
stop_signal: SIGINT
deploy: deploy:
resources: resources:
reservations: reservations:
@@ -27,7 +28,7 @@ services:
<<: *base_service <<: *base_service
profiles: ["auto"] profiles: ["auto"]
build: ./services/AUTOMATIC1111 build: ./services/AUTOMATIC1111
image: sd-auto:41 image: sd-auto:42
environment: environment:
- CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api - CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api
@@ -42,7 +43,7 @@ services:
<<: *base_service <<: *base_service
profiles: ["invoke"] profiles: ["invoke"]
build: ./services/invoke/ build: ./services/invoke/
image: sd-invoke:21 image: sd-invoke:22
environment: environment:
- PRELOAD=true - PRELOAD=true
- CLI_ARGS= - CLI_ARGS=

View File

@@ -59,7 +59,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
pip install -r ${ROOT}/repositories/CodeFormer/requirements.txt pip install -r ${ROOT}/repositories/CodeFormer/requirements.txt
RUN --mount=type=cache,target=/root/.cache/pip \ RUN --mount=type=cache,target=/root/.cache/pip \
pip install opencv-python-headless pyngrok accelerate \ pip install pyngrok \
git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 \ git+https://github.com/TencentARC/GFPGAN.git@8d2447a2d918f8eba5a4a01463fd48e45126a379 \
git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1 \ git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1 \
git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b
@@ -67,7 +67,7 @@ RUN --mount=type=cache,target=/root/.cache/pip \
# Note: don't update the sha of previous versions because the install will take forever # Note: don't update the sha of previous versions because the install will take forever
# instead, update the repo state in a later step # instead, update the repo state in a later step
ARG SHA=00dab8f10defbbda579a1bc89c8d4e972c58a20d ARG SHA=226d840e84c5f306350b0681945989b86760e616
RUN --mount=type=cache,target=/root/.cache/pip <<EOF RUN --mount=type=cache,target=/root/.cache/pip <<EOF
cd stable-diffusion-webui cd stable-diffusion-webui
git fetch git fetch
@@ -87,7 +87,7 @@ sed -i 's/in_app_dir = .*/in_app_dir = True/g' /usr/local/lib/python3.10/site-pa
EOF EOF
WORKDIR ${ROOT} WORKDIR ${ROOT}
ENV CLI_ARGS="" PYTHONUNBUFFERED=1 ENV CLI_ARGS=""
EXPOSE 7860 EXPOSE 7860
ENTRYPOINT ["/docker/entrypoint.sh"] ENTRYPOINT ["/docker/entrypoint.sh"]
CMD accelerate launch --num_cpu_threads_per_process=`nproc` webui.py --listen --port 7860 ${CLI_ARGS} CMD python -u webui.py --listen --port 7860 ${CLI_ARGS}

View File

@@ -41,12 +41,7 @@ ln -sf opencv4.pc opencv.pc
EOF EOF
RUN --mount=type=cache,target=/root/.cache/pip \ ARG BRANCH=main SHA=80c5322cccc6f9c6f77aaea80b4bb95e25bc05ba
--mount=type=bind,from=xformers,source=/wheel.whl,target=/xformers-0.0.15-cp310-cp310-linux_x86_64.whl \
pip install triton /xformers-0.0.15-cp310-cp310-linux_x86_64.whl
ARG BRANCH=main SHA=07e03b31b7610a27d709b366a491e57085d9b393
RUN --mount=type=cache,target=/root/.cache/pip <<EOF RUN --mount=type=cache,target=/root/.cache/pip <<EOF
git fetch git fetch
git reset --hard git reset --hard
@@ -57,8 +52,10 @@ pip install -r req.txt
rm req.txt rm req.txt
EOF EOF
RUN --mount=type=cache,target=/root/.cache/pip \ RUN --mount=type=cache,target=/root/.cache/pip \
pip install -U --force-reinstall opencv-python-headless huggingface_hub && \ --mount=type=bind,from=xformers,source=/wheel.whl,target=/xformers-0.0.15-cp310-cp310-linux_x86_64.whl \
pip install -U opencv-python-headless huggingface_hub triton /xformers-0.0.15-cp310-cp310-linux_x86_64.whl && \
python3 -c "from patchmatch import patch_match" python3 -c "from patchmatch import patch_match"