-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
49 lines (38 loc) · 1.21 KB
/
Dockerfile
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
FROM nvidia/cuda:11.7.1-runtime-ubuntu22.04
LABEL maintainer "Shunsuke Ise <[email protected]>"
################################
# init
################################
# install prerequisites
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/AUTOMATIC1111/stable-diffusion-webui.git
WORKDIR /work/stable-diffusion-webui
# version: Mar 14, 2023
RUN git checkout a9fed7c364061ae6efb37f797b6b522cb3cf7aa2
# 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
ENTRYPOINT ["/work/stable-diffusion-webui/venv/bin/python", "launch.py", "--listen"]