rasa: Unable to run action server from Dockerfile
Rasa version: 1.10.0
Rasa SDK version: 1.10.0
Python version: 3.6.5
Operating system: Windows 10
Issue: I have docker-compose file In that I have two container rasa server and action server. but only rasa server is starting not action one. I have actions.py and init.py in the actions folder. folder structure: docker-compose.yml actions └─── actions.py Dockerfile init.py backend └─── Dockerfile config.yml credentials.yml domain.yml endpoints.yml └───data nlu.md stories.md
Error (including full traceback):
Building rasa
Step 1/10 : FROM rasa/rasa:1.10.0-full
---> 540ad250374c
Step 2/10 : USER root
---> Running in 7a6784289f9e
Removing intermediate container 7a6784289f9e
---> d0b77fc818c0
Step 3/10 : WORKDIR /app
---> Running in c99b39071107
Removing intermediate container c99b39071107
---> 96ddbb5ed969
Step 4/10 : COPY . /app
---> 28e3a4feaa5f
Step 5/10 : COPY ./data /app/data
---> 9865cd3386f1
Step 6/10 : RUN rasa train -c ./config.yml -d ./domain.yml --data ./data --debug
---> Running in e2f07cc67c77
2020-05-16 08:19:38 DEBUG rasa.nlu.training_data.loading - Training data format of './data/nlu.md' is 'md'.
2020-05-16 08:19:38 DEBUG rasa.nlu.training_data.loading - Training data format of './data/responses.md' is 'unk'.
2020-05-16 08:19:38 DEBUG rasa.nlu.training_data.loading - Training data format of './data/stories.md' is 'unk'.
2020-05-16 08:19:38 DEBUG pykwalify.compat - Using yaml library: /opt/venv/lib/python3.7/site-packages/ruamel/yaml/__init__.py
2020-05-16 08:19:38 DEBUG rasa.nlu.training_data.loading - Training data format of './data/nlu.md' is 'md'.
2020-05-16 08:19:38 DEBUG rasa.nlu.training_data.loading - Training data format of './data/nlu.md' is 'md'.
2020-05-16 08:19:42 INFO rasa.core.policies.ensemble - MappingPolicy not included in policy ensemble. Default intents 'restart and back will not trigger actions 'action_restart' and 'action_back'.
2020-05-16 08:19:42 DEBUG rasa.core.nlg.generator - Instantiated NLG to 'TemplatedNaturalLanguageGenerator'.
2020-05-16 08:19:42 DEBUG rasa.core.training.generator - Generated trackers will be deduplicated based on their unique last 5 states.
2020-05-16 08:19:42 DEBUG rasa.core.training.generator - Number of augmentation rounds is 3
2020-05-16 08:19:42 DEBUG rasa.core.training.generator - Starting data generation round 0 ... (with 1 trackers)
Processed Story Blocks: 100%|██████████| 6/6 [00:00<00:00, 1549.72it/s, # trackers=1]
2020-05-16 08:19:42 DEBUG rasa.core.training.generator - Finished phase (6 training samples found).
2020-05-16 08:19:42 DEBUG rasa.core.training.generator - Data generation rounds finished.
2020-05-16 08:19:42 DEBUG rasa.core.training.generator - Found 0 unused checkpoints
2020-05-16 08:19:42 DEBUG rasa.core.training.generator - Starting augmentation round 0 ... (with 6 trackers)
Processed Story Blocks: 100%|██████████| 6/6 [00:00<00:00, 374.09it/s, # trackers=6]
2020-05-16 08:19:42 DEBUG rasa.core.training.generator - Finished phase (42 training samples found).
2020-05-16 08:19:42 DEBUG rasa.core.training.generator - Starting augmentation round 1 ... (with 42 trackers)
Processed Story Blocks: 100%|██████████| 6/6 [00:00<00:00, 121.68it/s, # trackers=30]
2020-05-16 08:19:42 DEBUG rasa.core.training.generator - Finished phase (210 training samples found).
2020-05-16 08:19:43 DEBUG rasa.core.training.generator - Starting augmentation round 2 ... (with 50 trackers)
Processed Story Blocks: 100%|██████████| 6/6 [00:00<00:00, 91.75it/s, # trackers=33]
2020-05-16 08:19:43 DEBUG rasa.core.training.generator - Finished phase (386 training samples found).
2020-05-16 08:19:43 DEBUG rasa.core.training.generator - Found 386 training trackers.
2020-05-16 08:19:43 DEBUG rasa.core.training.generator - Subsampled to 380 augmented training trackers.
2020-05-16 08:19:43 DEBUG rasa.core.training.generator - There are 6 original trackers.
2020-05-16 08:19:43 DEBUG rasa.core.agent - Agent trainer got kwargs: {}
2020-05-16 08:19:43 DEBUG rasa.core.featurizers - Creating states and action examples from collected trackers (by MaxHistoryTrackerFeaturizer(NoneType))...
Processed trackers: 100%|██████████| 6/6 [00:00<00:00, 1021.71it/s, # actions=18]
2020-05-16 08:19:43 DEBUG rasa.core.featurizers - Created 18 action examples.
Processed actions: 18it [00:00, 1805.73it/s, # examples=18]
2020-05-16 08:19:43 DEBUG rasa.core.policies.memoization - Memorized 18 unique examples.
2020-05-16 08:19:43 DEBUG rasa.core.featurizers - Creating states and action examples from collected trackers (by MaxHistoryTrackerFeaturizer(LabelTokenizerSingleStateFeaturizer))...
Processed trackers: 100%|██████████| 386/386 [00:00<00:00, 454.53it/s, # actions=234]
2020-05-16 08:19:43 DEBUG rasa.core.featurizers - Created 234 action examples.
2020-05-16 08:19:43.990074: E tensorflow/stream_executor/cuda/cuda_driver.cc:351] failed call to cuInit: UNKNOWN ERROR (303)
2020-05-16 08:19:44 DEBUG rasa.utils.tensorflow.models - Building tensorflow train graph...
2020-05-16 08:19:55 DEBUG rasa.utils.tensorflow.models - Finished building tensorflow train graph.
Epochs: 100%|██████████| 100/100 [00:14<00:00, 6.72it/s, t_loss=0.152, loss=0.081, acc=1.000]
2020-05-16 08:20:10 INFO rasa.utils.tensorflow.models - Finished training.
2020-05-16 08:20:10 INFO rasa.core.agent - Persisted model to '/tmp/tmpcyx6t762/core'
2020-05-16 08:20:11 INFO rasa.nlu.utils.spacy_utils - Trying to load spacy model with name 'en'
2020-05-16 08:20:35 INFO rasa.nlu.components - Added 'SpacyNLP' to component cache. Key 'SpacyNLP-en'.
2020-05-16 08:20:35 DEBUG rasa.nlu.training_data.loading - Training data format of './data/nlu.md' is 'md'.
2020-05-16 08:20:35 INFO rasa.nlu.training_data.training_data - Training data stats:
2020-05-16 08:20:35 INFO rasa.nlu.training_data.training_data - Number of intent examples: 46 (8 distinct intents)
2020-05-16 08:20:35 INFO rasa.nlu.training_data.training_data - Found intents: 'deny', 'partners', 'bot_challenge', 'greet', 'mood_great', 'affirm', 'mood_unhappy', 'goodbye'
2020-05-16 08:20:35 INFO rasa.nlu.training_data.training_data - Number of response examples: 0 (0 distinct responses)
2020-05-16 08:20:35 INFO rasa.nlu.training_data.training_data - Number of entity examples: 0 (0 distinct entities)
2020-05-16 08:20:35 DEBUG rasa.nlu.training_data.training_data - Validating training data...
2020-05-16 08:20:35 INFO rasa.nlu.model - Starting to train component SpacyNLP
2020-05-16 08:20:35 INFO rasa.nlu.model - Finished training component.
2020-05-16 08:20:35 INFO rasa.nlu.model - Starting to train component SpacyTokenizer
2020-05-16 08:20:35 INFO rasa.nlu.model - Finished training component.
2020-05-16 08:20:35 INFO rasa.nlu.model - Starting to train component SpacyFeaturizer
2020-05-16 08:20:35 INFO rasa.nlu.model - Finished training component.
2020-05-16 08:20:35 INFO rasa.nlu.model - Starting to train component DIETClassifier
/opt/venv/lib/python3.7/site-packages/rasa/utils/common.py:351: UserWarning: You specified 'DIET' to train entities, but no entities are present in the training data. Skip training of entities.
2020-05-16 08:20:35 DEBUG rasa.utils.tensorflow.models - Building tensorflow train graph...
2020-05-16 08:20:43 DEBUG rasa.utils.tensorflow.models - Finished building tensorflow train graph.
Epochs: 100%|██████████| 100/100 [00:15<00:00, 6.54it/s, t_loss=0.681, i_loss=0.457, i_acc=0.978]
2020-05-16 08:20:58 INFO rasa.utils.tensorflow.models - Finished training.
2020-05-16 08:20:58 INFO rasa.nlu.model - Finished training component.
2020-05-16 08:20:58 INFO rasa.nlu.model - Starting to train component EntitySynonymMapper
2020-05-16 08:20:58 INFO rasa.nlu.model - Finished training component.
2020-05-16 08:20:59 INFO rasa.nlu.model - Successfully saved model into '/tmp/tmpcyx6t762/nlu'
Training Core model...
Core model training completed.
Training NLU model...
NLU model training completed.
Your Rasa model is trained and saved at '/app/models/20200516-082100.tar.gz'.
Removing intermediate container e2f07cc67c77
---> 1c79197183a9
Step 7/10 : VOLUME /app
---> Running in d01aa03f7e4b
Removing intermediate container d01aa03f7e4b
---> 66461f758447
Step 8/10 : VOLUME /app/data
---> Running in b19ac89ad940
Removing intermediate container b19ac89ad940
---> 527dcae8db84
Step 9/10 : VOLUME /app/models
---> Running in 0ef6d60787be
Removing intermediate container 0ef6d60787be
---> 71860e4217e9
Step 10/10 : RUN ls
---> Running in 260583de97aa
Dockerfile
config.yml
credentials.yml
data
domain.yml
endpoints.yml
models
Removing intermediate container 260583de97aa
---> 5a1c6a85a306
Successfully built 5a1c6a85a306
Successfully tagged velementchatbot_rasa:latest
Building action_server
Step 1/6 : FROM rasa/rasa-sdk:1.10.0
---> 5114b1f9a8af
Step 2/6 : WORKDIR /app
---> Running in a6082188019a
Removing intermediate container a6082188019a
---> 0700ed751194
Step 3/6 : USER root
---> Running in a89ca04a89d6
Removing intermediate container a89ca04a89d6
---> 3fac23a8793f
Step 4/6 : RUN python -m pip install --upgrade pip
---> Running in 9fa1bee75985
Collecting pip
Downloading pip-20.1-py2.py3-none-any.whl (1.5 MB)
Installing collected packages: pip
Attempting uninstall: pip
Found existing installation: pip 20.0.2
Uninstalling pip-20.0.2:
Successfully uninstalled pip-20.0.2
Successfully installed pip-20.1
Removing intermediate container 9fa1bee75985
---> 6f59b6af9f74
Step 5/6 : COPY . /app/actions
---> c05b52a81294
Step 6/6 : VOLUME /app
---> Running in e4276c102ac7
Removing intermediate container e4276c102ac7
---> 848249162bfe
Successfully built 848249162bfe
Successfully tagged velementchatbot_action_server:latest
Recreating action_server ... error Recreating rasa_server ...
ERROR: for action_server no such image: sha256:4baee55c1091895829f7edd86fbd70a978dadddb0e0536fee18870b1e24e2113: No such image: sha256:4baee55c1091895829f7edd86fbd70a9Recreating rasa_server ... error
ERROR: for rasa_server no such image: sha256:cb7cc57c8020ceabb105893c5e44f8d8aedb51a1fa72f6284569859115a605e7: No such image: sha256:cb7cc57c8020ceabb105893c5e44f8d8aedb51a1fa72f6284569859115a605e7
ERROR: for action_server no such image: sha256:4baee55c1091895829f7edd86fbd70a978dadddb0e0536fee18870b1e24e2113: No such image: sha256:4baee55c1091895829f7edd86fbd70a978dadddb0e0536fee18870b1e24e2113
ERROR: for rasa no such image: sha256:cb7cc57c8020ceabb105893c5e44f8d8aedb51a1fa72f6284569859115a605e7: No such image: sha256:cb7cc57c8020ceabb105893c5e44f8d8aedb51a1fa72f6284569859115a605e7
ERROR: The image for the service you're trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.
Continue with the new image? [yN]y
Building rasa
Step 1/10 : FROM rasa/rasa:1.10.0-full
---> 540ad250374c
Step 2/10 : USER root
---> Using cache
---> d0b77fc818c0
Step 3/10 : WORKDIR /app
---> Using cache
---> 96ddbb5ed969
Step 4/10 : COPY . /app
---> Using cache
---> 28e3a4feaa5f
Step 5/10 : COPY ./data /app/data
---> Using cache
---> 9865cd3386f1
Step 6/10 : RUN rasa train -c ./config.yml -d ./domain.yml --data ./data --debug
---> Using cache
---> 1c79197183a9
Step 7/10 : VOLUME /app
---> Using cache
---> 66461f758447
Step 8/10 : VOLUME /app/data
---> Using cache
---> 527dcae8db84
Step 9/10 : VOLUME /app/models
---> Using cache
---> 71860e4217e9
Step 10/10 : RUN ls
---> Using cache
---> 5a1c6a85a306
Successfully built 5a1c6a85a306
Successfully tagged velementchatbot_rasa:latest
Building action_server
Step 1/6 : FROM rasa/rasa-sdk:1.10.0
---> 5114b1f9a8af
Step 2/6 : WORKDIR /app
---> Using cache
---> 0700ed751194
Step 3/6 : USER root
---> Using cache
---> 3fac23a8793f
Step 4/6 : RUN python -m pip install --upgrade pip
---> Using cache
---> 6f59b6af9f74
Step 5/6 : COPY . /app/actions
---> Using cache
---> c05b52a81294
Step 6/6 : VOLUME /app
---> Using cache
---> 848249162bfe
Successfully built 848249162bfe
Successfully tagged velementchatbot_action_server:latest
Recreating 5bda464dfc54_action_server ... done Recreating 94bd4b2fbfef_rasa_server ... done Attaching to rasa_server, action_server
action_server | 2020-05-16 08:22:37 INFO rasa_sdk.endpoint - Starting action endpoint server...
action_server | 2020-05-16 08:22:38 INFO rasa_sdk.executor - Registered function for 'action_partner'.
rasa_server | usage: rasa [-h] [--version]
rasa_server | {init,run,shell,train,interactive,test,visualize,data,export,x}
rasa_server | ...
rasa_server |
rasa_server | Rasa command line interface. Rasa allows you to build your own conversational
rasa_server | assistants 🤖. The 'rasa' command allows you to easily run most common commands
rasa_server | like creating a new bot, training or evaluating models.
rasa_server |
rasa_server | positional arguments:
rasa_server | {init,run,shell,train,interactive,test,visualize,data,export,x}
rasa_server | Rasa commands
rasa_server | init Creates a new project, with example training data,
rasa_server | actions, and config files.
rasa_server | run Starts a Rasa server with your trained model.
rasa_server | shell Loads your trained model and lets you talk to your
rasa_server | assistant on the command line.
rasa_server | train Trains a Rasa model using your NLU data and stories.
rasa_server | interactive Starts an interactive learning session to create new
rasa_server | training data for a Rasa model by chatting.
rasa_server | test Tests Rasa models using your test NLU data and
rasa_server | stories.
rasa_server | visualize Visualize stories.
rasa_server | data Utils for the Rasa training files.
rasa_server | export Export conversations using an event broker.
rasa_server |
rasa_server | optional arguments:
rasa_server | -h, --help show this help message and exit
rasa_server | --version Print installed Rasa version
rasa_server exited with code 0
Command or request that led to error:
docker-compose up --build
docker-compose.yml:
version: '3'
services:
rasa:
container_name: "rasa_server"
build:
context: backend
ports:
- "5005:5005"
action_server:
container_name: "action_server"
build:
context: actions
volumes:
- ./actions:/app/actions
ports:
- 5055:5055
** Dockerfile from action folder**:
FROM rasa/rasa-sdk:1.10.0
WORKDIR /app
USER root
RUN python -m pip install --upgrade pip
# RUN pip install recognizers-text-suite
COPY . /app/actions
VOLUME /app
**Dockerfile of rasa server **:
FROM rasa/rasa:1.10.0-full
USER root
WORKDIR /app
COPY . /app
COPY ./data /app/data
RUN rasa train -c ./config.yml -d ./domain.yml --data ./data --debug
VOLUME /app
VOLUME /app/data
VOLUME /app/models
CMD [ "run","-m","/app/models","--enable-api","--cors","*","--debug" ]
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 18 (4 by maintainers)
Ah I see; you need to change your
endpoints.ymlto match the action server name. Your rasa container is looking for the action server inhttp://localhost:5055/webhook. You’ll want to change your config’saction_endpointto match the container name, sohttp://action_server:5055/webhook. You’ll also want to make sure to network the containers together, just as the exampledocker-compose.ymldoes.For UI I have used botfront/webchat. there you will get whole documentation.
This is my docker but I am not using action server.
FROM rasa/rasa:1.9.7 USER root
ENTRYPOINT [] ADD . /app/
RUN python -m pip install --no-cache --upgrade pip
RUN ls /app RUN chmod +x /app/server.sh CMD /app/server.sh
Thanks for the issue, @degiz will get back to you about it soon!
You may find help in the docs and the forum, too 🤗