Lashtw commited on
Commit
10faeee
·
verified ·
1 Parent(s): 83795fc

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +22 -0
Dockerfile ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # 使用官方 Python 基础镜像
2
+ FROM python:3.9-slim
3
+
4
+ # 安装系统依赖和中文字体(核心修改部分)
5
+ RUN apt-get update && apt-get install -y \
6
+ fonts-noto-cjk \ # 安装 Noto 系列中文字体
7
+ && rm -rf /var/lib/apt/lists/*
8
+
9
+ # 设置工作目录
10
+ WORKDIR /app
11
+
12
+ # 复制依赖清单
13
+ COPY requirements.txt .
14
+
15
+ # 安装 Python 依赖
16
+ RUN pip install --no-cache-dir -r requirements.txt
17
+
18
+ # 复制所有项目文件
19
+ COPY . .
20
+
21
+ # 运行 Streamlit 应用
22
+ CMD ["streamlit", "run", "your_app.py", "--server.port=8501", "--server.address=0.0.0.0"]