Hi,
I am trying to build a RASA (build from source) NLU in a base Python image, sharing Dockerfile
snippets below:
FROM python:3.8
RUN mkdir -p /app/nlu
WORKDIR /app/nlu
ENV VIRTUAL_ENV=/opt/venv
RUN python3 -m venv $VIRTUAL_ENV
ENV PATH="$VIRTUAL_ENV/bin:$PATH"
RUN apt-get update \
&& apt-get install -y curl git
# Install poetry & RASA from source
RUN python3 -m pip install --upgrade pip \
&& pip3 install poetry \
&& git clone https://github.com/RasaHQ/rasa.git \
&& cd rasa \
&& poetry install
# Install dependencies:
COPY . .
RUN pip3 install -r requirements.txt
RUN python3 -m spacy download en_core_web_sm
EXPOSE 5005
RUN rasa telemetry disable
CMD ["rasa", "run"]
During docker build
there are no issues.
Whereas, while doing docker run
, I get the model not loading problem.
2021-07-30 17:04:56 INFO root - Starting Rasa server on http://localhost:5005
2021-07-30 17:04:56 INFO rasa.model - Loading model models/20210730-194259.tar.gz...
2021-07-30 17:04:57 ERROR rasa.core.agent - Could not load model due to unsupported operand type(s) for +=: 'NoneType' and 'int'.
/app/nlu/rasa/rasa/shared/utils/io.py:97: UserWarning: The model at 'models' could not be loaded. Error: <class 'TypeError'>: unsupported operand type(s) for +=: 'NoneType' and 'int'
/app/nlu/rasa/rasa/shared/utils/io.py:97: UserWarning: Agent could not be loaded with the provided configuration. Load default agent without any model.
2021-07-30 17:04:57 INFO root - Rasa server is up and running.