1

I am trying to run Botpress with docker. I set my Dockerfile as follows:

FROM botpress/server:v11_9_5
ADD . /botpress
WORKDIR /botpress
CMD ["./bp"]

After building image, I run docker run my_image:latest to start my botpress. However it cannot connect to Duckling server.

According to the log,

03:20:32.917 Mod[nlu] Couldn't reach the Duckling server , so it will be disabled.
                      For more informations (or if you want to self-host it), please check the docs at
                      https://botpress.io/docs/build/nlu/#system-entities
                       [Error, connect ECONNREFUSED 127.0.0.1:8000]
STACK TRACE
Error: connect ECONNREFUSED 127.0.0.1:8000
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1158:14)

My nlu.json setting is as follow:

{
  "$schema": "../../assets/modules/nlu/config.schema.json",
  "confidenceTreshold": 0.7,
  "ducklingURL": "https://duckling.botpress.io",
  "ducklingEnabled": true,
  "autoTrainInterval": "30s",
  "preloadModels": false,
  "languageModel": "en",
  "fastTextOverrides": {}
}
Jimmy
  • 11
  • 2

1 Answers1

0

Duckling is bundled with Botpress when using the Docker image (and is expected to be started when you start Botpress). There is an environment variable which tells it to use the local version of duckling.

If you run the image directly, both processes are started at the same time.

There are a couple of examples on how to run both of them here: https://github.com/botpress/botpress/tree/master/examples/docker-compose

Basically:

 command: bash -c "./duckling -p 8000 & ./bp"
Yann
  • 31
  • 3