forked from AUTOMATIC1111/stable-diffusion-webui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsd.Dockerfile
More file actions
54 lines (37 loc) · 1.09 KB
/
sd.Dockerfile
File metadata and controls
54 lines (37 loc) · 1.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
FROM nvidia/cuda:12.2.0-base-ubuntu22.04
ENV DEBIAN_FRONTEND noninteractive
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update -y \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
curl \
git \
git-lfs \
python3.10 \
python3.10-venv \
python3-pip \
libgl1 \
libglib2.0-0
RUN apt-get clean -y && rm -rf /var/lib/apt/lists/*
# user and workdir
RUN useradd -m user
RUN mkdir /work && chown -R user:user /work
USER user
WORKDIR /work
################################
# setup
################################
RUN git clone https://github.com/webcoderz/stable-diffusion-webui.git
WORKDIR /work/stable-diffusion-webui
# setup
RUN python3 -mvenv venv && /work/stable-diffusion-webui/venv/bin/python -c "from launch import *; prepare_environment()" --skip-torch-cuda-test --no-download-sd-model
################################
# entrypoint
################################
EXPOSE 7860
EXPOSE 8000
EXPOSE 8265
EXPOSE 6388
EXPOSE 10001
CMD ["./webui.sh", "--xformers --cors-allow-origins=* --api"]