aleph65 commited on
Commit
6507f17
·
verified ·
1 Parent(s): 1398c98

Dockerfile v7: bake apply_patches.sh (ComfyUI #14573 fix), DynamicVRAM on

Browse files
Files changed (1) hide show
  1. docker/Dockerfile +19 -6
docker/Dockerfile CHANGED
@@ -7,9 +7,9 @@
7
  # on any machine with Docker produces the same setup.
8
  #
9
  # Build from the REPO ROOT (context needs download_missing_models.sh + workflows/
10
- # + start_comfy + claude_start.sh):
11
- # docker build -t plx1029/comfyui-qwen:v6 -f docker/Dockerfile .
12
- # docker push plx1029/comfyui-qwen:v6
13
  #
14
  # No secrets are baked into this image (it is public). The model-download
15
  # script prompts for your Hugging Face token at runtime (or reads $HF_TOKEN).
@@ -34,6 +34,13 @@
34
  # repo at boot (via refresh-workspace.sh) — `start_comfy` (frees port 7865 then
35
  # runs ComfyUI with the manager) and `claude_start.sh` (IS_SANDBOX=1 claude
36
  # --dangerously-skip-permissions).
 
 
 
 
 
 
 
37
 
38
  FROM runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
39
 
@@ -46,6 +53,11 @@ RUN git clone https://github.com/comfyanonymous/ComfyUI.git /workspace/ComfyUI &
46
  cd /workspace/ComfyUI && git checkout ${COMFYUI_COMMIT} && \
47
  pip install -r requirements.txt
48
 
 
 
 
 
 
49
  # Custom nodes: rgthree (Power Lora Loader) + ComfyUI-Manager
50
  RUN git clone https://github.com/rgthree/rgthree-comfy.git /workspace/ComfyUI/custom_nodes/rgthree-comfy && \
51
  cd /workspace/ComfyUI/custom_nodes/rgthree-comfy && git checkout ${RGTHREE_COMMIT} && \
@@ -84,14 +96,15 @@ RUN chmod +x /workspace/download_missing_models.sh && \
84
  ln -sf /workspace/download_missing_models.sh /usr/local/bin/download_missing_models.sh
85
 
86
  # v6: launcher scripts in /workspace. start_comfy kills whatever holds port
87
- # 7865 then runs ComfyUI (--enable-manager); claude_start.sh launches Claude
88
- # Code sandboxed. refresh-workspace.sh re-pulls both from the HF repo at boot.
 
89
  COPY start_comfy /workspace/start_comfy
90
  COPY claude_start.sh /workspace/claude_start.sh
91
  RUN chmod +x /workspace/start_comfy /workspace/claude_start.sh
92
 
93
  # Seed tarball: restores /workspace when a network volume shadows it
94
- RUN tar -czf /opt/workspace-seed.tar.gz -C /workspace ComfyUI workflows download_missing_models.sh start_comfy claude_start.sh
95
 
96
  # Startup: seed /workspace if needed, refresh workflows + downloader from the
97
  # HF repo (v5). ComfyUI does NOT auto-start (v4 default) — run `comfy`
 
7
  # on any machine with Docker produces the same setup.
8
  #
9
  # Build from the REPO ROOT (context needs download_missing_models.sh + workflows/
10
+ # + start_comfy + claude_start.sh + apply_patches.sh):
11
+ # docker build -t plx1029/comfyui-qwen:v7 -f docker/Dockerfile .
12
+ # docker push plx1029/comfyui-qwen:v7
13
  #
14
  # No secrets are baked into this image (it is public). The model-download
15
  # script prompts for your Hugging Face token at runtime (or reads $HF_TOKEN).
 
34
  # repo at boot (via refresh-workspace.sh) — `start_comfy` (frees port 7865 then
35
  # runs ComfyUI with the manager) and `claude_start.sh` (IS_SANDBOX=1 claude
36
  # --dangerously-skip-permissions).
37
+ #
38
+ # v7: apply_patches.sh baked in + run at build, and re-run at launch by
39
+ # start_comfy (so existing pods self-heal off the HF copy). Fixes ComfyUI
40
+ # #14573 — the comfy-aimdo/DynamicVRAM sampler hang at "Model Initializing"
41
+ # (and its slow loads) by patching model_management.py's NVIDIA
42
+ # MIN_WEIGHT_MEMORY_RATIO 0.0 -> 0.4. With the patch, DynamicVRAM is safe, so
43
+ # start_comfy no longer disables it. Remove the patch once #14573 lands upstream.
44
 
45
  FROM runpod/pytorch:1.0.2-cu1281-torch280-ubuntu2404
46
 
 
53
  cd /workspace/ComfyUI && git checkout ${COMFYUI_COMMIT} && \
54
  pip install -r requirements.txt
55
 
56
+ # v7: apply local core patches upstream hasn't merged (ComfyUI #14573 aimdo
57
+ # hang). Idempotent; start_comfy also re-runs it at launch from the HF copy.
58
+ COPY apply_patches.sh /workspace/apply_patches.sh
59
+ RUN chmod +x /workspace/apply_patches.sh && bash /workspace/apply_patches.sh
60
+
61
  # Custom nodes: rgthree (Power Lora Loader) + ComfyUI-Manager
62
  RUN git clone https://github.com/rgthree/rgthree-comfy.git /workspace/ComfyUI/custom_nodes/rgthree-comfy && \
63
  cd /workspace/ComfyUI/custom_nodes/rgthree-comfy && git checkout ${RGTHREE_COMMIT} && \
 
96
  ln -sf /workspace/download_missing_models.sh /usr/local/bin/download_missing_models.sh
97
 
98
  # v6: launcher scripts in /workspace. start_comfy kills whatever holds port
99
+ # 7865, applies core patches, then runs ComfyUI (--enable-manager);
100
+ # claude_start.sh launches Claude Code sandboxed. refresh-workspace.sh re-pulls
101
+ # both from the HF repo at boot.
102
  COPY start_comfy /workspace/start_comfy
103
  COPY claude_start.sh /workspace/claude_start.sh
104
  RUN chmod +x /workspace/start_comfy /workspace/claude_start.sh
105
 
106
  # Seed tarball: restores /workspace when a network volume shadows it
107
+ RUN tar -czf /opt/workspace-seed.tar.gz -C /workspace ComfyUI workflows download_missing_models.sh start_comfy claude_start.sh apply_patches.sh
108
 
109
  # Startup: seed /workspace if needed, refresh workflows + downloader from the
110
  # HF repo (v5). ComfyUI does NOT auto-start (v4 default) — run `comfy`