forked from dusty-nv/jetson-containers
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
39 lines (31 loc) · 1.68 KB
/
Copy pathDockerfile
File metadata and controls
39 lines (31 loc) · 1.68 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
#---
# name: stable-diffusion-webui
# group: diffusion
# depends: [pytorch, torchvision, transformers, xformers, pycuda, opencv]
# requires: '>=34.1.0'
# docs: docs.md
# notes: disabled on JetPack 4
#---
ARG BASE_IMAGE
FROM ${BASE_IMAGE}
ARG STABLE_DIFFUSION_WEBUI_REPO=AUTOMATIC1111/stable-diffusion-webui
ARG STABLE_DIFFUSION_WEBUI_VERSION=master
ADD https://api.github.com/repos/${STABLE_DIFFUSION_WEBUI_REPO}/git/refs/heads/${STABLE_DIFFUSION_WEBUI_VERSION} /tmp/stable_diffusion_webui_version.json
RUN cd /opt && \
git clone --branch ${STABLE_DIFFUSION_WEBUI_VERSION} --depth=1 https://github.com/${STABLE_DIFFUSION_WEBUI_REPO} && \
cd stable-diffusion-webui && \
git clone https://github.com/dusty-nv/stable-diffusion-webui-tensorrt extensions-builtin/stable-diffusion-webui-tensorrt && \
python3 -c 'from modules import launch_utils; launch_utils.args.skip_python_version_check=True; launch_utils.prepare_environment()'
# partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline'
RUN cd /opt && ./opencv_install.sh
# TypeError: 'type' object is not subscriptable
RUN cd /opt/stable-diffusion-webui && \
sed 's|dict\[str, OptionInfo\]|dict|g' -i modules/options.py && \
sed 's|dict\[.*\]|dict|g' -i modules/processing.py && \
sed 's|list\[.*\]|list|g' -i modules/processing.py && \
cat modules/options.py | grep '__init__' && \
cat modules/processing.py | grep 'dict'
# set the cache dir for models
ENV DIFFUSERS_CACHE=/data/models/diffusers
# default start-up command
CMD /bin/bash -c "cd /opt/stable-diffusion-webui && python3 launch.py --data=/data/models/stable-diffusion --enable-insecure-extension-access --xformers --listen --port=7860"