rootuc commited on
Commit
a302e6e
·
1 Parent(s): 9da3834
Files changed (2) hide show
  1. Dockerfile +12 -4
  2. entrypoint.sh +8 -0
Dockerfile CHANGED
@@ -21,18 +21,26 @@ RUN git clone https://github.com/comfyanonymous/ComfyUI.git .
21
  RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
 
 
 
24
  # 创建模型目录(可选:在此处预下载一个小模型,如 SD1.5 Pruned)
25
- RUN wget -O models/checkpoints/v1-5-pruned-emaonly.safetensors \
26
- https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors
 
 
 
27
 
28
 
29
- RUN git clone https://github.com/ltdrdata/ComfyUI-Manager custom_nodes/comfyui-manager
30
 
31
 
32
  # 暴露 Hugging Face 指定端口
33
  EXPOSE 7860
34
 
 
 
35
  # 启动命令:使用 --listen 监听所有接口,--port 7860 适配 HF
36
  # 如果是纯 CPU 环境,建议加上 --cpu 参数
37
- CMD ["python3", "main.py", "--listen", "0.0.0.0", "--port", "7860", "--cpu"]
 
38
 
 
21
  RUN pip install --no-cache-dir torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
22
  RUN pip install --no-cache-dir -r requirements.txt
23
 
24
+
25
+
26
+
27
  # 创建模型目录(可选:在此处预下载一个小模型,如 SD1.5 Pruned)
28
+ #RUN wget -O models/checkpoints/v1-5-pruned-emaonly.safetensors \
29
+ # https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors
30
+
31
+
32
+ #RUN git clone https://github.com/ltdrdata/ComfyUI-Manager custom_nodes/comfyui-manager
33
 
34
 
 
35
 
36
 
37
  # 暴露 Hugging Face 指定端口
38
  EXPOSE 7860
39
 
40
+ ADD entrypoint.sh /app/entrypoint.sh
41
+
42
  # 启动命令:使用 --listen 监听所有接口,--port 7860 适配 HF
43
  # 如果是纯 CPU 环境,建议加上 --cpu 参数
44
+ #CMD ["python3", "main.py", "--listen", "0.0.0.0", "--port", "7860", "--cpu"]
45
+ ENTRYPOINT ["sh", "/app/entrypoint.sh"]
46
 
entrypoint.sh ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+
2
+ git clone https://github.com/ltdrdata/ComfyUI-Manager custom_nodes/comfyui-manager &
3
+
4
+ wget -O models/checkpoints/v1-5-pruned-emaonly.safetensors \
5
+ https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.safetensors &
6
+
7
+ python3 main.py --listen 0.0.0.0 --port 7860 --cpu
8
+