Adding tensorflow_text dependency to helm chart

$ kubectl --namespace rasa logs <podname>

2020-04-18 18:22:25 ERROR    rasa.core.agent  - An exception was raised while fetching a model. Continuing anyways...
Traceback (most recent call last):
  File "/opt/venv/lib/python3.6/site-packages/rasa/core/", line 203, in _run_model_pulling_worker
    await _update_model_from_server(model_server, agent)
  File "/opt/venv/lib/python3.6/site-packages/rasa/core/", line 125, in _update_model_from_server
    _load_and_set_updated_model(agent, model_directory, new_model_fingerprint)
  File "/opt/venv/lib/python3.6/site-packages/rasa/core/", line 86, in _load_and_set_updated_model
    interpreter = RasaNLUInterpreter(model_directory=nlu_path)
  File "/opt/venv/lib/python3.6/site-packages/rasa/core/", line 274, in __init__
  File "/opt/venv/lib/python3.6/site-packages/rasa/core/", line 297, in _load_interpreter
    self.interpreter = Interpreter.load(self.model_directory)
  File "/opt/venv/lib/python3.6/site-packages/rasa/nlu/", line 301, in load
    return Interpreter.create(model_metadata, component_builder, skip_validation)
  File "/opt/venv/lib/python3.6/site-packages/rasa/nlu/", line 323, in create
  File "/opt/venv/lib/python3.6/site-packages/rasa/nlu/", line 59, in validate_requirements
    f"Not all required importable packages are installed. "
Exception: Not all required importable packages are installed. To use this pipeline, you need to install the missing dependencies. Please install the package(s) that contain the module(s): tensorflow_text

pip install rasa[convert] solves the problem on my local dev machine, but how do I add the dependency to the helm chart?

I tried:

  initFile: |-
    pip install rasa[convert]

In values.yaml but that didn’t work.


For now I solved the problem by building my own image like this:

diff --git a/Dockerfile b/Dockerfile
index 936c3bd0718..f01a2507d45 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -40,7 +40,7 @@ WORKDIR /build
 RUN python -m venv /opt/venv && \
   . /opt/venv/bin/activate && \
   pip install --no-cache-dir -U 'pip<20' && \
-  poetry install --no-dev --no-root --no-interaction && \
+  poetry install --no-dev --no-root --no-interaction -E full && \
   poetry build -f wheel -n && \
   pip install --no-deps dist/*.whl && \
   rm -rf dist *.egg-info

Then I built the image with docker build . -t cck197/rasa:rasa-1.9.5 and pushed it docker push cck197/rasa:rasa-1.9.5 then in values.yaml:

   # name of the Rasa image to use
-  name: "rasa/rasa"
+  name: "cck197/rasa"
   # tag refers to the Rasa image tag
-  tag: "1.9.5"  # Please check the README to see all locations which have to be updated for a rasa release)
+  tag: "rasa-1.9.5"