switch from spacy to stanza for compatibility
Browse files- Dockerfile +6 -4
- requirements.txt +0 -195
Dockerfile
CHANGED
@@ -9,16 +9,18 @@ COPY ./new_requirements.txt /code/new_requirements.txt
|
|
9 |
RUN pip install --no-cache-dir --upgrade -r /code/new_requirements.txt
|
10 |
|
11 |
# Install spaCy model
|
12 |
-
RUN python -m spacy download en_core_web_sm
|
13 |
|
14 |
# Patch SpaCy to use Pydantic v1 in case v2 is installed
|
15 |
-
RUN sed -i 's/from pydantic import ConstrainedStr/from pydantic.v1 import ConstrainedStr/' \
|
16 |
-
|
17 |
|
18 |
|
19 |
# Install Pydantic v1 and SpaCy explicitly to prevent version conflicts
|
20 |
# RUN pip install pydantic==1.10.12 spacy==3.5.3
|
21 |
-
RUN pip install pydantic==1.10.12
|
|
|
|
|
22 |
|
23 |
# Copy the local en_core_web_sm-3.0.0.tar.gz file into the container
|
24 |
# COPY ./en_core_web_sm-3.0.0.tar.gz /models/en_core_web_sm-3.0.0.tar.gz
|
|
|
9 |
RUN pip install --no-cache-dir --upgrade -r /code/new_requirements.txt
|
10 |
|
11 |
# Install spaCy model
|
12 |
+
# RUN python -m spacy download en_core_web_sm
|
13 |
|
14 |
# Patch SpaCy to use Pydantic v1 in case v2 is installed
|
15 |
+
# RUN sed -i 's/from pydantic import ConstrainedStr/from pydantic.v1 import ConstrainedStr/' \
|
16 |
+
# /usr/local/lib/python3.10/site-packages/spacy/schemas.py
|
17 |
|
18 |
|
19 |
# Install Pydantic v1 and SpaCy explicitly to prevent version conflicts
|
20 |
# RUN pip install pydantic==1.10.12 spacy==3.5.3
|
21 |
+
# RUN pip install pydantic==1.10.12
|
22 |
+
|
23 |
+
RUN pip install stanza==1.9.2
|
24 |
|
25 |
# Copy the local en_core_web_sm-3.0.0.tar.gz file into the container
|
26 |
# COPY ./en_core_web_sm-3.0.0.tar.gz /models/en_core_web_sm-3.0.0.tar.gz
|
requirements.txt
DELETED
@@ -1,195 +0,0 @@
|
|
1 |
-
aiohappyeyeballs==2.4.0
|
2 |
-
aiohttp==3.10.5
|
3 |
-
aiosignal==1.3.1
|
4 |
-
annotated-types==0.7.0
|
5 |
-
anyio==4.4.0
|
6 |
-
appnope==0.1.4
|
7 |
-
argon2-cffi==23.1.0
|
8 |
-
argon2-cffi-bindings==21.2.0
|
9 |
-
arrow==1.3.0
|
10 |
-
asttokens==2.4.1
|
11 |
-
async-lru==2.0.4
|
12 |
-
attrs==24.2.0
|
13 |
-
babel==2.16.0
|
14 |
-
beautifulsoup4==4.12.3
|
15 |
-
bleach==6.1.0
|
16 |
-
blinker==1.8.2
|
17 |
-
blis==0.7.11
|
18 |
-
catalogue==2.0.10
|
19 |
-
certifi==2024.8.30
|
20 |
-
cffi==1.17.0
|
21 |
-
charset-normalizer==3.3.2
|
22 |
-
click==8.1.7
|
23 |
-
cloudpathlib==0.19.0
|
24 |
-
comm==0.2.2
|
25 |
-
confection==0.1.5
|
26 |
-
contourpy==1.3.0
|
27 |
-
cycler==0.12.1
|
28 |
-
cymem==2.0.8
|
29 |
-
datasets==2.21.0
|
30 |
-
debugpy==1.8.5
|
31 |
-
decorator==5.1.1
|
32 |
-
defusedxml==0.7.1
|
33 |
-
dill==0.3.8
|
34 |
-
executing==2.0.1
|
35 |
-
fastai==2.7.17
|
36 |
-
fastbook==0.0.29
|
37 |
-
fastcore==1.7.3
|
38 |
-
fastdownload==0.0.7
|
39 |
-
fastjsonschema==2.20.0
|
40 |
-
fastprogress==1.0.3
|
41 |
-
filelock==3.15.4
|
42 |
-
Flask==3.0.3
|
43 |
-
fonttools==4.53.1
|
44 |
-
fqdn==1.5.1
|
45 |
-
frozenlist==1.4.1
|
46 |
-
fsspec==2024.6.1
|
47 |
-
graphviz==0.20.3
|
48 |
-
h11==0.14.0
|
49 |
-
httpcore==1.0.5
|
50 |
-
httpx==0.27.2
|
51 |
-
huggingface-hub==0.24.6
|
52 |
-
idna==3.8
|
53 |
-
iniconfig==2.0.0
|
54 |
-
ipykernel==6.29.5
|
55 |
-
ipython==8.27.0
|
56 |
-
ipython-genutils==0.2.0
|
57 |
-
ipywidgets==7.8.3
|
58 |
-
isoduration==20.11.0
|
59 |
-
itsdangerous==2.2.0
|
60 |
-
jedi==0.19.1
|
61 |
-
Jinja2==3.1.4
|
62 |
-
joblib==1.4.2
|
63 |
-
json5==0.9.25
|
64 |
-
jsonpointer==3.0.0
|
65 |
-
jsonschema==4.23.0
|
66 |
-
jsonschema-specifications==2023.12.1
|
67 |
-
jupyter-events==0.10.0
|
68 |
-
jupyter-lsp==2.2.5
|
69 |
-
jupyter_client==8.6.2
|
70 |
-
jupyter_core==5.7.2
|
71 |
-
jupyter_server==2.14.2
|
72 |
-
jupyter_server_terminals==0.5.3
|
73 |
-
jupyterlab==4.2.5
|
74 |
-
jupyterlab_pygments==0.3.0
|
75 |
-
jupyterlab_server==2.27.3
|
76 |
-
jupyterlab_widgets==1.1.9
|
77 |
-
kaggle==1.6.17
|
78 |
-
kiwisolver==1.4.5
|
79 |
-
langcodes==3.4.0
|
80 |
-
language_data==1.2.0
|
81 |
-
marisa-trie==1.2.0
|
82 |
-
markdown-it-py==3.0.0
|
83 |
-
MarkupSafe==2.1.5
|
84 |
-
matplotlib==3.9.2
|
85 |
-
matplotlib-inline==0.1.7
|
86 |
-
mdurl==0.1.2
|
87 |
-
mistune==3.0.2
|
88 |
-
mpmath==1.3.0
|
89 |
-
multidict==6.0.5
|
90 |
-
multiprocess==0.70.16
|
91 |
-
murmurhash==1.0.10
|
92 |
-
nbclient==0.10.0
|
93 |
-
nbconvert==7.16.4
|
94 |
-
nbformat==5.10.4
|
95 |
-
nest-asyncio==1.6.0
|
96 |
-
networkx==3.3
|
97 |
-
nltk==3.8.1
|
98 |
-
notebook==7.2.2
|
99 |
-
notebook_shim==0.2.4
|
100 |
-
numpy==1.26.4
|
101 |
-
overrides==7.7.0
|
102 |
-
packaging==24.1
|
103 |
-
pandas==2.2.2
|
104 |
-
pandocfilters==1.5.1
|
105 |
-
parso==0.8.4
|
106 |
-
pathlib==1.0.1
|
107 |
-
pexpect==4.9.0
|
108 |
-
pillow==10.4.0
|
109 |
-
platformdirs==4.2.2
|
110 |
-
pluggy==1.5.0
|
111 |
-
preshed==3.0.9
|
112 |
-
prometheus_client==0.20.0
|
113 |
-
prompt_toolkit==3.0.47
|
114 |
-
psutil==6.0.0
|
115 |
-
ptyprocess==0.7.0
|
116 |
-
pure_eval==0.2.3
|
117 |
-
pyarrow==17.0.0
|
118 |
-
pycparser==2.22
|
119 |
-
pydantic==1.7.4
|
120 |
-
pydantic_core==2.20.1
|
121 |
-
Pygments==2.18.0
|
122 |
-
pyparsing==3.1.4
|
123 |
-
pytest==8.3.3
|
124 |
-
python-dateutil==2.9.0.post0
|
125 |
-
python-json-logger==2.0.7
|
126 |
-
python-slugify==8.0.4
|
127 |
-
pytz==2024.1
|
128 |
-
PyYAML==6.0.2
|
129 |
-
pyzmq==26.2.0
|
130 |
-
referencing==0.35.1
|
131 |
-
regex==2024.7.24
|
132 |
-
requests==2.32.3
|
133 |
-
rfc3339-validator==0.1.4
|
134 |
-
rfc3986-validator==0.1.1
|
135 |
-
rich==13.8.0
|
136 |
-
rpds-py==0.20.0
|
137 |
-
safetensors==0.4.4
|
138 |
-
scikit-learn==1.5.1
|
139 |
-
scipy==1.14.1
|
140 |
-
Send2Trash==1.8.3
|
141 |
-
sentencepiece==0.2.0
|
142 |
-
setuptools==75.1.0
|
143 |
-
shellingham==1.5.4
|
144 |
-
six==1.16.0
|
145 |
-
smart-open==5.2.1
|
146 |
-
sniffio==1.3.1
|
147 |
-
soupsieve==2.6
|
148 |
-
# spacy==3.5.0
|
149 |
-
# spacy==3.7.6
|
150 |
-
spacy==3.5.3
|
151 |
-
spacy-lookups-data==1.0.0
|
152 |
-
spacy-legacy==3.0.12
|
153 |
-
spacy-loggers==1.0.5
|
154 |
-
srsly==2.4.8
|
155 |
-
stack-data==0.6.3
|
156 |
-
sympy==1.13.2
|
157 |
-
terminado==0.18.1
|
158 |
-
text-unidecode==1.3
|
159 |
-
thinc==8.1.8
|
160 |
-
threadpoolctl==3.5.0
|
161 |
-
tinycss2==1.3.0
|
162 |
-
tokenizers==0.19.1
|
163 |
-
torch==2.4.0
|
164 |
-
torchaudio==2.4.0
|
165 |
-
torchvision==0.19.0
|
166 |
-
tornado==6.4.1
|
167 |
-
tqdm==4.66.5
|
168 |
-
traitlets==5.14.3
|
169 |
-
transformers==4.44.2
|
170 |
-
# typer==0.3.0
|
171 |
-
# typer==0.9.0
|
172 |
-
typer==0.*
|
173 |
-
types-python-dateutil==2.9.0.20240821
|
174 |
-
typing_extensions==4.12.2
|
175 |
-
tzdata==2024.1
|
176 |
-
uri-template==1.3.0
|
177 |
-
urllib3==2.2.2
|
178 |
-
wasabi==1.1.3
|
179 |
-
wcwidth==0.2.13
|
180 |
-
weasel==0.4.1
|
181 |
-
webcolors==24.8.0
|
182 |
-
webencodings==0.5.1
|
183 |
-
websocket-client==1.8.0
|
184 |
-
Werkzeug==3.0.3
|
185 |
-
wget==3.2
|
186 |
-
wheel==0.44.0
|
187 |
-
widgetsnbextension==3.6.8
|
188 |
-
wrapt==1.16.0
|
189 |
-
xxhash==3.5.0
|
190 |
-
yarl==1.9.6
|
191 |
-
# spacy[transformers]
|
192 |
-
# https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.0.0/en_core_web_sm-3.0.0.tar.gz
|
193 |
-
# spacy[en]==3.2.0
|
194 |
-
# en-core-web-sm==3.5.0
|
195 |
-
https://github.com/explosion/spacy-models/releases/download/en_core_web_sm-3.5.0/en_core_web_sm-3.5.0-py3-none-any.whl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|