yintao127 commited on
Commit
fa3fb3a
·
verified ·
1 Parent(s): 05ce170

Upload 2 files

Browse files
Files changed (2) hide show
  1. Dockerfile +16 -0
  2. requirements.txt +6 -0
Dockerfile ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # 安装系统依赖
4
+ RUN apt-get update && apt-get install -y git libglib2.0-0 libsm6 libxrender1 libxext6 && apt-get clean && rm -rf /var/lib/apt/lists/*
5
+
6
+ # 设置工作目录
7
+ WORKDIR /app
8
+
9
+ # 复制项目文件
10
+ COPY . /app
11
+
12
+ # 安装 Python 依赖
13
+ RUN pip install --upgrade pip && pip install -r requirements.txt
14
+
15
+ # 容器启动命令
16
+ CMD ["python", "app.py"]
requirements.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ torch
2
+ diffusers[torch]
3
+ transformers
4
+ flask
5
+ flask_cors
6
+ Pillow