mytechtop commited on
Commit
e963865
·
verified ·
1 Parent(s): 8c4557e

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +28 -0
Dockerfile ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ WORKDIR /app
4
+
5
+ # 安装系统依赖
6
+ RUN apt-get update && apt-get install -y \
7
+ git \
8
+ wget \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ # 克隆 ComfyUI
12
+ RUN git clone https://github.com/comfyanonymous/ComfyUI.git .
13
+
14
+ # 安装 Python 依赖
15
+ RUN pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cpu
16
+ RUN pip install -r requirements.txt
17
+
18
+ # 创建模型目录
19
+ RUN mkdir -p models/checkpoints models/vae models/loras models/controlnet
20
+
21
+ # 复制您的模型文件(可选)
22
+ # COPY sd_xl_base_1.0.safetensors models/checkpoints/
23
+
24
+ # 暴露端口
25
+ EXPOSE 7860
26
+
27
+ # 启动命令
28
+ CMD ["python", "main.py", "--listen", "0.0.0.0", "--port", "7860"]