Commit 22129d12 authored by nanahira's avatar nanahira

sync and update build file

parent ea2cc26f
Pipeline #20519 failed with stages
in 96 minutes and 31 seconds
...@@ -31,17 +31,22 @@ build-base: ...@@ -31,17 +31,22 @@ build-base:
build-xformers-7.5: build-xformers-7.5:
extends: .build-xformers extends: .build-xformers
variables: variables:
GRAPHIC_VERSION: '7.5' GRAPHIC_VERSION: '7.5' # Quadro or 20xx
build-xformers-8.6: build-xformers-8.6:
extends: .build-xformers extends: .build-xformers
variables: variables:
GRAPHIC_VERSION: '8.6' GRAPHIC_VERSION: '8.6' # 30xx or A4000 A5000
build-xformers-8.9:
extends: .build-xformers
variables:
GRAPHIC_VERSION: '8.9' # 40xx
build-xformers-6.1: build-xformers-6.1:
extends: .build-xformers extends: .build-xformers
variables: variables:
GRAPHIC_VERSION: '6.1' GRAPHIC_VERSION: '6.1' # 10xx
.deploy: .deploy:
stage: deploy stage: deploy
...@@ -80,6 +85,11 @@ deploy-xformers-8.6: ...@@ -80,6 +85,11 @@ deploy-xformers-8.6:
variables: variables:
GRAPHIC_VERSION: '8.6' GRAPHIC_VERSION: '8.6'
deploy-xformers-8.9:
extends: .deploy-xformers
variables:
GRAPHIC_VERSION: '8.9'
deploy-xformers-6.1: deploy-xformers-6.1:
extends: .deploy-xformers extends: .deploy-xformers
variables: variables:
......
FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04 FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04 as base
RUN apt update \ RUN apt update \
&& apt-key adv --fetch-keys \ && apt-key adv --fetch-keys \
&& apt install --no-install-recommends -y build-essential wget git curl unzip python3 python3-pip python3-dev libgl1 libglib2.0-0 \ && apt install --no-install-recommends -y build-essential wget git curl unzip python3 python3-pip python3-dev libgl1 libglib2.0-0 jq \
&& apt clean && rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/* /var/log/* && apt clean && rm -rf /var/lib/apt/lists/* /var/tmp/* /tmp/* /var/log/*
RUN useradd -ms /bin/bash sd RUN useradd -ms /bin/bash sd
USER sd USER sd
RUN pip install --no-cache-dir torch==1.12.1+cu113 torchvision==0.13.1+cu113 --extra-index-url https://download.pytorch.org/whl/cu113 RUN pip install --no-cache-dir torch==1.13.1+cu117 torchvision==0.14.1+cu117 --extra-index-url https://download.pytorch.org/whl/cu117
RUN mkdir /home/sd/stable-diffusion-webui RUN mkdir /home/sd/stable-diffusion-webui
WORKDIR /home/sd/stable-diffusion-webui WORKDIR /home/sd/stable-diffusion-webui
RUN mkdir repositories && \ RUN mkdir repositories && \
git clone https://github.com/CompVis/stable-diffusion.git repositories/stable-diffusion && \ git clone --depth=1 https://github.com/Stability-AI/stablediffusion.git repositories/stable-diffusion-stability-ai && \
cd repositories/stable-diffusion && git checkout 69ae4b35e0a0f6ee1af8bb9a5d0016ccb27e36dc && \ cd repositories/stable-diffusion-stability-ai && git fetch origin 47b6b607fdd31875c9279cd2f4f16b92e4ea958e && git checkout 47b6b607fdd31875c9279cd2f4f16b92e4ea958e && \
python3 setup.py install --user && \ python3 setup.py install --user && \
cd ../.. && \ cd ../.. && \
git clone https://github.com/CompVis/taming-transformers.git repositories/taming-transformers && \ git clone --depth=1 https://github.com/CompVis/taming-transformers.git repositories/taming-transformers && \
cd repositories/taming-transformers && git checkout 24268930bf1dce879235a7fddd0b2355b84d7ea6 && \ cd repositories/taming-transformers && git fetch origin 24268930bf1dce879235a7fddd0b2355b84d7ea6 && git checkout 24268930bf1dce879235a7fddd0b2355b84d7ea6 && \
cd ../.. && \ cd ../.. && \
git clone https://github.com/sczhou/CodeFormer.git repositories/CodeFormer && \ git clone --depth=1 https://github.com/sczhou/CodeFormer.git repositories/CodeFormer && \
cd repositories/CodeFormer && git checkout c5b4593074ba6214284d6acd5f1719b6c5d739af && \ cd repositories/CodeFormer && git fetch origin c5b4593074ba6214284d6acd5f1719b6c5d739af && git checkout c5b4593074ba6214284d6acd5f1719b6c5d739af && \
cd ../.. && \ cd ../.. && \
git clone https://github.com/salesforce/BLIP.git repositories/BLIP && \ git clone --depth=1 https://github.com/salesforce/BLIP.git repositories/BLIP && \
cd repositories/BLIP && git checkout 48211a1594f1321b00f14c9f7a5b4813144b2fb9 && \ cd repositories/BLIP && git fetch origin 48211a1594f1321b00f14c9f7a5b4813144b2fb9 && git checkout 48211a1594f1321b00f14c9f7a5b4813144b2fb9 && \
cd ../.. && \ cd ../.. && \
git clone https://github.com/crowsonkb/k-diffusion.git repositories/k-diffusion && \ git clone --depth=1 https://github.com/crowsonkb/k-diffusion.git repositories/k-diffusion && \
cd repositories/k-diffusion && git checkout f4e99857772fc3a126ba886aadf795a332774878 && \ cd repositories/k-diffusion && git fetch origin 5b3af030dd83e0297272d861c19477735d0317ec && git checkout 5b3af030dd83e0297272d861c19477735d0317ec && \
cd ../.. && \ cd ../.. && \
git clone https://github.com/Hafiidz/latent-diffusion repositories/latent-diffusion && \ git clone --depth=1 https://github.com/Hafiidz/latent-diffusion repositories/latent-diffusion && \
pip install -r repositories/latent-diffusion/requirements.txt --prefer-binary && \ pip install -r repositories/latent-diffusion/requirements.txt --prefer-binary && \
# update numpy to latest version # update numpy to latest version
...@@ -55,32 +55,31 @@ RUN mkdir repositories && \ ...@@ -55,32 +55,31 @@ RUN mkdir repositories && \
# install CLIP # install CLIP
git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1 \ git+https://github.com/openai/CLIP.git@d50d76daa670286dd6cacf3bcd80b5e4823fc8e1 \
# install open_clip
git+https://github.com/mlfoundations/open_clip.git@bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b \
# install xformers # install xformers
# git+https://github.com/facebookresearch/xformers.git@v0.0.13#egg=xformers \ # git+https://github.com/facebookresearch/xformers.git@v0.0.13#egg=xformers \
# install deepdanbooru # install deepdanbooru
git+https://github.com/KichangKim/DeepDanbooru.git@d91a2963bf87c6a770d74894667e9ffa9f6de7ff#egg=deepdanbooru[tensorflow] tensorflow==2.10.0 tensorflow-io==0.27.0 \ git+https://github.com/KichangKim/DeepDanbooru.git@05eb3c39b0fae43e3caf39df801615fe79b27c2f#egg=deepdanbooru[tensorflow] tensorflow tensorflow-io \
# end install requirements # end install requirements
--prefer-binary && \ --prefer-binary && \
# (optional) install requirements for CodeFormer (face restoration) # (optional) install requirements for CodeFormer (face restoration)
pip install -r repositories/CodeFormer/requirements.txt --prefer-binary pip install --no-cache-dir -r repositories/CodeFormer/requirements.txt --prefer-binary
# Plugins
#RUN mkdir extensions && cd extensions && \
# curl -sL 'https://raw.githubusercontent.com/wiki/AUTOMATIC1111/stable-diffusion-webui/Extensions-index.md' | \
# jq -r '.extensions[].url' | \
# xargs -I '{}' -P 10 git clone --depth=1 '{}'
COPY --chown=sd ./requirements.txt ./requirements.txt COPY --chown=sd ./requirements.txt ./requirements.txt
RUN pip install --no-cache-dir -r requirements.txt --prefer-binary RUN pip install --no-cache-dir -r requirements.txt --prefer-binary
COPY --chown=sd . ./ COPY --chown=sd . ./
# Plugins
RUN git clone --depth=1 https://github.com/AUTOMATIC1111/stable-diffusion-webui-aesthetic-gradients extensions/aesthetic-gradients && \
git clone --depth=1 https://github.com/yfszzx/stable-diffusion-webui-images-browser extensions/images-browser && \
git clone --depth=1 https://github.com/AUTOMATIC1111/stable-diffusion-webui-wildcards extensions/wildcards && \
git clone --depth=1 https://github.com/adieyal/sd-dynamic-prompts extensions/dynamic-prompts && \
git clone --depth=1 https://github.com/yfszzx/stable-diffusion-webui-inspiration extensions/inspiration && \
git clone --depth=1 https://github.com/deforum-art/deforum-for-automatic1111-webui extensions/deforum && \
git clone --depth=1 https://github.com/camenduru/stable-diffusion-webui-artists-to-study extensions/artists-to-study && \
git clone --depth=1 https://github.com/tsngo/stable-diffusion-webui-aesthetic-image-scorer extensions/aesthetic-image-scorer && \
git clone --depth=1 https://github.com/toshiaki1729/stable-diffusion-webui-dataset-tag-editor extensions/dataset-tag-editor
ENTRYPOINT ["python3", "webui.py"] ENTRYPOINT ["python3", "webui.py"]
CMD ["--listen", "--port", "8080"] CMD ["--listen", "--port", "8080"]
...@@ -30,3 +30,4 @@ GitPython ...@@ -30,3 +30,4 @@ GitPython
torchsde torchsde
safetensors safetensors
psutil psutil
fastapi==0.90.1
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment