rasa train --domain domain-grp/
rasa shell
rasa run -m models --enable-api --cors "*"
If it gives error port 5005 already in use check with
-
docker ps
if your conatiner is running if yes stop it and if no container is running and it is still saying the same.
-
rasa run -m models --enable-api --cors "*" -p [ port-number ]
and also make sure that this port number is also present in IDP.html in socketUrl : [ ip-address ]: [ port-number ]
you can replace sahib-bot-idp with your bot name
docker build -t sahib-bot-idp .
docker run -it -p 5005:5005 sahib-bot-idp:latest
If it gives an error port 5005 already in use
docker run -it -p [ port-number]:5005 sahib-bot-idp:latest
This will map your localhost [ port-number ] to 5005 and that 5005 port is used by docker container But make sure that this port number is also present in IDP.html in socketUrl : [ localhost ]: [ port-number ]
docker run -it --workdir /app sahib-bot-idp bash ./scripts/start_shell.sh
docker stop <container-id>
docker image rm -f sahib-bot-idp:latest
To connect rasa x to Github via UI RASA X expects files to be of same structure as we get after
rasa init
Prerequisites for making build-domain.py file
pip3 install HiYaPyCo
Means it does not support multiple domain files But What we have done is we have written a script build-domain.py and gave it path of all domain files so what it does is it takes all domain files combines them to make domain.yml so that we can connect RASA X to github via UI.
Now whenever we make multiple domain files before every re training run
python3 build-domain.py
rasa train
rasa train --domain domain-grp/
Use step 1,2,3,4 from below link
https://rasa.com/docs/rasa-x/installation-and-setup/install/docker-compose/
-
After connecting rasa x to github ( considering we have made file structure same as rasa init) because then only rasa x connects to github.
-
cd /etc/rasa/
-
sudo docker-compose down
-
Make changes to credentials.yml
-
sudo docker-compose up -d
-
Open the [ Ip-address ] your RASA x is working
-
Made an Folder in server
-
Installed rasa (rasa 2.6.0)
pip3 install -U pip pip3 install rasa
-
git pull from repo to get the latest code
-
rasa train
-
Open html file where you embedded the script from here ( any html file that can be present locally can be used just make sure 1. In socketUrl : [ ip-address]:5005 of server )
-
Make sure the port you are mentioning is open ( from Server UI you can do this ) ( In our case we had to manually to open port 5005 from Azure server because rasa by default runs on port 5005 )
-
rasa run -m models --enable-api --cors "*"
or -
docker build -t sahib-bot-idp .
8.a docker run -it -p 5005:5005 sahib-bot-idp:latest
-
lsof -i:5005
( to see which service is running on port 5005 and what is the PID) -
kill $(lsof -t -i:5005) or kill -9 $(lsof -t -i:5005)
-
cd /etc/rasa/
-
sudo docker-compose down
sudo apt-get update
sudo apt-get install software-properties-common
sudo add-apt-repository universe
sudo add-apt-repository ppa:certbot/certbot
sudo apt-get update
sudo apt-get install certbot
-
sudo certbot certonly -d [ domain name ].
1.a Example --->
sudo certbot certonly -d chatbot.idp.tatrasdata.com
-
cd /etc/letsencrypt/archive/<domain name>/
Copy the certificates files :- Example ( copying certificates from /etc to inside our chatbot)
-
cp /etc/letsencrypt/archive/chatbot.idp.tatrasdata.com/ /home/idp-chat/idp_chatbot/certs
-
Give Permissions to files ( Go to path where they are copied in chatbot)
chmod +rwx cert1.pem fullchain1.pem privkey1.pem chain1.pem
-
Give access of running command to User
Example --->
sudo chown -R chatbotadmin .
( It means give running access to username =chatbotadmin)
Make changes to HTML we will run in Browser set it's socketurl with DOMAIN NAME you BOUGHT
socketUrl: "https://chatbot.idp.tatrasdata.com:5005",
- Command to Run Chatbot having SSL
rasa run --ssl-certificate ./certs/chatbot.idp.tatrasdata.com/cert1.pem --ssl-keyfile ./certs/chatbot.idp.tatrasdata.com/privkey1.pem -m models --enable-api --cors "*"
sudo docker system prune --volumes -a
or
sudo docker system prune
-
Have to solve the issue of chatbot giving False Positives ( Menas correct answer for wrong answer)
-
Permission error ( How to save model after training from docker image itself --if possible )
cd /etc/rasa
sudo docker-compose down
sudo docker-compose up
If you see this https://forum.rasa.com/t/the-answers-of-bot-dont-appear-on-rasa-x/41000/8
sudo docker system prune --all
sudo docker system prune -a --volumes
sudo docker volume prune -f
sudo docker image prune -a
fo any help related to above commands
- https://docs.docker.com/engine/reference/commandline/system_prune/
- https://docs.docker.com/config/pruning/
CLear RAM
1. ``` sync; echo 3 | sudo tee /proc/sys/vm/drop_caches ```
2. sync; echo 2 | sudo tee /proc/sys/vm/drop_caches
Now sudo docker-compose down
and then again sudo docker-compose up -d
- You have added all response selectors
- Made changes for those repsonse selectors in rules and config file
- WHen we press rasa train make sure all retrieval intents are present
TO check which files are consuming how much space
https://www.hostinger.in/tutorials/vps/how-to-check-and-manage-disk-space-via-terminal
Then you will have to give More space to you VM