Skip to content
This repository was archived by the owner on Aug 22, 2019. It is now read-only.

Commit bb1b6f6

Browse files
committedOct 23, 2018
remodel volumes #845
- unify `endpoint` and `credentials` volumes in `config` - add `project` volume to train model - adapt documentation
1 parent d6296ef commit bb1b6f6

File tree

4 files changed

+35
-31
lines changed

4 files changed

+35
-31
lines changed
 

‎Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ COPY . .
3131

3232
RUN pip install -e . --no-cache-dir
3333

34-
VOLUME ["/app/dialogue", "/app/endpoints", "/app/credentials", "/app/out"]
34+
VOLUME ["/app/model", "/app/config", "/app/project"]
3535

3636
EXPOSE 5005
3737

‎docker/docker-compose.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -7,19 +7,19 @@ services:
77
ports:
88
- "5005:5005"
99
volumes:
10-
- "./rasa-app-data/dialogue:/app/dialogue"
11-
- "./rasa-app-data/endpoints:/app/endpoints"
12-
- "./rasa-app-data/credentials:/app/credentials"
10+
- "./rasa-app-data/core-model:/app/model"
11+
- "./rasa-app-data/config:/app/config"
12+
- "./rasa-app-data/project:/app/project"
1313
command:
1414
- start
1515
- -d
16-
- ./dialogue
16+
- ./model
1717
- -c
1818
- rest
1919
- -u
2020
- current/nlu
2121
- --endpoints
22-
- endpoints/endpoints.yml
22+
- config/endpoints.yml
2323
action_server:
2424
image: rasa/rasa_core_sdk:latest
2525
networks: ['rasa-network']
@@ -33,7 +33,7 @@ services:
3333
ports:
3434
- "5000:5000"
3535
volumes:
36-
- "./rasa-app-data/projects/:/app/projects"
36+
- "./rasa-app-data/nlu-models/:/app/projects"
3737
- "./rasa-app-data/logs:/app/logs"
3838
duckling:
3939
image: rasa/duckling:latest

‎docs/installation.rst

+27-23
Original file line numberDiff line numberDiff line change
@@ -129,38 +129,42 @@ For example:
129129
--data '{"message": "Hi Bot"}' \
130130
http://localhost:5005/webhooks/rest/webhook
131131
132-
To run commands inside a specific container, use ``docker-compose exec <container name>``.
133-
For example to retrain the core model:
132+
To run commands inside a specific container, use ``docker-compose run <container name>``.
133+
For example to train the core model:
134134

135135
.. code-block:: bash
136136
137-
docker-compose exec rasacore ./entrypoint.sh train
137+
docker-compose run rasacore train
138138
139139
Volume Explanation
140140
~~~~~~~~~~~~~~~~~~
141-
- **./rasa-app-data/dialogue**: This directory contains the trained Rasa Core models.
142-
You can also move previously trained models to directoy to load them within the Docker container.
143-
- **./rasa-app-data/endpoints**: If you are using Rasa Core together with other components,
144-
this directory should contain a file ``endpoints.yml`` which specifies how to reach this components.
145-
For the shown example the file should look like this:
146-
147-
.. code-block:: yaml
148-
149-
action_endpoint:
150-
url: 'http://action_server:5055/webhook'
151-
nlu:
152-
url: 'http://rasanlu:5000'
153-
154-
- **./rasa-app-data/projects/**: This directory contains the trained Rasa NLU models.
155-
You can also move previously trained models to directoy to load them within the Docker container.
156-
- **./rasa-app-data/credentials**: This directory is optionally and may contain credentials for various
157-
`chat & voice platforms <https://rasa.com/docs/core/connectors/>`_ you want to connect your bot to.
158-
Use the provided credentials by adding :code:`--credentials <path to your credentials file>``
159-
to the run command of Rasa Core.
141+
- **./rasa-app-data/core-model**: This directory contains the trained Rasa Core models.
142+
You can also move previously trained models to this directory to load them within the Docker container.
143+
- **./rasa-app-data/config**: This directory is for the configuration of the endpoints and of the
144+
different `chat & voice platforms <https://rasa.com/docs/core/connectors/>`_ you can use Rasa Core with.
145+
- To connect other components with Rasa Core this directory should contain a file ``endpoints.yml``,
146+
which specifies how to reach these components.
147+
For the shown docker-compose example the file should look like this:
148+
149+
.. code-block:: yaml
150+
151+
action_endpoint:
152+
url: 'http://action_server:5055/webhook'
153+
nlu:
154+
url: 'http://rasanlu:5000'
155+
156+
- If you use a connector to a `chat & voice platforms <https://rasa.com/docs/core/connectors/>`_
157+
you have to configure the required credentials for these in a file `credentials.yml`.
158+
Use the provided credentials by adding :code:`--credentials <path to your credentials file>``
159+
to the run command of Rasa Core.
160+
161+
- **./rasa-app-data/project**: This directory contains your Rasa project and may be used to train a model.
162+
- **./rasa-app-data/nlu-models/**: This directory contains the trained Rasa NLU models.
163+
You can also move previously trained models to this directory to load them within the Docker container.
160164

161165
.. note::
162166

163-
You can always use custom directory structures or port mappings.
167+
You can also use custom directory structures or port mappings.
164168
But don't forget to reflect this changes in the docker compose file and in your endpoint configuration.
165169

166170
.. include:: feedback.inc

‎entrypoint.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ case ${1} in
1919
exec "${@:2}"
2020
;;
2121
train)
22-
exec python -m rasa_core.train -s ./stories.md -d ./domain.yml -o ./out "${@:2}"
22+
exec python -m rasa_core.train -s project/stories.md -d project/domain.yml -o ./model "${@:2}"
2323
;;
2424
*)
2525
print_help

0 commit comments

Comments
 (0)
This repository has been archived.