michaelh
(Michael)
April 8, 2019, 11:38am
1
Hello
I am following the RASA Docker guide for NLU https://rasa.com/docs/nlu/docker/ . I trained my model with
docker run -v C:\Users\michaelh\Documents\Chatbot\rasa_docker\docker_nlu\in:/app/project -v C:\Users\michaelh\Documents\Chatbot\rasa_docker\docker_nlu\out:/app/model rasa/rasa_nlu:latest run python -m rasa_nlu.train -c /app/project/nlu_config.yml -d /app/project/nlu_data.md -o /app/model --project nlu_proj2
and that seemed to work, since i now have a trained model in out\nlu_proj2.
However when i wanted to run the server with
docker run -p 5000:5000 -v C:\Users\michaelh\Documents\Chatbot\rasa_docker\docker_nlu\out\nlu_proj2:/app/projects rasa/rasa_nlu:latest start --path /app/projects --port 5000
I got an error stating “run.py: error: the following arguments are required: -d/–core”. How can I fix that error? And why do I need to specify some core, I thought that NLU and Core work independent of each other.
dadecoza
(Johannes Le Roux)
April 8, 2019, 12:31pm
2
temp_container="temp_container_$$"
# Train core
sudo docker run \
-v $(pwd):/app/project \
-v $(pwd)/models/rasa_core:/app/models \
-v $(pwd)/config:/app/config \
--name $temp_container \
rasa/rasa_core:latest \
train \
--domain project/domain.yml \
--stories project/data/core/stories.md \
-c config/policies.yml \
--out models
sudo docker rm $temp_container
#Train NLU
sudo docker run \
-v $(pwd):/app/project \
-v $(pwd)/models/rasa_nlu:/app/models \
-v $(pwd)/config:/app/config \
--name $temp_container \
rasa/rasa_nlu:latest-spacy \
run \
python -m rasa_nlu.train \
-c config/nlu_config.yml \
-d project/data/nlu \
-o models \
--project current
sudo docker rm $temp_container
These are my working training scripts, maybe it will help …
eloukas
(Eleftherios P Loukas)
April 9, 2019, 9:08am
4
Could you maybe upload your Running NLU as a server
script?
Thank you. Many people have problems with the Docker side of things.
dadecoza
(Johannes Le Roux)
April 9, 2019, 9:12am
5
You can have a look at my hangman game … GitHub - dadecoza/rasa-hangman: add a game of hangman to your chatbot
It has the the training scripts and docker-compose file.
dadecoza
(Johannes Le Roux)
April 9, 2019, 9:14am
6
Just realized you are on windows . You will have to change the training scripts to .bat files. I have never used docker on windows … well I do kinda but in a VM.
michaelh
(Michael)
April 10, 2019, 1:59pm
7
thank you @dadecoza . I’ll have a look at it