0

I'm new with Rasa and docker. My attempt to dockerize Rasa-NLU consists of the below steps: Instructions were referred from here

  1. Did a Git clone of latest Rasa-NLU
  2. Copied Dockerfile_full (from within /docker) to the root directory
  3. Changed the port number specified in config_default.json and Dockerfile_full from default(5000) to 5048.
  4. Build using: docker build -t rasa_nlu .

  5. Run the docker on a port(5048) different from the default(5000) port.

However, the following gets logged in the console:

INFO:rasa_nlu.data_router:Logging requests to '/app/logs/rasa_nlu_log-20170928-091903-1.log'. INFO:__main__:Started http server on port 5000 2017-09-28 09:19:03+0000 [-] Log opened. 2017-09-28 09:19:03+0000 [-] Site starting on 5000 2017-09-28 09:19:03+0000 [-] Starting factory <twisted.web.server.Site instance at 0x7fbab0bfdd40>

If I try to hit the Rasa endpoint locally using CURL, I get a connection reset error. My doubts of a wrong port being referred were confirmed when checked within docker container (using docker exec)it was running on port 5000.

Can someone help me out here as to where exactly I'm going wrong and where should the port number be configured ?

Thanks in advance!

Sailesh
  • 115
  • 2
  • 10
  • 1
    Add and change port in `sample_configs/config_spacy_duckling.json` and then try – Tarun Lalwani Sep 28 '17 at 10:22
  • Great! @TarunLalwani it works! After going through the `Dockerfile_full` contents, I assumed it'll take the port from `config_defaults.json`. Hence I'd not explicitly set the port in `config_spacy_duckling.json` file. Point noted. Thanks for your help. – Sailesh Sep 28 '17 at 11:17

2 Answers2

2

Dockerfile_full expects the config file to be in the sample_configs folder. Also Dockerfile_full uses the config_spacy_duckling.json config file. So make sure you replace the below reference in the dockerfile. You can either change the config file it copies in or change the port configuration in the correct file.

COPY sample_configs/config_spacy_duckling.json ${RASA_NLU_HOME}/config.json

Ignoring that, why change the port in both locations? All you need to do is change it in your docker run or compose command.

docker run -p 5048:5000 rasa/rasa_nlu:latest-full

Caleb Keller
  • 2,151
  • 17
  • 26
1

Add and change port in sample_configs/config_spacy_duckling.json. If you see the Dockerfile this the config that is copied and it has no port defined. So once you put port in this and build it would work

Tarun Lalwani
  • 142,312
  • 9
  • 204
  • 265