Shunfeng Zheng commited on
Commit
8d1cb9f
·
verified ·
1 Parent(s): 3d8b849

Create Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +25 -0
Dockerfile ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ FROM python:3.10-slim
2
+
3
+ # 安装系统依赖(GDAL、shapely、geopandas 需要)
4
+ RUN apt-get update && apt-get install -y \
5
+ build-essential \
6
+ g++ \
7
+ git \
8
+ curl \
9
+ gcc \
10
+ gdal-bin \
11
+ libgdal-dev \
12
+ libgeos-dev \
13
+ libspatialindex-dev \
14
+ && rm -rf /var/lib/apt/lists/*
15
+
16
+ # 复制文件
17
+ WORKDIR /app
18
+ COPY . .
19
+
20
+ # 安装 Python 依赖
21
+ RUN pip install --upgrade pip
22
+ RUN pip install --no-deps -r requirements.txt
23
+
24
+ # 设置 Streamlit 默认运行
25
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]