-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
61 lines (44 loc) · 1.85 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
50
51
52
53
54
55
56
57
58
59
60
FROM tiangolo/uvicorn-gunicorn-fastapi:python3.8
# Author:
# - Name: Aaron Kaplan
# - Email: [email protected]
# Open container image
LABEL "org.opencontainers.image.created"="2022-12-T19:00:00Z0"
LABEL "org.opencontainers.image.authors"="[email protected]"
LABEL "org.opencontainers.image.url"="https://github.com/aaronkaplan/simple-stable-diffusion-ui"
LABEL "org.opencontainers.image.documentation URL"="https://github.com/aaronkaplan/simple-stable-diffusion-ui"
LABEL "org.opencontainers.image.version"="0.1"
LABEL "org.opencontainers.image.vendor"="deepinsights.ai"
LABEL "org.opencontainers.image.licenses"="proprietory"
LABEL "org.opencontainers.image.title"="Simple stupid Stable Diffusion UI"
LABEL "org.opencontainers.image.description"="An extremely simple and stupid UI for running Stable Diffusion locally"
LABEL "org.opencontainers.image.base.digest"="tiangolo/uvicorn-gunicorn-fastapi:python3.8"
WORKDIR /app
# Base OS libs
RUN apt update -y && apt upgrade -y
# Do the pip stuff
COPY ./requirements.txt /
RUN pip install --upgrade pip
RUN pip install -r /requirements.txt
# do this in a separate, subsequent step after the pip install.
# See https://www.docker.com/blog/speed-up-your-development-flow-with-these-dockerfile-best-practices/
COPY app /app
#RUN pip install --no-cache-dir "uvicorn[standard]" gunicorn
#RUN pip install --no-cache-dir fastapi
#RUN pip install pydicom python-multipart
COPY app/start.sh /start.sh
RUN chmod +x /start.sh
#
# COPY ./app/gunicorn_conf.py /gunicorn_conf.py
COPY app/start-reload.sh /start-reload.sh
RUN chmod +x /start-reload.sh
ENV PYTHONPATH=/app
ENV ROOT_PATH=/
ENV PORT=8000
ENV UPLOAD_PATH=/tmp
ENV WORKERS_PER_CORE=2
ENV LOG_LEVEL=info
EXPOSE 8000
# Run the start script, it will check for an /app/prestart.sh script (e.g. for migrations)
# And then will start Gunicorn with Uvicorn
CMD ["/start.sh"]