Spaces:
Running
on
A10G
Running
on
A10G
Update Dockerfile
Browse filesAlternative wording to model downloading
- Dockerfile +4 -13
Dockerfile
CHANGED
|
@@ -9,19 +9,6 @@ RUN adduser --disabled-password --gecos '' user && \
|
|
| 9 |
WORKDIR /content
|
| 10 |
USER user
|
| 11 |
|
| 12 |
-
# Pre-download model in a separate stage for better caching
|
| 13 |
-
FROM base AS model-downloader
|
| 14 |
-
ADD https://huggingface.co/darkstorm2150/OpenGen/resolve/main/OpenGen%20v1.0.safetensors \
|
| 15 |
-
/tmp/OpenGen%20v1.0.safetensors
|
| 16 |
-
USER root
|
| 17 |
-
RUN mv "/tmp/OpenGen%20v1.0.safetensors" \
|
| 18 |
-
"/content/stable-diffusion-webui/models/Stable-diffusion/OpenGen v1.0.safetensors"
|
| 19 |
-
USER user
|
| 20 |
-
|
| 21 |
-
# Main build stage with optimized layers
|
| 22 |
-
FROM base AS final
|
| 23 |
-
COPY --from=model-downloader /content/stable-diffusion-webui/models/Stable-diffusion/OpenGen%20v1.0.safetensors /content/stable-diffusion-webui/models/Stable-diffusion/
|
| 24 |
-
|
| 25 |
# Install system dependencies efficiently
|
| 26 |
RUN apt-get update && \
|
| 27 |
apt-get install -y --no-install-recommends \
|
|
@@ -69,5 +56,9 @@ RUN rm -rf stable-diffusion-webui/scripts && \
|
|
| 69 |
ADD --chown=user https://github.com/camenduru/webui-docker/raw/main/shared-config.json /content/
|
| 70 |
ADD --chown=user https://github.com/camenduru/webui-docker/raw/main/shared-ui-config.json /content/
|
| 71 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
EXPOSE 7860
|
| 73 |
CMD ["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"]
|
|
|
|
| 9 |
WORKDIR /content
|
| 10 |
USER user
|
| 11 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
# Install system dependencies efficiently
|
| 13 |
RUN apt-get update && \
|
| 14 |
apt-get install -y --no-install-recommends \
|
|
|
|
| 56 |
ADD --chown=user https://github.com/camenduru/webui-docker/raw/main/shared-config.json /content/
|
| 57 |
ADD --chown=user https://github.com/camenduru/webui-docker/raw/main/shared-ui-config.json /content/
|
| 58 |
|
| 59 |
+
# Add Model
|
| 60 |
+
ADD --chown=user https://huggingface.co/darkstorm2150/OpenGen/resolve/main/OpenGen%20v1.0.safetensors /content/stable-diffusion-webui/models/Stable-diffusion/OpenGen%20v1.0.safetensors
|
| 61 |
+
|
| 62 |
+
|
| 63 |
EXPOSE 7860
|
| 64 |
CMD ["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"]
|