Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add files via upload #4

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 24 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,37 @@ FROM rasa/rasa-sdk:3.1.3
# Use subdirectory as working directory
WORKDIR /app

# Copy any additional custom requirements, if necessary (uncomment next line)
# COPY actions/requirements-actions.txt ./
# Create a cache directory for Hugging Face transformers
RUN mkdir -p /app/huggingface_cache
ENV HF_HOME=/app/huggingface_cache

# Set permissions for the cache directory
RUN chown -R 1001 /app/huggingface_cache
RUN chmod -R 777 /app/huggingface_cache

# Change back to root user to install dependencies
USER root

RUN mkdir -p /.cache
RUN chown -R 1001:1001 /.cache
RUN chmod -R 777 /.cache

# Copy any additional custom requirements, if necessary
COPY actions/requirements-actions.txt ./

# Install extra requirements for actions code, if necessary (uncomment next line)
# RUN pip install -r requirements-actions.txt
RUN pip install --upgrade pip
RUN pip install --upgrade typing_extensions
RUN pip install -r requirements-actions.txt


# Copy actions folder to working directory
COPY ./actions /app/actions
COPY ./mydata /app/mydata
COPY ./records /app/records


RUN chmod -R 777 /app/mydata

# By best practices, don't run the code with root user
USER 1001
USER 1001
810 changes: 781 additions & 29 deletions actions/actions.py

Large diffs are not rendered by default.

29 changes: 29 additions & 0 deletions actions/actions1.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This files contains your custom actions which can be used to run
# custom Python code.
#
# See this guide on how to implement these action:
# https://rasa.com/docs/rasa/custom-actions


# This is a simple example for a custom action which utters "Hello World!"

from typing import Any, Text, Dict, List

from rasa_sdk import Action, Tracker
from rasa_sdk.executor import CollectingDispatcher


class ActionHelloWorld(Action):

def name(self) -> Text:
return "action_hello_world"

def run(self, dispatcher: CollectingDispatcher,
tracker: Tracker,
domain: Dict[Text, Any]) -> List[Dict[Text, Any]]:

dispatcher.utter_message(text="Hello World!")
#dispatcher.utter_message(text="Hello back!")

return []

5 changes: 5 additions & 0 deletions actions/requirements-actions.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
sentence-transformers
pandas
tqdm
numpy
openpyxl==3.1.2
8 changes: 8 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: '3.7'
services:
rasax-deployment-guide:
build: .
# tag it with the registry of microk8s
image: localhost:32000/rasax-deployment-guide:0.0.1
expose:
- "5055"
Binary file added mydata/BASE8RGPH24V4_all_18_12_ID.xlsx
Binary file not shown.
Binary file added mydata/BASE8RGPH24V5_all_08_01_ID.xlsx
Binary file not shown.
4 changes: 1 addition & 3 deletions rasax/basic-values.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ nginx:
enabled: true
# connect LoadBalancer directly to VMs' internal IP
# You get this value with: $ hostname -I
externalIPs: [YOUR.SERVERS.IP.ADDRESS]
externalIPs: [35.188.219.145]

rasax:
# initialUser is the user which is created upon the initial start of Rasa X
Expand Down Expand Up @@ -53,5 +53,3 @@ global:
redis:
# password to use in case there no external secret was provided
password: "AnotherSecureRandomString"
app:
install: false
18 changes: 9 additions & 9 deletions rasax/tls-values-with-actions.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
# debugMode enables / disables the debug mode for Rasa and Rasa X
debugMode: true
nginx:
enabled: true
subPath: "/rasax"
# enabled: true
# subPath: "/rasax"
#customConfConfigMap: "custom-nginx-conf"
#certificateSecret: "rasa-webservice-ingress-tls"
service:
enabled: true
# connect LoadBalancer directly to VMs' internal IP
# You get this value with: $ hostname -I
externalIPs: [YOUR.SERVERS.IP.ADDRESS]
externalIPs: [35.226.208.22]

rasax:
# initialUser is the user which is created upon the initial start of Rasa X
Expand All @@ -24,10 +24,10 @@ rasax:
jwtSecret: "AnotherSecureRandomString"
# tag refers to the Rasa X image tag
tag: "1.1.4"
extraEnvs:
- name: ROOT_URL
#value: "localhost/rasa-x"
value: "https://EXAMPLE.COM/rasax"
#extraEnvs:
# - name: ROOT_URL
# #value: "localhost/rasa-x"
# value: "http://35.226.208.22/rasax"
rasa:
# token Rasa accepts as authentication token from other Rasa services
token: "AnotherSecureRandomString"
Expand Down Expand Up @@ -63,5 +63,5 @@ global:
password: "AnotherSecureRandomString"
app:
install: true
name: "<YOUR-DOCKER-HUB-USERNAME>/example-action-server"
tag: "<YOUR-DOCKER-HUB-IMAGE-TAG>"
name: "localhost:32000/rasax-deployment-guide"
tag: "0.0.1"