我正在尝试使用docker-compose来运行rasa服务器以及action服务器。
这是我的docker-compose.yml
version: '3.0'
services:
rasa:
image: rasa/rasa:latest-full
ports:
- 5005:5005
volumes:
- ./:/app
command:
- x
action_server:
image: rasa/rasa-sdk:latest
volumes:
- ./actions:/app/actions
目前我在执行docker-compose up
时遇到两个错误
Failed to register package 'actions.actions'.
ModuleNotFoundError: No module named 'rasax'
这是完整的跟踪记录:
docker-compose up
Recreating wlbot_rasa_1 ... done
Starting wlbot_action_server_1 ... done
Attaching to wlbot_action_server_1, wlbot_rasa_1
action_server_1 | 2019-08-22 19:38:10 INFO rasa_sdk.endpoint - Starting action endpoint server...
action_server_1 | 2019-08-22 19:38:10 ERROR rasa_sdk.executor - Failed to register package 'actions.actions'.
action_server_1 | Traceback (most recent call last):
action_server_1 | File "/app/rasa_sdk/executor.py", line 184, in register_package
action_server_1 | self._import_submodules(package)
action_server_1 | File "/app/rasa_sdk/executor.py", line 171, in _import_submodules
action_server_1 | package = importlib.import_module(package)
action_server_1 | File "/usr/local/lib/python3.6/importlib/__init__.py", line 126, in import_module
action_server_1 | return _bootstrap._gcd_import(name[level:], package, level)
action_server_1 | File "<frozen importlib._bootstrap>", line 994, in _gcd_import
action_server_1 | File "<frozen importlib._bootstrap>", line 971, in _find_and_load
action_server_1 | File "<frozen importlib._bootstrap>", line 953, in _find_and_load_unlocked
action_server_1 | ModuleNotFoundError: No module named 'actions.actions'
action_server_1 | 2019-08-22 19:38:10 INFO rasa_sdk.endpoint - Action endpoint is up and running. on ('0.0.0.0', 5055)
rasa_1 | Traceback (most recent call last):
rasa_1 | File "/usr/local/bin/rasa", line 10, in <module>
rasa_1 | sys.exit(main())
rasa_1 | File "/usr/local/lib/python3.6/site-packages/rasa/__main__.py", line 76, in main
rasa_1 | cmdline_arguments.func(cmdline_arguments)
rasa_1 | File "/usr/local/lib/python3.6/site-packages/rasa/cli/x.py", line 291, in rasa_x
rasa_1 | run_locally(args)
rasa_1 | File "/usr/local/lib/python3.6/site-packages/rasa/cli/x.py", line 308, in run_locally
rasa_1 | from rasax.community import local # pytype: disable=import-error
rasa_1 | ModuleNotFoundError: No module named 'rasax'
wlbot_rasa_1 exited with code 1
我在文档中找不到有关如何为Rasa X
(而不是rasa run
)进行配置,以及如何指定特定模型的信息。
请提出建议。谢谢。
答案 0 :(得分:0)
在docker-compose for rasa中,您必须提取图像rasa / rasa-x(其中包含rasa + rasa x)。对于操作,请尝试指定文件(而非目录),例如“ ./actions.py:/app/actions/actions.py”