Deadwalker0
commited on
Update Dockerfile
Browse files- Dockerfile +29 -42
Dockerfile
CHANGED
@@ -1,49 +1,36 @@
|
|
1 |
-
# Dockerfile
|
2 |
|
3 |
-
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/
|
4 |
-
|
5 |
-
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/11.7.1/ubuntu2204/base/Dockerfile
|
6 |
-
FROM nvidia/cuda:11.7.1-base-ubuntu22.04
|
7 |
ENV DEBIAN_FRONTEND noninteractive
|
8 |
|
9 |
-
RUN apt-get update -y &&
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
-
RUN adduser --disabled-password --gecos '' user
|
12 |
-
RUN mkdir /content && chown -R user:user /content
|
13 |
WORKDIR /content
|
14 |
USER user
|
15 |
|
16 |
-
RUN
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
RUN git clone -b v1.6 https://github.com/camenduru/deforum-for-automatic1111-webui /content/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui
|
36 |
-
RUN git clone -b v1.6 https://github.com/camenduru/stable-diffusion-webui-images-browser /content/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser
|
37 |
-
RUN git clone -b v1.6 https://github.com/camenduru/stable-diffusion-webui-huggingface /content/stable-diffusion-webui/extensions/stable-diffusion-webui-huggingface
|
38 |
-
RUN git clone -b v1.6 https://github.com/camenduru/sd-civitai-browser /content/stable-diffusion-webui/extensions/sd-civitai-browser
|
39 |
-
RUN git clone -b v1.6 https://github.com/camenduru/sd-webui-additional-networks /content/stable-diffusion-webui/extensions/sd-webu
|
40 |
-
|
41 |
-
COPY --chown=user config.json /content/config.json
|
42 |
-
COPY --chown=user ui-config.json /content/ui-config.json
|
43 |
-
|
44 |
-
ADD --chown=user 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
|
45 |
-
ADD --chown=user 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 --ui-config-file /content/ui-config.json --ui-settings-file /content/config.json
|
|
|
1 |
+
# Dockerfile Public A10G
|
2 |
|
3 |
+
# https://gitlab.com/nvidia/container-images/cuda/-/blob/master/dist/12.2.0/ubuntu2204/base/Dockerfile
|
4 |
+
FROM nvidia/cuda:12.2.0-base-ubuntu22.04
|
|
|
|
|
5 |
ENV DEBIAN_FRONTEND noninteractive
|
6 |
|
7 |
+
RUN apt-get update -y && \
|
8 |
+
apt-get install -y aria2 libgl1 libglib2.0-0 wget git git-lfs python3-pip python-is-python3 && \
|
9 |
+
pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 && \
|
10 |
+
pip install xformers==0.0.20 triton==2.0.0 packaging==23.1 && \
|
11 |
+
adduser --disabled-password --gecos '' user && \
|
12 |
+
mkdir /content && \
|
13 |
+
chown -R user:user /content
|
14 |
|
|
|
|
|
15 |
WORKDIR /content
|
16 |
USER user
|
17 |
|
18 |
+
RUN git clone -b v2.6 https://github.com/camenduru/stable-diffusion-webui && \
|
19 |
+
sed -i -e 's/ start()/ #start()/g' /content/stable-diffusion-webui/launch.py && \
|
20 |
+
cd /content/stable-diffusion-webui && \
|
21 |
+
python launch.py --skip-torch-cuda-test && \
|
22 |
+
git reset --hard && \
|
23 |
+
wget https://github.com/camenduru/webui-docker/raw/main/header_patch_v2.py -O /content/header_patch_v2.py && \
|
24 |
+
wget https://github.com/camenduru/webui-docker/raw/main/shared-config_v2.json -O /content/shared-config_v2.json && \
|
25 |
+
wget https://github.com/camenduru/webui-docker/raw/main/shared-ui-config_v2.json -O /content/shared-ui-config_v2.json && \
|
26 |
+
sed -i -e '/demo:/r /content/header_patch_v2.py' /content/stable-diffusion-webui/modules/ui.py && \
|
27 |
+
sed -i -e '253,258d' /content/stable-diffusion-webui/modules/ui_settings.py && \
|
28 |
+
sed -i -e '186,228d' /content/stable-diffusion-webui/modules/ui_settings.py && \
|
29 |
+
sed -i -e '171,178d' /content/stable-diffusion-webui/modules/ui_settings.py && \
|
30 |
+
sed -i -e '108,113d' /content/stable-diffusion-webui/modules/ui_settings.py && \
|
31 |
+
sed -i -e '225,227d' /content/stable-diffusion-webui/modules/ui_loadsave.py && \
|
32 |
+
sed -i -e '214,217d' /content/stable-diffusion-webui/modules/ui_loadsave.py && \
|
33 |
+
rm -rfv /content/stable-diffusion-webui/scripts/ && \
|
34 |
+
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/juggernaut-xl/resolve/main/juggernautXL_version2.safetensors -d /content/stable-diffusion-webui/models/Stable-diffusion -o juggernautXL_version2.safetensors
|
35 |
+
|
36 |
+
CMD cd /content/stable-diffusion-webui && python launch.py --cors-allow-origins=* --xformers --listen --theme dark --gradio-queue --ui-settings-file /content/shared-config_v2.json --ui-config-file /content/shared-ui-config_v2.json
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|