- Go to https://console.cloud.google.com/
- Sign in with .edu
- Activate Google Cloud $300 credit (requires credit card but no autocharge)
- Click on the project select button right next to the "Google Cloud Platform" logo in the upper left
- Select "New Project" in the upper right of the pop up
- Create a new project called rasa
- On the sidebar select Compute Engine -> VM Instances
- Create VM instance:
- Machine type set to n1-standard-4(4 vCPU, 15 GB memory)
- Change Boot Disk Image to 100 GB Ubuntu 18.02
- Create instance
- Click on ssh button for instance
- git clone https://github.com/vladov3000/rasa-tutorial.git
- cd rasa-tutorial
- sudo apt-get update
- sudo apt install python3-pip
- pip3 install --upgrade pip
- pip3 install rasa==1.10.2
- ls /home
- export PATH=$PATH:/home/$USERNAMEHERE/.local/bin
- rasa train
- tmux (ctrl B, C to create window ctrl B, 1 to switch to window 1)
- rasa run actions (in seperate window)
- rasa shell
- sudo apt-get install nginx
- sudo apt install docker.io
- sudo apt install docker-compose
- sudo groupadd docker
- sudo usermod -aG docker $USER
- newgrp docker
- docker login
- sudo service nginx start
- sudo service docker start
- sudo apt-get install snapd
- sudo apt-get remove certbot
NOTE: make sure to allow HTTP and HTTPS traffic to VM. - docker build -t rasa/actions -f Dockerfile.actions .
- docker-compose up
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
chmod +x ./kubectl
sudo mv ./kubectl /usr/local/bin/kubectl
kubectl version --client
curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 \ && chmod +x minikube
sudo mkdir -p /usr/local/bin/
sudo install minikube /usr/local/bin/`
minikube start --driver=docker
kubectl get nodes
curl -L https://github.com/kubernetes/kompose/releases/download/v1.21.0/kompose-linux-amd64 -o kompose
chmod +x kompose
sudo mv ./kompose /usr/local/bin/kompose
kompose convert --volumes hostPath -o kuberes
sed -ri "s/extensions\/v1beta1/networking.k8s.io\/v1/" kuberes/rasa-network-networkpolicy.yaml
sudo docker build -t rasa/train -f Dockerfile.train .
docker save rasa/actions | pv | (eval $(minikube docker-env) && docker load)
docker save rasa/train | pv | (eval $(minikube docker-env) && docker load)
kubectl create configmap action-config --from-file=actions
kubectl get configmap action-config -o yaml > kuberes/action-config.yml
kubectl create configmap nginx-config --from-file=nginx/conf
kubectl get configmap nginx-config -o yaml > kuberes/nginx-config.yml
sudo kubectl create configmap nginx-cert-config --from-file nginx/certs/
(Fix rasa-action-deploy to use config map instead of persistent volume)
kubectl apply -f kuberes
kubectl get pods
sudo kubectl port-forward nginx-745d76696b-tv98m 80:80
sudo kubectl proxy --port=80
Enviroment setup:
Ubuntu 18
python version: 3.6.9
pip version: 20.1.2
rasa == 1.10.2
Or use virtual env (you will have to be source for every tmux window):
python3 -m venv ./venv
source /venv/bin/activate
pip install -r requirements.txt
To run rasa with command line shell:
rasa train
rasa run actions (in seperate window)
rasa shell
To run tests:
rasa test --stories tests/conversation_tests.md