tianlong12 commited on
Commit
9419963
1 Parent(s): 0b9ff8b

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +18 -0
Dockerfile ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用官方 Python 镜像作为基础镜像
2
+ FROM python:3.9-slim
3
+
4
+ # 设置工作目录
5
+ WORKDIR /app
6
+
7
+ # 复制 requirements.txt 并安装依赖
8
+ COPY requirements.txt requirements.txt
9
+ RUN pip install --no-cache-dir -r requirements.txt
10
+
11
+ # 复制当前目录的内容到工作目录
12
+ COPY . .
13
+
14
+ # 暴露应用程序端口
15
+ EXPOSE 7860
16
+
17
+ # 运行 Flask 应用程序
18
+ CMD ["python", "app.py"]