File tree Expand file tree Collapse file tree 7 files changed +18
-21
lines changed Expand file tree Collapse file tree 7 files changed +18
-21
lines changed Original file line number Diff line number Diff line change @@ -11,13 +11,13 @@ build:
11
11
make build-bot
12
12
13
13
build-requirements :
14
- docker build . -f docker/requirements.Dockerfile -t lappis/ botrequirements:boilerplate
14
+ docker build . -f docker/requirements.Dockerfile -t botrequirements
15
15
16
16
build-bot :
17
17
docker-compose build bot
18
18
19
19
build-coach :
20
- docker-compose build coach
20
+ docker-compose up coach
21
21
22
22
build-analytics :
23
23
docker-compose up -d elasticsearch
@@ -30,7 +30,7 @@ build-analytics:
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
31
docker-compose run --rm -v $(current_dir ) /modules/analytics/:/analytics/ bot python /analytics/import_dashboards.py
32
32
echo " Não se esqueça de atualizar o arquivo endpoints.yml"
33
- # sensible-browser --no-sandbox http://localhost:5601
33
+ sensible-browser --no-sandbox http://localhost:5601
34
34
35
35
run-analytics :
36
36
docker-compose up -d rabbitmq
@@ -54,7 +54,7 @@ run-notebooks:
54
54
sensible-browser --no-sandbox http://localhost:8888
55
55
56
56
train :
57
- docker build . -f docker/coach.Dockerfile -t lappis/ coach:boilerplate
57
+ docker-compose up coach
58
58
docker-compose build bot
59
59
60
60
validate :
Original file line number Diff line number Diff line change 1
1
# ############################# BOT ##############################
2
2
train :
3
- rasa train -vv
3
+ rasa train -vv --out models/
4
4
5
5
shell :
6
6
rasa shell -m models/ -vv --endpoints endpoints.yml --port 5004 --cors " *"
Original file line number Diff line number Diff line change @@ -4,8 +4,13 @@ services:
4
4
# =============================== Coach =================================
5
5
# All the models are trained by this coach.
6
6
coach :
7
- image : lappis/coach:boilerplate
8
- command : sh -c "cp -r /src_models/* "
7
+ build :
8
+ context : .
9
+ dockerfile : ./docker/coach.Dockerfile
10
+ volumes :
11
+ - ./bot/models/:/bot/models/
12
+ command : sh -c "make train"
13
+
9
14
10
15
# ================================= Bot =====================================
11
16
# Generic Rasa bot, used to run console for example.
Original file line number Diff line number Diff line change 1
- FROM lappis/ botrequirements:boilerplate
1
+ FROM botrequirements
2
2
3
3
COPY ./bot/actions/actions.py /bot/actions/actions.py
4
4
COPY ./bot/Makefile /bot/Makefile
Original file line number Diff line number Diff line change 1
- FROM lappis/coach:boilerplate as coach
2
- FROM lappis/botrequirements:boilerplate
1
+ FROM botrequirements
3
2
4
3
WORKDIR /bot
5
4
6
5
COPY ./bot /bot
7
6
COPY ./modules /modules
8
- COPY --from=coach /src_models/ /bot/models/
9
-
10
- RUN chown -R 1001 /bot/models && chmod -R 750 /bot/models
11
7
12
8
RUN find . | grep -E "(__pycache__|\. pyc|\. pyo$)" | xargs rm -rf
Original file line number Diff line number Diff line change 1
- FROM lappis/ botrequirements:boilerplate
1
+ FROM botrequirements as coach
2
2
3
- COPY . /bot/ /coach/
3
+ WORKDIR /bot
4
4
5
- RUN mkdir /src_models
6
-
7
- WORKDIR /coach
5
+ COPY ./bot/ /bot/
8
6
9
7
RUN make train
10
-
11
- RUN find /. | grep -E "(__pycache__|\. pyc|\. pyo$)" | xargs rm -rf
Original file line number Diff line number Diff line change 1
- FROM python:3.6-slim
1
+ FROM python:3.6-slim as botrequirements
2
2
3
3
RUN apt update && apt install -y gcc make
4
4
You can’t perform that action at this time.
0 commit comments