Update Dockerfile
Browse files- Dockerfile +18 -12
Dockerfile
CHANGED
@@ -1,4 +1,4 @@
|
|
1 |
-
# Dockerfile
|
2 |
|
3 |
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.7.1/ubuntu2204/devel/cudnn8/Dockerfile
|
4 |
FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04
|
@@ -7,28 +7,34 @@ ENV DEBIAN_FRONTEND noninteractive
|
|
7 |
WORKDIR /content
|
8 |
|
9 |
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 && pip3 install --upgrade pip
|
10 |
-
RUN pip install https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.16/xformers-0.0.16+814314d.
|
11 |
RUN pip install --pre triton
|
12 |
RUN pip install numexpr
|
13 |
|
14 |
-
RUN git clone https://github.com/camenduru/stable-diffusion-webui
|
|
|
15 |
RUN sed -i -e 's/ start()/ #start()/g' /content/stable-diffusion-webui/launch.py
|
16 |
RUN cd stable-diffusion-webui && python launch.py --skip-torch-cuda-test
|
17 |
|
18 |
-
# ----------------------------Delete this block if you don't want to see the extra header----------------------------
|
19 |
ADD https://github.com/camenduru/webui-docker/raw/main/env_patch.py /content/env_patch.py
|
20 |
RUN sed -i -e '/import image_from_url_text/r /content/env_patch.py' /content/stable-diffusion-webui/modules/ui.py
|
21 |
ADD https://github.com/camenduru/webui-docker/raw/main/header_patch.py /content/header_patch.py
|
22 |
RUN sed -i -e '/demo:/r /content/header_patch.py' /content/stable-diffusion-webui/modules/ui.py
|
23 |
-
# -------------------------------------------------------------------------------------------------------------------
|
24 |
|
25 |
-
|
26 |
-
RUN
|
27 |
-
RUN
|
28 |
-
RUN
|
|
|
|
|
|
|
|
|
|
|
29 |
|
30 |
-
|
31 |
-
|
|
|
|
|
32 |
|
33 |
ADD https://huggingface.co/andite/anything-v4.0/resolve/main/anything-v4.5-pruned.ckpt /content/stable-diffusion-webui/models/Stable-diffusion/anything-v4.5-pruned.ckpt
|
34 |
ADD https://huggingface.co/andite/anything-v4.0/resolve/main/anything-v4.0.vae.pt /content/stable-diffusion-webui/models/Stable-diffusion/anything-v4.5-pruned.vae.pt
|
@@ -40,4 +46,4 @@ USER user
|
|
40 |
|
41 |
EXPOSE 7860
|
42 |
|
43 |
-
CMD cd /content/stable-diffusion-webui && python webui.py --
|
|
|
1 |
+
# Dockerfile Public A10G
|
2 |
|
3 |
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.7.1/ubuntu2204/devel/cudnn8/Dockerfile
|
4 |
FROM nvidia/cuda:11.7.1-cudnn8-devel-ubuntu22.04
|
|
|
7 |
WORKDIR /content
|
8 |
|
9 |
RUN apt-get update -y && apt-get upgrade -y && apt-get install -y libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 && pip3 install --upgrade pip
|
10 |
+
RUN pip install https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.16/xformers-0.0.16+814314d.d20230119.A10G-cp310-cp310-linux_x86_64.whl
|
11 |
RUN pip install --pre triton
|
12 |
RUN pip install numexpr
|
13 |
|
14 |
+
RUN git clone -b v1.6 https://github.com/camenduru/stable-diffusion-webui
|
15 |
+
RUN sed -i -e '''/prepare_environment()/a\ os.system\(f\"""sed -i -e ''\"s/dict()))/dict())).cuda()/g\"'' /content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py""")''' /content/stable-diffusion-webui/launch.py
|
16 |
RUN sed -i -e 's/ start()/ #start()/g' /content/stable-diffusion-webui/launch.py
|
17 |
RUN cd stable-diffusion-webui && python launch.py --skip-torch-cuda-test
|
18 |
|
|
|
19 |
ADD https://github.com/camenduru/webui-docker/raw/main/env_patch.py /content/env_patch.py
|
20 |
RUN sed -i -e '/import image_from_url_text/r /content/env_patch.py' /content/stable-diffusion-webui/modules/ui.py
|
21 |
ADD https://github.com/camenduru/webui-docker/raw/main/header_patch.py /content/header_patch.py
|
22 |
RUN sed -i -e '/demo:/r /content/header_patch.py' /content/stable-diffusion-webui/modules/ui.py
|
|
|
23 |
|
24 |
+
RUN sed -i -e '/(modelmerger_interface, \"Checkpoint Merger\", \"modelmerger\"),/d' /content/stable-diffusion-webui/modules/ui.py
|
25 |
+
RUN sed -i -e '/(train_interface, \"Train\", \"ti\"),/d' /content/stable-diffusion-webui/modules/ui.py
|
26 |
+
RUN sed -i -e '/extensions_interface, \"Extensions\", \"extensions\"/d' /content/stable-diffusion-webui/modules/ui.py
|
27 |
+
RUN sed -i -e '/settings_interface, \"Settings\", \"settings\"/d' /content/stable-diffusion-webui/modules/ui.py
|
28 |
+
RUN sed -i -e "s/document.getElementsByTagName('gradio-app')\[0\].shadowRoot/!!document.getElementsByTagName('gradio-app')[0].shadowRoot ? document.getElementsByTagName('gradio-app')[0].shadowRoot : document/g" /content/stable-diffusion-webui/script.js
|
29 |
+
RUN sed -i -e 's/ show_progress=False,/ show_progress=True,/g' /content/stable-diffusion-webui/modules/ui.py
|
30 |
+
RUN sed -i -e 's/default_enabled=False/default_enabled=True/g' /content/stable-diffusion-webui/webui.py
|
31 |
+
RUN sed -i -e 's/ outputs=\[/queue=False, &/g' /content/stable-diffusion-webui/modules/ui.py
|
32 |
+
RUN sed -i -e 's/ queue=False, / /g' /content/stable-diffusion-webui/modules/ui.py
|
33 |
|
34 |
+
RUN rm -rfv /content/stable-diffusion-webui/scripts/
|
35 |
+
|
36 |
+
ADD https://github.com/camenduru/webui-docker/raw/main/shared-config.json /content/shared-config.json
|
37 |
+
ADD https://github.com/camenduru/webui-docker/raw/main/shared-ui-config.json /content/shared-ui-config.json
|
38 |
|
39 |
ADD https://huggingface.co/andite/anything-v4.0/resolve/main/anything-v4.5-pruned.ckpt /content/stable-diffusion-webui/models/Stable-diffusion/anything-v4.5-pruned.ckpt
|
40 |
ADD https://huggingface.co/andite/anything-v4.0/resolve/main/anything-v4.0.vae.pt /content/stable-diffusion-webui/models/Stable-diffusion/anything-v4.5-pruned.vae.pt
|
|
|
46 |
|
47 |
EXPOSE 7860
|
48 |
|
49 |
+
CMD cd /content/stable-diffusion-webui && python webui.py --xformers --listen --disable-console-progressbars --enable-console-prompts --no-progressbar-hiding --ui-config-file /content/shared-ui-config.json --ui-settings-file /content/shared-config.json
|