Skip to content

Commit c69e264

Browse files
build: 升级pip并优化虚拟环境配置
1 parent 9049091 commit c69e264

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Dockerfile

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ RUN git clone https://github.com/comfyanonymous/ComfyUI.git /ComfyUI
1616
# 创建并激活虚拟环境
1717
RUN python3 -m venv /venv
1818

19+
# 升级虚拟环境中的 pip
20+
RUN /venv/bin/pip install --upgrade pip
21+
1922
# 激活虚拟环境并安装 PyTorch 相关依赖
2023
RUN /venv/bin/pip install --no-cache-dir torch torchvision torchaudio \
2124
--index-url https://download.pytorch.org/whl/rocm6.2
2225

2326
# 安装 ComfyUI 项目依赖
2427
WORKDIR /ComfyUI
25-
RUN pip3 install --no-cache-dir -r requirements.txt
28+
RUN /venv/bin/pip install --no-cache-dir -r requirements.txt
2629

2730
# 暴露服务端口并设置默认启动命令
2831
EXPOSE 8188
29-
CMD ["python3", "main.py"]
32+
CMD ["/venv/bin/python3", "main.py"]

0 commit comments

Comments
 (0)