project-kb
project-kb copied to clipboard
backend container fails, missing spacy language model
The backend container fails with this message:
Traceback (most recent call last):
File "main.py", line 11, in <module>
from api.routers import jobs, nvd, preprocessed, users
File "/app/api/routers/preprocessed.py", line 8, in <module>
from commitdb.postgres import PostgresCommitDB
File "/app/commitdb/postgres.py", line 13, in <module>
from datamodel.commit import Commit
File "/app/datamodel/commit.py", line 5, in <module>
from datamodel.nlp import (
File "/app/datamodel/nlp.py", line 9, in <module>
nlp = load("en_core_web_sm")
File "/usr/local/lib/python3.8/site-packages/spacy/__init__.py", line 54, in load
return util.load_model(
File "/usr/local/lib/python3.8/site-packages/spacy/util.py", line 436, in load_model
raise IOError(Errors.E050.format(name=name))
OSError: [E050] Can't find model 'en_core_web_sm'. It doesn't seem to be a Python package or a valid path to a data directory.
It seems like we forgot to download the spacy language model in the Dockerfile....