chb2026 commited on
Commit
facf217
·
verified ·
1 Parent(s): 96ef0b4

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -0
Dockerfile CHANGED
@@ -1,8 +1,19 @@
1
  FROM python:3.9-slim
2
 
3
  WORKDIR /app
 
 
4
  COPY . .
5
 
 
 
 
 
6
  RUN pip install --no-cache-dir -r requirements.txt
7
 
 
 
 
 
8
  CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "600", "app:app"]
 
 
1
  FROM python:3.9-slim
2
 
3
  WORKDIR /app
4
+
5
+ # 复制应用文件
6
  COPY . .
7
 
8
+ # 创建必要的目录
9
+ RUN mkdir -p images
10
+
11
+ # 安装依赖
12
  RUN pip install --no-cache-dir -r requirements.txt
13
 
14
+ # 设置环境变量
15
+ ENV PYTHONUNBUFFERED=1
16
+
17
+ # 运行应用
18
  CMD ["gunicorn", "--bind", "0.0.0.0:7860", "--timeout", "600", "app:app"]
19
+