Shunfeng Zheng commited on
Commit
7c8b6e5
·
verified ·
1 Parent(s): 6d1d974

Upload 5 files

Browse files
Files changed (5) hide show
  1. Dockerfile +25 -0
  2. README.md +6 -6
  3. app.py +5 -0
  4. requirements_geospacy.txt +135 -0
  5. space.yaml +1 -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_geospacy.txt
23
+
24
+ # 设置 Streamlit 默认运行
25
+ CMD ["streamlit", "run", "app.py", "--server.port=7860", "--server.address=0.0.0.0"]
README.md CHANGED
@@ -1,10 +1,10 @@
1
  ---
2
- title: Dockerf
3
- emoji: 🐠
4
- colorFrom: purple
5
- colorTo: indigo
6
  sdk: docker
7
- pinned: false
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: Docker2
3
+ emoji: 📓
4
+ colorFrom: pink
5
+ colorTo: purple
6
  sdk: docker
7
+ fullWidth: true
8
  ---
9
 
10
+ You can install and run [Livebook](https://livebook.dev/) inside a Hugging Face Space. Here's [a tutorial](https://huggingface.co/docs/hub/spaces-sdks-docker-livebook) on how to do that.
app.py ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ import streamlit as st
2
+
3
+
4
+ st.title("🗺️ Geospacy Docker Demo")
5
+ st.success("运行成功,所有依赖由 Docker 完整控制")
requirements_geospacy.txt ADDED
@@ -0,0 +1,135 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ altair==4.2.2
2
+ annotated-types==0.7.0
3
+ anyio==4.8.0
4
+ attrs==24.3.0
5
+ blinker==1.9.0
6
+ blis==0.7.11
7
+ Bottleneck==1.4.2
8
+ branca==0.8.1
9
+ Brotli==1.0.9
10
+ cachetools==5.5.0
11
+ catalogue==2.0.10
12
+ certifi==2024.12.14
13
+ cffi==1.17.1
14
+ charset-normalizer==3.4.1
15
+ click==7.1.2
16
+ click-plugins==1.1.1
17
+ cligj==0.7.2
18
+ cloudpathlib==0.20.0
19
+ colorama==0.4.6
20
+ confection==0.1.5
21
+ contourpy==1.3.1
22
+ cycler==0.12.1
23
+ cymem==2.0.10
24
+ distro==1.9.0
25
+ entrypoints==0.4
26
+ exceptiongroup==1.2.2
27
+ filelock==3.16.1
28
+ fiona==1.10.1
29
+ folium==0.19.4
30
+ fonttools==4.55.3
31
+ fsspec==2024.12.0
32
+ GDAL==3.6.2
33
+ gensim==4.3.3
34
+ geopandas==0.11.1
35
+ gitdb==4.0.11
36
+ GitPython==3.1.43
37
+ h11==0.14.0
38
+ h2==4.1.0
39
+ hpack==4.0.0
40
+ httpcore==1.0.7
41
+ httpx==0.28.1
42
+ huggingface-hub==0.27.0
43
+ hyperframe==6.0.1
44
+ idna==3.10
45
+ importlib_metadata==8.5.0
46
+ Jinja2==3.1.5
47
+ jiter==0.8.2
48
+ joblib==1.4.2
49
+ jsonschema==4.23.0
50
+ jsonschema-specifications==2024.10.1
51
+ kiwisolver==1.4.4
52
+ langcodes==3.5.0
53
+ language_data==1.3.0
54
+ mapclassify==2.8.1
55
+ marisa-trie==1.2.1
56
+ markdown-it-py==3.0.0
57
+ MarkupSafe==3.0.2
58
+ matplotlib==3.9.2
59
+ mdurl==0.1.2
60
+ munkres==1.1.4
61
+ murmurhash==1.0.11
62
+ mysql-connector-python==8.0.30
63
+ narwhals==1.20.1
64
+ networkx==3.4.2
65
+ numexpr==2.10.1
66
+ numpy==1.26.4
67
+ openai==1.61.1
68
+ packaging==24.2
69
+ pandas==2.2.3
70
+ pathlib_abc==0.1.1
71
+ pathy==0.11.0
72
+ pillow==11.0.0
73
+ pip==24.3.1
74
+ pipdeptree==2.24.0
75
+ preshed==3.0.9
76
+ protobuf==3.20.1
77
+ pyarrow==18.1.0
78
+ pycparser==2.22
79
+ pydantic==1.10.0
80
+ pydantic_core==2.27.2
81
+ pydeck==0.9.1
82
+ Pygments==2.18.0
83
+ Pympler==1.1
84
+ pyparsing==3.2.0
85
+ pyproj==3.6.1
86
+ PySocks==1.7.1
87
+ python-dateutil==2.9.0.post0
88
+ pytz==2024.2
89
+ PyYAML==6.0.2
90
+ quantities==0.13.0
91
+ referencing==0.35.1
92
+ requests==2.32.3
93
+ rich==13.9.4
94
+ rpds-py==0.22.3
95
+ Rtree==1.0.1
96
+ scikit-learn==1.5.2
97
+ scipy==1.13.1
98
+ semver==3.0.2
99
+ setuptools==75.1.0
100
+ Shapely==1.8.4
101
+ shellingham==1.5.4
102
+ six==1.17.0
103
+ smart-open==6.4.0
104
+ smmap==5.0.1
105
+ sniffio==1.3.1
106
+ spacy==3.0.9
107
+ spacy-legacy==3.0.12
108
+ spacy-loggers==1.0.5
109
+ spacy-streamlit==1.0.1
110
+ srsly==2.5.0
111
+ streamlit==1.41.1
112
+ streamlit_folium==0.24.0
113
+ tenacity==9.0.0
114
+ thinc==8.0.17
115
+ threadpoolctl==3.5.0
116
+ tokenizers==0.21.0
117
+ toml==0.10.2
118
+ toolz==1.0.0
119
+ tornado==6.4.2
120
+ tqdm==4.67.1
121
+ typer==0.3.2
122
+ typing_extensions==4.12.2
123
+ tzdata==2024.2
124
+ tzlocal==5.2
125
+ unicodedata2==15.1.0
126
+ urllib3==2.3.0
127
+ validators==0.34.0
128
+ wasabi==0.10.1
129
+ weasel==0.4.1
130
+ wheel==0.44.0
131
+ wrapt==1.17.0
132
+ xyzservices==2024.9.0
133
+ zipp==3.21.0
134
+ zstandard==0.23.0
135
+ https://github.com/explosion/spacy-models/releases/download/en_core_web_md-3.0.0/en_core_web_md-3.0.0.tar.gz
space.yaml ADDED
@@ -0,0 +1 @@
 
 
1
+ sdk: docker