首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >无法连接Docker容器中的nlu

无法连接Docker容器中的nlu
EN

Stack Overflow用户
提问于 2019-07-17 15:55:59
回答 1查看 421关注 0票数 1

我正在尝试用docker运行Botpress。我将Dockerfile设置如下:

代码语言:javascript
复制
FROM botpress/server:v11_9_5
ADD . /botpress
WORKDIR /botpress
CMD ["./bp"]

在构建图像之后,我运行docker run my_image:latest来启动我的botpress。但是,它不能连接到Duckling服务器。

根据日志,

代码语言:javascript
复制
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)

我的nlu.json设置如下:

代码语言:javascript
复制
{
  "$schema": "../../assets/modules/nlu/config.schema.json",
  "confidenceTreshold": 0.7,
  "ducklingURL": "https://duckling.botpress.io",
  "ducklingEnabled": true,
  "autoTrainInterval": "30s",
  "preloadModels": false,
  "languageModel": "en",
  "fastTextOverrides": {}
}
EN

回答 1

Stack Overflow用户

发布于 2019-08-10 00:01:58

在使用Docker镜像时,Duckling与Botpress捆绑在一起(预计在启动Botpress时启动)。有一个环境变量告诉它使用本地版本的duckling。

如果直接运行镜像,两个进程将同时启动。

这里有几个关于如何同时运行它们的示例:https://github.com/botpress/botpress/tree/master/examples/docker-compose

基本上:

代码语言:javascript
复制
 command: bash -c "./duckling -p 8000 & ./bp"
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/57071089

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档