Hi,
I am deploying my agent via Rasa open source and docker-compose. I have two Dockerfiles, one for the action server and one for the rasa server. Now I want to add spacy for the French language and am not sure how to accomplish that. Am I correct that I need to add the installation of spacy to the Dockerfile for the rasa server? That Dockerfile currently looks like this:
FROM python:3.8
USER root
COPY requirements.txt .
RUN pip install -r requirements.txt
USER 1001
WORKDIR /app
COPY . /app
ENTRYPOINT ["rasa", "run", "--enable-api"]
Now I added the following lines in the Dockerfile (after the line about installing requirements):
RUN python -m spacy download fr_core_news_lg
RUN python -m spacy link fr_core_news_lg fr
And I also added spacy to my requirements.txt file. I tried both simply adding “spacy” as a requirement after my Rasa requirement and using “rasa[spacy]==2.8.3”.
But now I still get the following error when running docker-compose up:
rasa_server_1 | 2022-01-26 17:22:02 INFO root - Starting Rasa server on http://localhost:5005
rasa_server_1 | 2022-01-26 17:22:02 INFO rasa.model - Loading model models/20220126-170257.tar.gz...
rasa_server_1 | 2022-01-26 17:22:04 ERROR rasa.core.agent - Could not load model due to Not all required importable packages are installed to use the configured NLU pipeline. To use this pipeline, you need to install the missing modules:
rasa_server_1 | - spacy (needed for rasa.nlu.utils.spacy_utils.SpacyNLP)
rasa_server_1 | Please install the packages that contain the missing modules..
rasa_server_1 | /usr/local/lib/python3.8/site-packages/rasa/shared/utils/io.py:97: UserWarning: The model at 'models' could not be loaded. Error: <class 'rasa.exceptions.MissingDependencyException'>: Not all required importable packages are installed to use the configured NLU pipeline. To use this pipeline, you need to install the missing modules:
rasa_server_1 | - spacy (needed for rasa.nlu.utils.spacy_utils.SpacyNLP)
rasa_server_1 | Please install the packages that contain the missing modules.
rasa_server_1 | /usr/local/lib/python3.8/site-packages/rasa/shared/utils/io.py:97: UserWarning: Agent could not be loaded with the provided configuration. Load default agent without any model.
It would be great if somebody could explain to me what I am missing here. Everything worked fine before I trained my model by also using spacy. Everything also works fine locally without docker.
Thanks a lot in advance!