Skip to content

Commit f692538

Browse files
Merge pull request #101 from lappis-unb/devel
Boilerplate V1.0
2 parents 44ca3a7 + 1c3cb03 commit f692538

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1740
-2529
lines changed

.gitignore

Lines changed: 11 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,27 @@
11
### Rasa ###
22
bot/models
3-
rasa_core.log
4-
errors.json
3+
4+
### Rasa visualize ###
5+
graph.html
56

67
### Rasa evaluation ###
78
.ipynb_checkpoints/
8-
notebooks/models/
9-
notebooks/errors.json
10-
notebooks/lab/
11-
notebooks/evaluate-intents.ipynb
12-
notebooks/stories/failed_stories.md
13-
notebooks/stories/matrix.pdf
14-
notebooks/stories/chat_graph.html
9+
modules/notebooks/intents/confmat.png
10+
modules/notebooks/intents/hist.png
11+
modules/notebooks/intents/models/
12+
modules/notebooks/intents/errors.json
1513
bot/.ipython/
1614
bot/.keras/
1715
bot/.local/
18-
bot/work
1916
bot/results/
2017

21-
### Jupyter Notebooks ###
22-
notebooks/intents/evaluate-intents.ipynb
23-
notebooks/intents/errors.json
24-
notebooks/intents/reports/
25-
notebooks/intents/hist.png
26-
notebooks/intents/confmat.png
27-
28-
notebooks/stories/models
29-
notebooks/stories/errors.json
30-
notebooks/stories/img
31-
notebooks/stories/results/
32-
notebooks/stories/matrix.pdf
33-
34-
### Rocketchat ###
35-
/data
36-
uploads
37-
38-
39-
### database
40-
web/postegres-data
18+
### database ###
19+
db/
4120

21+
### PyCharm ###
22+
.idea/
4223

4324
# Created by https://www.gitignore.io/api/vim,linux,macos,python
44-
4525
### Linux ###
4626
*~
4727

@@ -165,7 +145,6 @@ celerybeat-schedule.*
165145
# Environments
166146
.env
167147
.venv
168-
env/
169148
venv/
170149
ENV/
171150
env.bak/
@@ -198,6 +177,3 @@ tags
198177

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

201-
models/dialogue/
202-
203-
models/nlu/current/

.gitlab-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
image: python:3.6-slim
22

3+
before_script:
4+
- apt-get update --yes
5+
- apt-get install gcc
6+
37
variables:
48
BOT_IMAGE: $DOCKERHUB_USER/bot
59
COACH_IMAGE: $DOCKERHUB_USER/coach

Makefile

Lines changed: 44 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,65 @@
1-
build-requirements:
2-
docker build . -f docker/requirements.Dockerfile -t lappis/botrequirements:boilerplate
3-
4-
build-coach:
5-
docker-compose build coach
1+
current_dir := $(shell pwd)
62

7-
build-bot:
8-
docker-compose build bot
3+
############################## BOILERPLATE ##############################
4+
first-run:
5+
make build
6+
make run-webchat
97

108
build:
119
make build-requirements
1210
make build-coach
1311
make build-bot
1412

15-
first-run:
16-
make build
17-
make run-console
13+
build-requirements:
14+
docker build . -f docker/requirements.Dockerfile -t botrequirements
1815

19-
train:
20-
docker build . -f docker/coach.Dockerfile -t lappis/coach:boilerplate
16+
build-bot:
2117
docker-compose build bot
18+
19+
build-coach:
20+
docker-compose up coach
2221

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

28-
run-elasticsearch:
35+
run-analytics:
36+
docker-compose up -d rabbitmq
37+
docker-compose up -d rabbitmq-consumer
2938
docker-compose up -d elasticsearch
30-
docker-compose run --rm -v ${CURDIR}/analytics:/analytics bot python /analytics/setup_elastic.py
31-
32-
run-kibana:
3339
docker-compose up -d kibana
34-
sleep 100
35-
docker-compose run --rm kibana python3.6 analytics/import_dashboards.py
40+
sensible-browser --no-sandbox http://localhost:5601
3641

37-
run-analytics:
38-
make run-rabbitmq
39-
make run-elasticsearch
40-
make run-kibana
42+
run-shell:
43+
docker-compose run --service-ports bot make shell
44+
45+
run-webchat:
46+
docker-compose run -d --rm --service-ports bot-webchat
47+
sensible-browser --no-sandbox modules/webchat/index.html
4148

4249
run-telegram:
43-
docker-compose up telegram_bot
50+
docker-compose run -d --rm --service-ports bot make telegram
4451

45-
run-console:
46-
docker-compose run --rm bot make run-console
52+
run-notebooks:
53+
docker-compose up -d notebooks
54+
sensible-browser --no-sandbox http://localhost:8888
55+
56+
train:
57+
docker-compose up coach
58+
docker-compose build bot
4759

48-
run-rocketchat:
49-
docker-compose up -d rocketchat
50-
sleep 25
51-
docker-compose up -d bot
60+
validate:
61+
docker-compose run --rm coach rasa data validate --domain domain.yml --data data/ -vv
5262

53-
test-dialogue:
54-
docker-compose run --rm bot make e2e
63+
visualize:
64+
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
65+
sensible-browser --no-sandbox bot/graph.html

0 commit comments

Comments
 (0)