我正在尝试用docker运行Botpress。我将Dockerfile设置如下:
FROM botpress/server:v11_9_5
ADD . /botpress
WORKDIR /botpress
CMD ["./bp"]在构建图像之后,我运行docker run my_image:latest来启动我的botpress。但是,它不能连接到Duckling服务器。
根据日志,
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设置如下:
{
"$schema": "../../assets/modules/nlu/config.schema.json",
"confidenceTreshold": 0.7,
"ducklingURL": "https://duckling.botpress.io",
"ducklingEnabled": true,
"autoTrainInterval": "30s",
"preloadModels": false,
"languageModel": "en",
"fastTextOverrides": {}
}发布于 2019-08-10 00:01:58
在使用Docker镜像时,Duckling与Botpress捆绑在一起(预计在启动Botpress时启动)。有一个环境变量告诉它使用本地版本的duckling。
如果直接运行镜像,两个进程将同时启动。
这里有几个关于如何同时运行它们的示例:https://github.com/botpress/botpress/tree/master/examples/docker-compose
基本上:
command: bash -c "./duckling -p 8000 & ./bp"https://stackoverflow.com/questions/57071089
复制相似问题