Best way to handle spacy models with docker


By default, the rasa/rasa:lastest-full comes with preloaded en and de (by the way, an empty spacy release would fit me better I think) but what is the best way to use additional languages ? Creating a docker file extending the image linking the new word embeddings ?

If possible, I would like the solution to be dynamic and with a lightweight base image. Any idea ?

Thank you !Pierre

Hi PierreFG, I’m using a Spanish spacy model, and I include the following lines in my Dockerfile to customize it.

RUN python -m pip install -r requirements.txt && \
    python -m spacy download es_core_news_sm && \
    python -m spacy link es_core_news_sm es