Spaces:
Runtime error
Runtime error
space setup permissions, etc.
Browse files- Dockerfile +3 -3
- on_start.sh +0 -12
Dockerfile
CHANGED
@@ -85,11 +85,11 @@ RUN git clone https://github.com/Mikubill/sd-webui-controlnet /app/stable-diffus
|
|
85 |
# Prepare WebUI environment
|
86 |
WORKDIR /app/stable-diffusion-webui
|
87 |
COPY config.json ui-config.json /app/stable-diffusion-webui/
|
88 |
-
RUN /opt/venv/bin/python launch.py --exit --skip-torch-cuda-test
|
89 |
|
90 |
RUN sed -i -e 's/ show_progress=False,/ show_progress=True,/g' modules/ui.py
|
91 |
RUN sed -i -e 's/shared.demo.launch/shared.demo.queue().launch/g' webui.py
|
92 |
-
RUN sed -i -e 's/ outputs=\[/queue=False, &/g' modules/ui.py
|
93 |
|
94 |
# Copy startup scripts
|
95 |
COPY run.py on_start.sh /app/stable-diffusion-webui/
|
@@ -97,7 +97,7 @@ RUN chmod +x on_start.sh
|
|
97 |
|
98 |
# Run app as non-root user
|
99 |
RUN adduser --disabled-password --gecos '' user
|
100 |
-
RUN chown -R user:user /app
|
101 |
USER user
|
102 |
|
103 |
EXPOSE 7860
|
|
|
85 |
# Prepare WebUI environment
|
86 |
WORKDIR /app/stable-diffusion-webui
|
87 |
COPY config.json ui-config.json /app/stable-diffusion-webui/
|
88 |
+
RUN /opt/venv/bin/python launch.py --exit --skip-torch-cuda-test --xformers
|
89 |
|
90 |
RUN sed -i -e 's/ show_progress=False,/ show_progress=True,/g' modules/ui.py
|
91 |
RUN sed -i -e 's/shared.demo.launch/shared.demo.queue().launch/g' webui.py
|
92 |
+
# RUN sed -i -e 's/ outputs=\[/queue=False, &/g' modules/ui.py
|
93 |
|
94 |
# Copy startup scripts
|
95 |
COPY run.py on_start.sh /app/stable-diffusion-webui/
|
|
|
97 |
|
98 |
# Run app as non-root user
|
99 |
RUN adduser --disabled-password --gecos '' user
|
100 |
+
RUN chown -R user:user /app
|
101 |
USER user
|
102 |
|
103 |
EXPOSE 7860
|
on_start.sh
CHANGED
@@ -1,18 +1,6 @@
|
|
1 |
#!/bin/bash
|
2 |
set -euo pipefail
|
3 |
|
4 |
-
echo "\$ nvidia smi"
|
5 |
-
nvidia-smi
|
6 |
-
|
7 |
-
# Install xformers matching the GPU (only for Nvidia A10G and T4 GPUs)
|
8 |
-
if nvidia-smi --query-gpu=gpu_name --format=csv,noheader | grep -q A10G; then
|
9 |
-
/opt/venv/bin/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
|
10 |
-
elif nvidia-smi --query-gpu=gpu_name --format=csv,noheader | grep -q T4; then
|
11 |
-
/opt/venv/bin/pip install https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.16/xformers-0.0.16+814314d.d20230118-cp310-cp310-linux_x86_64.whl
|
12 |
-
else
|
13 |
-
/opt/venv/bin/pip install --pre xformers
|
14 |
-
fi
|
15 |
-
|
16 |
# SD 2.1 768 base model
|
17 |
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/36a01dc742066de2e8c91e7cf0b8f6b53ef53da1/v2-1_768-ema-pruned.safetensors -d /app/stable-diffusion-webui/models/Stable-diffusion -o v2-1_768-ema-pruned.safetensors
|
18 |
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://raw.githubusercontent.com/Stability-AI/stablediffusion/fc1488421a2761937b9d54784194157882cbc3b1/configs/stable-diffusion/v2-inference-v.yaml -d /app/stable-diffusion-webui/models/Stable-diffusion -o v2-1_768-ema-pruned.yaml
|
|
|
1 |
#!/bin/bash
|
2 |
set -euo pipefail
|
3 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
# SD 2.1 768 base model
|
5 |
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/36a01dc742066de2e8c91e7cf0b8f6b53ef53da1/v2-1_768-ema-pruned.safetensors -d /app/stable-diffusion-webui/models/Stable-diffusion -o v2-1_768-ema-pruned.safetensors
|
6 |
aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://raw.githubusercontent.com/Stability-AI/stablediffusion/fc1488421a2761937b9d54784194157882cbc3b1/configs/stable-diffusion/v2-inference-v.yaml -d /app/stable-diffusion-webui/models/Stable-diffusion -o v2-1_768-ema-pruned.yaml
|