I’m searching how to install and use the spacy fr package with Rasa using Docker.
When i configure language = “fr” in config.yml file, and i run train, an error appear :
I’m using rasa/rasa:latest-full Docker image.
Thanks for help.
I’m searching how to install and use the spacy fr package with Rasa using Docker.
When i configure language = “fr” in config.yml file, and i run train, an error appear :
I’m using rasa/rasa:latest-full Docker image.
Thanks for help.
By default the docker image does not include the french spaCy models, only german and english. You could write your own Dockerfile, which will include the french spaCy models.
FROM python:3.6-slim as builder WORKDIR /build COPY . . RUN python setup.py sdist bdist_wheel RUN find dist -maxdepth 1 -mindepth 1 -name ‘*.tar.gz’ -print0 | xargs -0 -I {} mv {} rasa.tar.gz
FROM python:3.6-slim
SHELL ["/bin/bash", “-c”]
RUN apt-get update -qq &&
apt-get install -y --no-install-recommends
build-essential
wget
openssh-client
graphviz-dev
pkg-config
git-core
openssl
libssl-dev
libffi6
libffi-dev
libpng-dev
libpq-dev
curl &&
apt-get clean &&
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* &&
mkdir /install &&
mkdir /appWORKDIR /install
COPY alt_requirements/ ./alt_requirements COPY requirements.txt .
RUN pip install -r alt_requirements/requirements_pretrained_embeddings_spacy.txt
COPY --from=builder /build/rasa.tar.gz . RUN pip install ./rasa.tar.gz[sql,spacy]
RUN pip install https://github.com/explosion/spacy-models/releases/download/fr_core_news_sm-2.1.0/fr_core_news_sm-2.1.0.tar.gz#egg=fr_core_news_sm==2.1.0 --no-cache-dir > /dev/null
&& python -m spacy link fr_core_news_sm frCOPY sample_configs/config_pretrained_embeddings_spacy_de.yml /app/config.yml
VOLUME ["/app"] WORKDIR /app
EXPOSE 5005
ENTRYPOINT [“rasa”]
CMD ["–help"]
Thank for help, I will try this.
Your dockerfile doesn’t work.
The step 4 : “RUN python setup.py sdist bdist_wheel” return that the setup.py doesn’t exist.
I tried the dockerfile in RASA docker hub, but doesn’t work to(Docker Hub).
the step :
COPY README.md .
COPY setup.py .
COPY setup.cfg .
COPY MANIFEST.in .
COPY alt_requirements/ ./alt_requirements
COPY requirements.txt .
return that files doesn’t exist.
Are you running the Docker build process in the root directory of the Rasa github project?
I think i found my mistake. I forgot to clone github project. Now, it working. thks.