liuxuan320 commited on
Commit
67fcd72
1 Parent(s): 771ea63

Update Dockerfile

Browse files

Test using the flask for running,

Files changed (1) hide show
  1. Dockerfile +7 -4
Dockerfile CHANGED
@@ -10,8 +10,11 @@ COPY . /app
10
  # 安装依赖
11
  RUN pip install -r requirements.txt
12
 
13
- # 暴露端口(根据 Hugging Face Space 要求,通常是 7860 或 8080)
14
- EXPOSE 8080
15
 
16
- # 启动命令
17
- CMD ["python", "app.py"]
 
 
 
 
10
  # 安装依赖
11
  RUN pip install -r requirements.txt
12
 
13
+ # 暴露应用运行的端口
14
+ EXPOSE 7860
15
 
16
+ # 设置环境变量
17
+ ENV FLASK_APP=app.py
18
+
19
+ # 运行 Flask 应用
20
+ CMD ["flask", "run", "--host=0.0.0.0", "--port=7860"]