Using NLU in Docker needs argument -d/--core

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.

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 …

Could you maybe upload your Running NLU as a server script?

Thank you. Many people have problems with the Docker side of things.

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.

Just realized you are on windows :frowning:. 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.

thank you @dadecoza. I’ll have a look at it :slight_smile: