Roberta2024 commited on
Commit
ee0a777
·
verified ·
1 Parent(s): afcfa0a

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +20 -0
Dockerfile ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用官方的Python基础镜像
2
+ FROM python:3.9-slim
3
+
4
+ # 设置工作目录
5
+ WORKDIR /app
6
+
7
+ # 复制当前目录的内容到容器中的/app目录
8
+ COPY . /app
9
+
10
+ # 安装必要的Python库
11
+ RUN pip install --no-cache-dir flet pandas numpy scikit-learn
12
+
13
+ # 暴露Flet默认使用的端口
14
+ EXPOSE 8550
15
+
16
+ # 设置环境变量
17
+ ENV FLET_SERVER_PORT 8550
18
+
19
+ # 运行应用程序
20
+ CMD ["python", "app.py"]