mirror of
https://github.com/AbdBarho/stable-diffusion-webui-docker.git
synced 2026-02-13 11:04:22 +01:00
auto
This commit is contained in:
parent
fb5407a6bc
commit
5effe5f0c8
|
|
@ -36,7 +36,7 @@ services:
|
||||||
<<: *base_service
|
<<: *base_service
|
||||||
profiles: ["auto"]
|
profiles: ["auto"]
|
||||||
build: ./services/AUTOMATIC1111
|
build: ./services/AUTOMATIC1111
|
||||||
image: sd-auto:4
|
image: sd-auto:5
|
||||||
environment:
|
environment:
|
||||||
- CLI_ARGS=--allow-code --medvram --xformers
|
- CLI_ARGS=--allow-code --medvram --xformers
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -36,35 +36,36 @@ ENV DEBIAN_FRONTEND=noninteractive PIP_PREFER_BINARY=1 PIP_NO_CACHE_DIR=1
|
||||||
|
|
||||||
RUN pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
|
RUN pip install torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113
|
||||||
|
|
||||||
RUN apt-get update && apt install fonts-dejavu-core rsync git -y && apt-get clean
|
RUN apt-get update && apt install fonts-dejavu-core rsync git jq moreutils -y && apt-get clean
|
||||||
|
|
||||||
|
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
|
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
|
||||||
cd stable-diffusion-webui
|
cd stable-diffusion-webui
|
||||||
git reset --hard 1eb588cbf19924333b88beaa1ac0041904966640
|
git reset --hard d885a4a57b72152745ca76192ef1bdda29e6461d
|
||||||
pip install -r requirements_versions.txt
|
pip install -r requirements_versions.txt
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
ENV ROOT=/stable-diffusion-webui \
|
|
||||||
WORKDIR=/stable-diffusion-webui/repositories/stable-diffusion
|
COPY --from=xformers /wheel.whl xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl
|
||||||
|
RUN pip install xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl && rm xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl
|
||||||
|
|
||||||
|
|
||||||
|
ENV ROOT=/stable-diffusion-webui
|
||||||
|
|
||||||
|
|
||||||
COPY --from=download /git/ ${ROOT}
|
COPY --from=download /git/ ${ROOT}
|
||||||
RUN mkdir ${ROOT}/interrogate && cp ${ROOT}/repositories/clip-interrogator/data/* ${ROOT}/interrogate
|
RUN mkdir ${ROOT}/interrogate && cp ${ROOT}/repositories/clip-interrogator/data/* ${ROOT}/interrogate
|
||||||
RUN pip install --prefer-binary --no-cache-dir -r ${ROOT}/repositories/CodeFormer/requirements.txt
|
RUN pip install --prefer-binary --no-cache-dir -r ${ROOT}/repositories/CodeFormer/requirements.txt
|
||||||
|
|
||||||
# TODO: move to top
|
|
||||||
RUN apt-get install jq moreutils -y
|
|
||||||
|
|
||||||
|
|
||||||
# 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=737eb28faca8be2bb996ee0930ec77d1f7ebd939
|
ARG SHA=35c45df28b303a05d56a13cb56d4046f08cf8c25
|
||||||
RUN <<EOF
|
RUN <<EOF
|
||||||
cd stable-diffusion-webui
|
cd stable-diffusion-webui
|
||||||
git pull --rebase
|
git fetch
|
||||||
git reset --hard ${SHA}
|
git reset --hard ${SHA}
|
||||||
pip install -r requirements_versions.txt
|
pip install -r requirements_versions.txt
|
||||||
EOF
|
EOF
|
||||||
|
|
@ -76,17 +77,13 @@ RUN pip install opencv-python-headless \
|
||||||
gradio==3.4.1
|
gradio==3.4.1
|
||||||
# gradio because #173 & https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/2858
|
# gradio because #173 & https://github.com/AUTOMATIC1111/stable-diffusion-webui/issues/2858
|
||||||
|
|
||||||
COPY --from=xformers /wheel.whl xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl
|
|
||||||
RUN pip install xformers-0.0.14.dev0-cp310-cp310-linux_x86_64.whl
|
|
||||||
|
|
||||||
COPY . /docker
|
COPY . /docker
|
||||||
|
|
||||||
RUN <<EOF
|
RUN chmod +x /docker/mount.sh && python3 /docker/info.py ${ROOT}/modules/ui.py
|
||||||
chmod +x /docker/mount.sh && python3 /docker/info.py ${ROOT}/modules/ui.py
|
|
||||||
EOF
|
|
||||||
|
|
||||||
|
WORKDIR ${ROOT}/repositories/stable-diffusion
|
||||||
ENV CLI_ARGS=""
|
ENV CLI_ARGS=""
|
||||||
WORKDIR ${WORKDIR}
|
|
||||||
EXPOSE 7860
|
EXPOSE 7860
|
||||||
# run, -u to not buffer stdout / stderr
|
# run, -u to not buffer stdout / stderr
|
||||||
CMD /docker/mount.sh && \
|
CMD /docker/mount.sh && \
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue