Skip to content

Commit

Permalink
Update versions (AbdBarho#320)
Browse files Browse the repository at this point in the history
- auto:
AUTOMATIC1111/stable-diffusion-webui@226d840
- invoke:
invoke-ai/InvokeAI@80c5322


Remove `accelerate` for startup. Refs AbdBarho#317 

Use `SIGINT` Fixes AbdBarho#319
  • Loading branch information
AbdBarho committed Feb 2, 2023
1 parent 15e9841 commit 3c860d6
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 13 deletions.
5 changes: 3 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ x-base_service: &base_service
volumes:
- &v1 ./data:/data
- &v2 ./output:/output
stop_signal: SIGINT
deploy:
resources:
reservations:
Expand All @@ -27,7 +28,7 @@ services:
<<: *base_service
profiles: ["auto"]
build: ./services/AUTOMATIC1111
image: sd-auto:41
image: sd-auto:42
environment:
- CLI_ARGS=--allow-code --medvram --xformers --enable-insecure-extension-access --api

Expand All @@ -42,7 +43,7 @@ services:
<<: *base_service
profiles: ["invoke"]
build: ./services/invoke/
image: sd-invoke:21
image: sd-invoke:22
environment:
- PRELOAD=true
- CLI_ARGS=
Expand Down
8 changes: 4 additions & 4 deletions services/AUTOMATIC1111/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,15 @@ RUN --mount=type=cache,target=/root/.cache/pip \
pip install -r ${ROOT}/repositories/CodeFormer/requirements.txt

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/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1 \
git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b

# Note: don't update the sha of previous versions because the install will take forever
# instead, update the repo state in a later step

ARG SHA=00dab8f10defbbda579a1bc89c8d4e972c58a20d
ARG SHA=226d840e84c5f306350b0681945989b86760e616
RUN --mount=type=cache,target=/root/.cache/pip <<EOF
cd stable-diffusion-webui
git fetch
Expand All @@ -87,7 +87,7 @@ sed -i 's/in_app_dir = .*/in_app_dir = True/g' /usr/local/lib/python3.10/site-pa
EOF

WORKDIR ${ROOT}
ENV CLI_ARGS="" PYTHONUNBUFFERED=1
ENV CLI_ARGS=""
EXPOSE 7860
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}
11 changes: 4 additions & 7 deletions services/invoke/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,7 @@ ln -sf opencv4.pc opencv.pc
EOF


RUN --mount=type=cache,target=/root/.cache/pip \
--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
ARG BRANCH=main SHA=80c5322cccc6f9c6f77aaea80b4bb95e25bc05ba
RUN --mount=type=cache,target=/root/.cache/pip <<EOF
git fetch
git reset --hard
Expand All @@ -57,8 +52,10 @@ pip install -r req.txt
rm req.txt
EOF


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"


Expand Down

0 comments on commit 3c860d6

Please sign in to comment.