Rasa and Rasa X compatibility issue

My FormAction is not working as expected when deployed on the server. I used the docker-compose method to install Rasa-X.

Hi, I am getting the following when I run docker-compose logs app at /etc/rasa.

Hey @Akhil

First, as the logs say, you’re using possibly incompatible versions of Rasa SDK and Rasa Open Source.

I assume, the bot was working correctly locally? How exactly did you deploy it?

Hi @degiz. I updated Rasa X from 0.30.1 to 0.31.5 and I didn’t get the warning when I ran docker-compose logs app. I assumed the issue is fixed.

But today, I had a change in my custom actions. So, I made the changes in /etc/<project_name>/actions/actions.py and ran these two commands docker-compose down & docker-compose up -d

After that, when I ran docker-compose logs app I am getting the compatibility issue warning message again. If there is a change in the actions.py file, is it enough to run only docker-compose up -d?

Hey @Akhil

Depending on the Dockerfile you’ve used, it might be necessary to rebuild the action server image. For example, if your Dockerfile has this line:

# Copy actions code to working directory
COPY ./actions /app/actions

… then it simply copies the code once, during the build of the image.

Hi @degiz. This is the content of my Dockerfile

# Extend the official Rasa SDK image
FROM rasa/rasa-sdk:latest

# Change back to root user to install dependencies
USER root

# To install system dependencies
RUN apt-get update -qq && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# To install packages from PyPI
RUN pip install --no-cache-dir mysql-connector-python
RUN pip install --no-cache-dir PyYAML
RUN pip install --no-cache-dir pip install PyMySQL
RUN pip install --no-cache-dir pip install requests
# Switch back to non-root to run code
USER 1001

I didn’t include the COPY ./actions /app/actions command in my Dockerfile. Is it wrong to do so?

Hey @Akhil

So do you mount the folder with the actual python code then?

Hey @degiz. The folder actions contains the file actions.py

Hey @degiz. is this compatibilty issue because of this line FROM rasa/rasa-sdk:latest?

Hey @Akhil

Which command do use use to launch the docker container with the action server?

Hey @degiz, the very first time, I created a custom image by extending the official rasa/rasa-sdk:latest image and mentioned its path in docker-compose.override.yml

version: "3.4"
services:
  rasa-production:
    volumes:
      - './custom_connectors:/app/custom_connectors'
  rasa-worker:
    volumes:
      - './custom_connectors:/app/custom_connectors'
  app:
    image: 'rasa/rasa-sdk:my_custom_rasa_sdk'
    volumes:
      - './actions:/app/actions'
    expose:
      - '5055'
    depends_on:
      - rasa-production

After that, whenever I have a change in actions.py , I do the following 3 steps.

  1. I make changes in the /etc/rasa/actions/actions.py
  2. docker-compose down
  3. docker-compose up -d

Hey @Akhil

That looks good to me. The only thing that is worries me is the fact that your SDK version and Rasa Open Source versions are different.

Could you please rebuild your SDK image not from the latest, but from fixed version, e.g. 1.10.8?

Hey @degiz. I rebuild the SDK image from rasa/rasa-sdk:1.10.2 following the updated docs. I see no issues now. Thank you for your time.

1 Like