How to run custom action server for Rasa X?

Hello, I have installed Rasa X on a GCP VM by using the quick install script curl -s | sudo bash. Rasa X is running now and i want to run the custom actions as well but I am not sure how to. So , I would like to know how to do it. I’d be grateful if someone can give me a step by step guide on how to do it or to please drop a link to a tutorial if there is any. Thank you in advance.Please help.

  1. Build an Action Server Image by first creating a Dockerfile (see mine) in the root of the project:
FROM rasa/rasa-sdk:2.8.0
# or rasa/rasa-sdk:latest or any version you like

USER root
# Install requirements for actions code if necessary (uncomment next line)
# RUN pip install -r requirements-actions.txt
COPY ./actions /app/actions
USER 1001
  1. Create a repository on DockerHub (see mine)
  2. In the root of your project (and where the Dockerfile is), build your image:
docker build . -t <account_username>/<repository_name>:<custom_image_tag>

# For example:
# docker build . -t chrisrahme/fyp-chatbot:12345
  1. Push the image to DockerHub:
docker login --username <account_username> --password <account_password>
docker push <account_username>/<repository_name>:<custom_image_tag>

# For example:
# docker login --username chrisrahme --password p4ssw0rd
# docker push chrisrahme/fyp-chatbot:12345
  1. Customize your quick-install deployment with the Action Server Image name and tag:
export ACTION_SERVER_IMAGE="<account_username>/<repository_name>"
export ACTION_SERVER_TAG="<custom_image_tag>"

# For example:
# export ACTION_SERVER_IMAGE="chrisrahme/fyp-chatbot"
# export ACTION_SERVER_TAG="12345"
  1. Deploy again using quick-install:
curl -s | sudo -E bash

You have to repeat steps 3 to 6 every time you change your and want to deploy again. You can build a shell script that repeats all these steps instead of doing it manually.

It is not recommended to deploy on every little change. Once you finish testing locally, you can deploy.

If this helped you, mark it as solution for future readers. I also had difficulties understanding how to deploy the first time.

1 Like

Thank you for helping me. Thank you so much

1 Like

@Lin If Chris suggestion solved you issue please close this thread with the solution for other, thanks.

1 Like