mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-01 12:57:11 +08:00
feat: update Dockerfile
This commit is contained in:
parent
ef174de5b0
commit
70886e1d92
25
Dockerfile
25
Dockerfile
@ -1,17 +1,28 @@
|
|||||||
FROM python:3.12-slim
|
FROM python:3.12-slim
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
ENV DEBIAN_FRONTEND=noninteractive \
|
ENV DEBIAN_FRONTEND=noninteractive \
|
||||||
PIP_NO_CACHE_DIR=on
|
PIP_NO_CACHE_DIR=on
|
||||||
RUN --mount=type=cache,target=/var/cache/apt \
|
|
||||||
apt-get update && \
|
# 安装必要的软件包
|
||||||
apt-get install git -y && \
|
RUN apt-get update && \
|
||||||
|
apt-get install -y git && \
|
||||||
apt-get clean && \
|
apt-get clean && \
|
||||||
rm -rf /var/lib/apt/lists/*
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY requirements.txt requirements.txt
|
# 克隆自定义节点
|
||||||
RUN pip install torch==2.3.1 torchvision==0.18.1 torchaudio --extra-index-url https://download.pytorch.org/whl/cu124 \
|
RUN git clone https://github.com/ltdrdata/ComfyUI-Manager.git /app/custom_nodes/ComfyUI-Manager
|
||||||
&& pip install -r requirements.txt
|
|
||||||
|
|
||||||
|
# 安装依赖
|
||||||
|
COPY requirements.txt requirements.txt
|
||||||
|
RUN pip install torch==2.3.1 torchvision==0.18.1 torchaudio --extra-index-url https://download.pytorch.org/whl/cu124
|
||||||
|
|
||||||
|
# 寻找所有目录下的requirements.txt文件并安装
|
||||||
|
RUN find . -name requirements.txt -exec pip install -r {} \;
|
||||||
|
|
||||||
|
# 拷贝当前目录下的所有文件到工作目录
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
CMD ["python3", "main.py"]
|
# 执行主程序
|
||||||
|
CMD ["python3", "main.py"]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user