bobocup commited on
Commit
3110c33
·
verified ·
1 Parent(s): 2e3e64f

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +26 -0
Dockerfile ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.9-slim
2
+
3
+ # 安装系统依赖
4
+ RUN apt-get update && apt-get install -y \
5
+ wget \
6
+ gnupg \
7
+ chromium \
8
+ chromium-driver \
9
+ && rm -rf /var/lib/apt/lists/*
10
+
11
+ WORKDIR /code
12
+
13
+ # 复制依赖文件
14
+ COPY requirements.txt .
15
+
16
+ # 安装 Python 依赖
17
+ RUN pip install --no-cache-dir -r requirements.txt
18
+
19
+ # 复制应用代码
20
+ COPY . .
21
+
22
+ # 暴露端口
23
+ EXPOSE 7860
24
+
25
+ # 启动应用
26
+ CMD ["python", "app.py"]