parent
13dfd4eba5
commit
c9153faff7
@ -27,7 +27,7 @@ services:
|
|||||||
<<: *base_service
|
<<: *base_service
|
||||||
profiles: ["auto"]
|
profiles: ["auto"]
|
||||||
build: ./services/AUTOMATIC1111
|
build: ./services/AUTOMATIC1111
|
||||||
image: sd-auto:33
|
image: sd-auto:34
|
||||||
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 +42,7 @@ services:
|
|||||||
<<: *base_service
|
<<: *base_service
|
||||||
profiles: ["invoke"]
|
profiles: ["invoke"]
|
||||||
build: ./services/invoke/
|
build: ./services/invoke/
|
||||||
image: sd-invoke:17
|
image: sd-invoke:18
|
||||||
environment:
|
environment:
|
||||||
- PRELOAD=true
|
- PRELOAD=true
|
||||||
- CLI_ARGS=
|
- CLI_ARGS=
|
||||||
|
@ -59,16 +59,15 @@ 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 \
|
pip install opencv-python-headless pyngrok accelerate \
|
||||||
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
|
||||||
pyngrok
|
|
||||||
|
|
||||||
# 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=d97f467c0d27695d23edad5e4f8898a57e0ccb00
|
ARG SHA=6faae2323963f9b0e0086a85b9d0472a24fbaa73
|
||||||
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 +86,7 @@ mv ${ROOT}/style.css ${ROOT}/user.css
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
WORKDIR ${ROOT}
|
WORKDIR ${ROOT}
|
||||||
ENV CLI_ARGS=""
|
ENV CLI_ARGS="" PYTHONUNBUFFERED=1
|
||||||
EXPOSE 7860
|
EXPOSE 7860
|
||||||
ENTRYPOINT ["/docker/entrypoint.sh"]
|
ENTRYPOINT ["/docker/entrypoint.sh"]
|
||||||
CMD python3 -u webui.py --listen --port 7860 ${CLI_ARGS}
|
CMD accelerate launch --num_cpu_threads_per_process=`nproc` webui.py --listen --port 7860 ${CLI_ARGS}
|
||||||
|
@ -1,13 +1,18 @@
|
|||||||
# syntax=docker/dockerfile:1
|
# syntax=docker/dockerfile:1
|
||||||
|
|
||||||
|
FROM alpine:3.17 as xformers
|
||||||
|
RUN apk add --no-cache aria2
|
||||||
|
RUN aria2c -x 5 --dir / --out wheel.whl 'https://github.com/AbdBarho/stable-diffusion-webui-docker/releases/download/4.1.0/xformers-0.0.16.dev421-cp310-cp310-manylinux2014_x86_64.whl'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
FROM python:3.10-slim
|
FROM python:3.10-slim
|
||||||
SHELL ["/bin/bash", "-ceuxo", "pipefail"]
|
SHELL ["/bin/bash", "-ceuxo", "pipefail"]
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive PIP_EXISTS_ACTION=w PIP_PREFER_BINARY=1
|
ENV DEBIAN_FRONTEND=noninteractive PIP_EXISTS_ACTION=w PIP_PREFER_BINARY=1
|
||||||
|
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/pip \
|
RUN pip install torch==1.13.1+cu117 torchvision --extra-index-url https://download.pytorch.org/whl/cu117
|
||||||
pip install torch==1.12.0+cu116 --extra-index-url https://download.pytorch.org/whl/cu116
|
|
||||||
|
|
||||||
RUN apt-get update && apt-get install git -y && apt-get clean
|
RUN apt-get update && apt-get install git -y && apt-get clean
|
||||||
|
|
||||||
@ -16,9 +21,11 @@ RUN git clone https://github.com/invoke-ai/InvokeAI.git /stable-diffusion
|
|||||||
WORKDIR /stable-diffusion
|
WORKDIR /stable-diffusion
|
||||||
|
|
||||||
RUN --mount=type=cache,target=/root/.cache/pip <<EOF
|
RUN --mount=type=cache,target=/root/.cache/pip <<EOF
|
||||||
git reset --hard 5c31feb3a1096d437c94b6e1c3224eb7a7224a85
|
git reset --hard f232068ab89bd80e4f5f3133dcdb62ea78f1d0f7
|
||||||
git config --global http.postBuffer 1048576000
|
git config --global http.postBuffer 1048576000
|
||||||
pip install -r binary_installer/py3.10-linux-x86_64-cuda-reqs.txt
|
egrep -v '^-e .' environments-and-requirements/requirements-lin-cuda.txt > req.txt
|
||||||
|
pip install -r req.txt
|
||||||
|
rm req.txt
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
|
||||||
@ -33,17 +40,25 @@ cd /usr/lib/x86_64-linux-gnu/pkgconfig/
|
|||||||
ln -sf opencv4.pc opencv.pc
|
ln -sf opencv4.pc opencv.pc
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
ARG BRANCH=main SHA=26e413ae9cf8dc04c617ca451a91a1624bfdf0c0
|
|
||||||
|
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=f232068ab89bd80e4f5f3133dcdb62ea78f1d0f7
|
||||||
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
|
||||||
git checkout ${BRANCH}
|
git checkout ${BRANCH}
|
||||||
git reset --hard ${SHA}
|
git reset --hard ${SHA}
|
||||||
pip install -r binary_installer/py3.10-linux-x86_64-cuda-reqs.txt
|
egrep -v '^-e .' environments-and-requirements/requirements-lin-cuda.txt > req.txt
|
||||||
|
pip install -r 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 && \
|
pip install -U --force-reinstall opencv-python-headless huggingface_hub transformers>=4.24 && \
|
||||||
python3 -c "from patchmatch import patch_match"
|
python3 -c "from patchmatch import patch_match"
|
||||||
|
|
||||||
|
|
||||||
@ -51,7 +66,7 @@ RUN touch invokeai.init
|
|||||||
COPY . /docker/
|
COPY . /docker/
|
||||||
|
|
||||||
|
|
||||||
ENV ROOT=/stable-diffusion PYTHONPATH="${PYTHONPATH}:${ROOT}" PRELOAD=false CLI_ARGS=""
|
ENV ROOT=/stable-diffusion PYTHONPATH="${PYTHONPATH}:${ROOT}" PRELOAD=false CLI_ARGS="" HF_HOME=/root/.cache/huggingface
|
||||||
EXPOSE 7860
|
EXPOSE 7860
|
||||||
|
|
||||||
ENTRYPOINT ["/docker/entrypoint.sh"]
|
ENTRYPOINT ["/docker/entrypoint.sh"]
|
||||||
|
Loading…
Reference in New Issue
Block a user