dengzhile138 commited on
Commit
f48bc96
·
verified ·
1 Parent(s): a084d96

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
+ # 复制项目文件
8
+ COPY . /app
9
+
10
+ # 安装依赖
11
+ RUN pip install --no-cache-dir -r requirements.txt
12
+
13
+ # 确保 /app 目录的权限
14
+ RUN chmod -R 755 /app
15
+
16
+ # 暴露必要的端口
17
+ EXPOSE 7860
18
+
19
+ # 启动命令
20
+ CMD ["python", "app.py"]