Skip to content

Commit

Permalink
Merge pull request #101 from lappis-unb/devel
Browse files Browse the repository at this point in the history
Boilerplate V1.0
  • Loading branch information
arthurTemporim authored Oct 21, 2019
2 parents 44ca3a7 + 1c3cb03 commit f692538
Show file tree
Hide file tree
Showing 58 changed files with 1,740 additions and 2,529 deletions.
46 changes: 11 additions & 35 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,47 +1,27 @@
### Rasa ###
bot/models
rasa_core.log
errors.json

### Rasa visualize ###
graph.html

### Rasa evaluation ###
.ipynb_checkpoints/
notebooks/models/
notebooks/errors.json
notebooks/lab/
notebooks/evaluate-intents.ipynb
notebooks/stories/failed_stories.md
notebooks/stories/matrix.pdf
notebooks/stories/chat_graph.html
modules/notebooks/intents/confmat.png
modules/notebooks/intents/hist.png
modules/notebooks/intents/models/
modules/notebooks/intents/errors.json
bot/.ipython/
bot/.keras/
bot/.local/
bot/work
bot/results/

### Jupyter Notebooks ###
notebooks/intents/evaluate-intents.ipynb
notebooks/intents/errors.json
notebooks/intents/reports/
notebooks/intents/hist.png
notebooks/intents/confmat.png

notebooks/stories/models
notebooks/stories/errors.json
notebooks/stories/img
notebooks/stories/results/
notebooks/stories/matrix.pdf

### Rocketchat ###
/data
uploads


### database
web/postegres-data
### database ###
db/

### PyCharm ###
.idea/

# Created by https://www.gitignore.io/api/vim,linux,macos,python

### Linux ###
*~

Expand Down Expand Up @@ -165,7 +145,6 @@ celerybeat-schedule.*
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
Expand Down Expand Up @@ -198,6 +177,3 @@ tags

# End of https://www.gitignore.io/api/vim,linux,macos,python

models/dialogue/

models/nlu/current/
4 changes: 4 additions & 0 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
image: python:3.6-slim

before_script:
- apt-get update --yes
- apt-get install gcc

variables:
BOT_IMAGE: $DOCKERHUB_USER/bot
COACH_IMAGE: $DOCKERHUB_USER/coach
Expand Down
77 changes: 44 additions & 33 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,54 +1,65 @@
build-requirements:
docker build . -f docker/requirements.Dockerfile -t lappis/botrequirements:boilerplate

build-coach:
docker-compose build coach
current_dir := $(shell pwd)

build-bot:
docker-compose build bot
############################## BOILERPLATE ##############################
first-run:
make build
make run-webchat

build:
make build-requirements
make build-coach
make build-bot

first-run:
make build
make run-console
build-requirements:
docker build . -f docker/requirements.Dockerfile -t botrequirements

train:
docker build . -f docker/coach.Dockerfile -t lappis/coach:boilerplate
build-bot:
docker-compose build bot

build-coach:
docker-compose up coach

run-rabbitmq:
build-analytics:
docker-compose up -d elasticsearch
docker-compose up -d rabbitmq
docker-compose up -d rabbitmq-consumer
make train
docker-compose up -d kibana
# This sleep time is a work arround the main objetive is run the following command when elasticsearch is ready
# The following command is needed just once for project. It's just a setup onfiguration script.
sleep 30
docker-compose run --rm -v $(current_dir)/modules/analytics/setup_elastic.py:/analytics/setup_elastic.py bot python /analytics/setup_elastic.py
docker-compose run --rm -v $(current_dir)/modules/analytics/:/analytics/ bot python /analytics/import_dashboards.py
echo "Não se esqueça de atualizar o arquivo endpoints.yml"
sensible-browser --no-sandbox http://localhost:5601

run-elasticsearch:
run-analytics:
docker-compose up -d rabbitmq
docker-compose up -d rabbitmq-consumer
docker-compose up -d elasticsearch
docker-compose run --rm -v ${CURDIR}/analytics:/analytics bot python /analytics/setup_elastic.py

run-kibana:
docker-compose up -d kibana
sleep 100
docker-compose run --rm kibana python3.6 analytics/import_dashboards.py
sensible-browser --no-sandbox http://localhost:5601

run-analytics:
make run-rabbitmq
make run-elasticsearch
make run-kibana
run-shell:
docker-compose run --service-ports bot make shell

run-webchat:
docker-compose run -d --rm --service-ports bot-webchat
sensible-browser --no-sandbox modules/webchat/index.html

run-telegram:
docker-compose up telegram_bot
docker-compose run -d --rm --service-ports bot make telegram

run-console:
docker-compose run --rm bot make run-console
run-notebooks:
docker-compose up -d notebooks
sensible-browser --no-sandbox http://localhost:8888

train:
docker-compose up coach
docker-compose build bot

run-rocketchat:
docker-compose up -d rocketchat
sleep 25
docker-compose up -d bot
validate:
docker-compose run --rm coach rasa data validate --domain domain.yml --data data/ -vv

test-dialogue:
docker-compose run --rm bot make e2e
visualize:
docker-compose run --rm -v $(current_dir)/bot:/coach coach rasa visualize --domain domain.yml --stories data/stories.md --config config.yml --nlu data/nlu.md --out ./graph.html -vv
sensible-browser --no-sandbox bot/graph.html
Loading

0 comments on commit f692538

Please sign in to comment.