Docker-compose rasa-X, where are rasa repository files located?

Hello,

I am trying to setup rasa-x using docker-compose in AWS EC2, I have a few questions. When we link the rasa-X to Github repository, it gets all the relevant files. does rasa-X pull those files, if yes, where does it keep them?

I had custom actions in the git repository. but I think that did not get pickup up, when I ran “docker-compose up”. I had to create actions folder and then create “docker-compose.override.yml”, and then docker container for "rasa/rasa-sdk is created. Is it expected?

Following above steps, I created custom actions helper file, which was using pandas and other libraries. The action server failed to run, complaining unavailability of those libraries, I tried to “pip install” those libraries, but the issue continued? Do I need to install those library somewhere else?

I made some local changes to rasa lookup table and nlu, created a model and uploaded to rasa-X server, does it matter if the nlu file on rasa-X is missing those changes?

Thank you,

Partial Solution:

  1. HOW TO CONNECT RASA X TO ACTION SERVER | DEPLOYMENT OF RASA CHATBOT ON MICROSOFT AZURE | PART - 4 - YouTube
  2. HOW TO LINK ACTION SERVER AND RASA SERVER USING DOCKER - YouTube
  3. PART 3 | DEPLOY ACTION SERVER WITH RASA X | GOOGLE CLOUD PLATFORM | RASA X - YouTube
1 Like

Thank you, those links were very useful.

@ashek1520 Hello, these are really good questions and I can help you in some:

Well, recently I have created the complete CI/CD pipeline using VS+Github, Github Actions (for creating action_server image) + pushing image to docker hub+ pulling it from docker-compose on server side. So, basically when you linked Rasa X with Github repository copy all the files what ever is push to github, but not take into consider of actions.py file as for that you need to spin the action_server image as you already seen on the rasa doc. Furthere, when you spin the sudo docker-compose down && docker-compose up -d it take every files into consideration such as nlu, stories,domain etc except action_server, if you have seen while using docker ps you will see the default demo image for action server is running on port 5055, and you can talk to bot the general conversation after you trained the model, but nothing related to custom action code.

Yeps, as already mentioned above it will not take into consideration: When you update the docker-compose.overide.yml for your dockerhub action_server image and you even mentioned the volume you will even not see any data, this is because its dedicately running on action_server container on port 5055 which you had mentioned in docker overide yml. If you action_server image is running and you want to copy the data from container to working directory i.e /etc/rasa or whatever path you mentioned you need to manually run the copy command: docker cp <container ID or name>:"/app" "." and you will able to see the data of container :slight_smile:

When you create the action_server image for docker hub, I guess you have created the Dockerfile for the same and inside that folder you need to mentioned all the requirements.txt, so that when the container is spin up, it will install all the required libraries, packages etc. What ever required files for actions.py

Tip: If you will have any issues with actions_server like code or missing libraries you will see the code existed 1 or 0 or actions_server port 5055 restarting and you will not able to chat with chatbot based on custom action code you writtten.

This point not cleared to me, if you updated on Rasa X then you need to trained the model and if you have updated on using VS code and pushhing then still you need to run the model, because previous model dont have that imformation.

It can be bit confusing, but I tried my level best to guide you well.

Major Tip: If you see permision denied error, or root access issue, just mentin user: root in docker.compose.ooverride.yml

I hope this will help you, to solve your issue if issue persist still. Good Luck!

1 Like

Thank you Nimit for answering in details. Very useful. About

I made some local changes to rasa lookup table and nlu, created a model and uploaded to rasa-X server, does it matter if the nlu file on rasa-X is missing those changes?

I think I know the answer, my question was: Say I have made a few changes in Rasa locally (lookup table, nlu.yml) and rained it. I copied the newly created model file to Rasa-X setup in the cloud. The Rasa-X setup in the cloud does not have those changes. When I run Rasa-X in the cloud using the model, will Rasa use the changes I had made locally. In other words once a model is loaed, does Rasa depend on raw files, such as lookup, nlu.yml? From my understanding, it should not. Rasa model should not depend on the raw files.

@ashek1520 Ok, I Partially understand, but I guess rasa is depends on everything which is related to the model. If you are only using NLU and Core then case can be different, but if you are using custom actions then for sure it required everything no doubt. For example: In my use case I am fetching the response from .csv and creating the training examples from .csv to .yml. So, If model is trained but it required some file then??

If the previous post helped solve your issue please close this thread as solution for others.

@nik202 I have custom actions, but that does not rely on the lookup for now, but I understand that action server needs all the relevant files together. But this is not a critical requirement for me, others were, which you solved :).

@ashek1520 Nice, no worries. Good Luck Abhishek for your project.

1 Like