Closed CDN18 closed 1 year ago
麻了
推荐按照指南的docker页面来
我就是按照指南的docker页面来的,但没有配置BlipServer、MoeGoe,请问它们是必须的吗?
配置文件:
app.toml
:
# 不想启动哪个,就注释掉那一部分
# QQ 机器人
[Controller.QQ]
master = [1****, 2*****] # master user id , 管理者账号 ID
account = 3*****1
http_host = 'http://localhost:8080' # Mirai http服务器
ws_host = 'http://localhost:8080' # Mirai Websocket服务器
verify_key = "*******"
trigger = false # 合适的时候主动回复
INTRO = "POWER BY OPENAI" # 后缀
ABOUT = "Created by github.com/LLMKira/Openaibot" # 关于命令返回
WHITE = "Group NOT in WHITE list" # 黑白名单提示
# 设置的代理,但是不代理 openai api, 只代理 bot
proxy = { status = false, url = "http://127.0.0.1:7890" }
# Telegram 机器人
# [Controller.Telegram]
# master = [114, 514] # master user id , 管理者账号 ID
# botToken = '' # 机器人密钥
# trigger = false # 合适的时候主动回复
# INTRO = "POWER BY OPENAI" # 后缀
# ABOUT = "Created by github.com/LLMKira/Openaibot" # 关于命令返回
# WHITE = "Group NOT in WHITE list" # 黑白名单提示
# 设置的代理,但是不代理 openai api, 只代理 bot
# proxy = { status = false, url = "http://127.0.0.1:7890" }
# 基础对话事件服务器,Web支持或者音箱用
[Controller.BaseServer]
host = "127.0.0.1"
port = 9559
service.json
:
{
"redis": {
"host": "redis",
"port": 6379,
"db": 0,
"password": null
},
}
我就是按照指南的docker页面来的,但没有配置BlipServer、MoeGoe,请问它们是必须的吗?
配置文件:
app.toml
:# 不想启动哪个,就注释掉那一部分 # QQ 机器人 [Controller.QQ] master = [1****, 2*****] # master user id , 管理者账号 ID account = 3*****1 http_host = 'http://localhost:8080' # Mirai http服务器 ws_host = 'http://localhost:8080' # Mirai Websocket服务器 verify_key = "*******" trigger = false # 合适的时候主动回复 INTRO = "POWER BY OPENAI" # 后缀 ABOUT = "Created by github.com/LLMKira/Openaibot" # 关于命令返回 WHITE = "Group NOT in WHITE list" # 黑白名单提示 # 设置的代理,但是不代理 openai api, 只代理 bot proxy = { status = false, url = "http://127.0.0.1:7890" } # Telegram 机器人 # [Controller.Telegram] # master = [114, 514] # master user id , 管理者账号 ID # botToken = '' # 机器人密钥 # trigger = false # 合适的时候主动回复 # INTRO = "POWER BY OPENAI" # 后缀 # ABOUT = "Created by github.com/LLMKira/Openaibot" # 关于命令返回 # WHITE = "Group NOT in WHITE list" # 黑白名单提示 # 设置的代理,但是不代理 openai api, 只代理 bot # proxy = { status = false, url = "http://127.0.0.1:7890" } # 基础对话事件服务器,Web支持或者音箱用 [Controller.BaseServer] host = "127.0.0.1" port = 9559
service.json
:{ "redis": { "host": "redis", "port": 6379, "db": 0, "password": null }, }
试一试tg 能不能跑… qq 我没这玩意。。。
我就是按照指南的docker页面来的,但没有配置BlipServer、MoeGoe,请问它们是必须的吗?
配置文件:
app.toml
:# 不想启动哪个,就注释掉那一部分 # QQ 机器人 [Controller.QQ] master = [1****, 2*****] # master user id , 管理者账号 ID account = 3*****1 http_host = 'http://localhost:8080' # Mirai http服务器 ws_host = 'http://localhost:8080' # Mirai Websocket服务器 verify_key = "*******" trigger = false # 合适的时候主动回复 INTRO = "POWER BY OPENAI" # 后缀 ABOUT = "Created by github.com/LLMKira/Openaibot" # 关于命令返回 WHITE = "Group NOT in WHITE list" # 黑白名单提示 # 设置的代理,但是不代理 openai api, 只代理 bot proxy = { status = false, url = "http://127.0.0.1:7890" } # Telegram 机器人 # [Controller.Telegram] # master = [114, 514] # master user id , 管理者账号 ID # botToken = '' # 机器人密钥 # trigger = false # 合适的时候主动回复 # INTRO = "POWER BY OPENAI" # 后缀 # ABOUT = "Created by github.com/LLMKira/Openaibot" # 关于命令返回 # WHITE = "Group NOT in WHITE list" # 黑白名单提示 # 设置的代理,但是不代理 openai api, 只代理 bot # proxy = { status = false, url = "http://127.0.0.1:7890" } # 基础对话事件服务器,Web支持或者音箱用 [Controller.BaseServer] host = "127.0.0.1" port = 9559
service.json
:{ "redis": { "host": "redis", "port": 6379, "db": 0, "password": null }, }
不是必须的
不是必须的
@sudoskys 感谢解答
试一试tg 能不能跑… qq 我没这玩意。。。
@aiastia tg也不行
不是必须的
@sudoskys 感谢解答
试一试tg 能不能跑… qq 我没这玩意。。。
@aiastia tg也不行
日志?
不是必须的
@sudoskys 感谢解答
试一试tg 能不能跑… qq 我没这玩意。。。
@aiastia tg也不行
日志?
sorry,刚刚忘了
openaibot-openaibot-1 | 2023-02-09 14:38:43.374 | INFO | __main__:<module>:25 - NEWS Channel:https://t.me/Openaibot_channel
openaibot-openaibot-1 | Traceback (most recent call last):
openaibot-openaibot-1 | File "/app/main.py", line 52, in <module>
openaibot-openaibot-1 | start()
openaibot-openaibot-1 | File "/app/main.py", line 43, in start
openaibot-openaibot-1 | module = importlib.import_module('App.' + starter)
openaibot-openaibot-1 | File "/usr/local/lib/python3.10/importlib/__init__.py", line 126, in import_module
openaibot-openaibot-1 | return _bootstrap._gcd_import(name[level:], package, level)
openaibot-openaibot-1 | File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
openaibot-openaibot-1 | File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
openaibot-openaibot-1 | File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
openaibot-openaibot-1 | File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
openaibot-openaibot-1 | File "<frozen importlib._bootstrap_external>", line 883, in exec_module
openaibot-openaibot-1 | File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
openaibot-openaibot-1 | File "/app/App/Telegram.py", line 20, in <module>
openaibot-openaibot-1 | from App import Event
openaibot-openaibot-1 | File "/app/App/Event.py", line 13, in <module>
openaibot-openaibot-1 | import llm_kira
openaibot-openaibot-1 | ModuleNotFoundError: No module named 'llm_kira'
openaibot-openaibot-1 exited with code 1
redis是正常启动的
依赖都缺失了,需要安装依赖
依赖都缺失了,需要安装依赖
意思是说我要到容器里手动安装依赖? 这个部署文档里没有提啊 我试试
docker那个容器一打开就报上面的错误闪退,根本进不去。
在docker外手动执行pip install -r requirements.txt
会报如下错误:
Installing collected packages: fasttext, aiosignal, tzlocal, scikit-learn, rich, pyTelegramBotAPI, graia-amnesia, creart, aiohttp, fastapi, creart-graia, apscheduler, graia-ariadne
DEPRECATION: fasttext is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559
Running setup.py install for fasttext ... error
error: subprocess-exited-with-error
× Running setup.py install for fasttext did not run successfully.
│ exit code: 1
╰─> [40 lines of output]
/usr/local/python/3.10.4/lib/python3.10/site-packages/setuptools/dist.py:717: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead
warnings.warn(
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.10
creating build/lib.linux-x86_64-3.10/fasttext
copying python/fasttext_module/fasttext/__init__.py -> build/lib.linux-x86_64-3.10/fasttext
copying python/fasttext_module/fasttext/FastText.py -> build/lib.linux-x86_64-3.10/fasttext
creating build/lib.linux-x86_64-3.10/fasttext/util
copying python/fasttext_module/fasttext/util/util.py -> build/lib.linux-x86_64-3.10/fasttext/util
copying python/fasttext_module/fasttext/util/__init__.py -> build/lib.linux-x86_64-3.10/fasttext/util
creating build/lib.linux-x86_64-3.10/fasttext/tests
copying python/fasttext_module/fasttext/tests/__init__.py -> build/lib.linux-x86_64-3.10/fasttext/tests
copying python/fasttext_module/fasttext/tests/test_script.py -> build/lib.linux-x86_64-3.10/fasttext/tests
copying python/fasttext_module/fasttext/tests/test_configurations.py -> build/lib.linux-x86_64-3.10/fasttext/tests
running build_ext
creating tmp
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/python/3.10.4/include/python3.10 -c /tmp/tmp0cxd9lhc.cpp -o tmp/tmp0cxd9lhc.o -std=c++14
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/python/3.10.4/include/python3.10 -c /tmp/tmpo5j7mey9.cpp -o tmp/tmpo5j7mey9.o -fvisibility=hidden
building 'fasttext_pybind' extension
creating build/temp.linux-x86_64-3.10
creating build/temp.linux-x86_64-3.10/python
creating build/temp.linux-x86_64-3.10/python/fasttext_module
creating build/temp.linux-x86_64-3.10/python/fasttext_module/fasttext
creating build/temp.linux-x86_64-3.10/python/fasttext_module/fasttext/pybind
creating build/temp.linux-x86_64-3.10/src
gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/python/3.10.4/lib/python3.10/site-packages/pybind11/include -I/usr/local/python/3.10.4/lib/python3.10/site-packages/pybind11/include -Isrc -I/usr/local/python/3.10.4/include/python3.10 -c python/fasttext_module/fasttext/pybind/fasttext_pybind.cc -o build/temp.linux-x86_64-3.10/python/fasttext_module/fasttext/pybind/fasttext_pybind.o -DVERSION_INFO="0.9.2" -std=c++14 -fvisibility=hidden
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc: In lambda function:
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc:345:35: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘std::vector<long int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
345 | for (int32_t i = 0; i < vocab_freq.size(); i++) {
| ~~^~~~~~~~~~~~~~~~~~~
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc: In lambda function:
python/fasttext_module/fasttext/pybind/fasttext_pybind.cc:359:35: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘std::vector<long int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
359 | for (int32_t i = 0; i < labels_freq.size(); i++) {
| ~~^~~~~~~~~~~~~~~~~~~~
gcc: fatal error: Killed signal terminated program cc1plus
compilation terminated.
error: command '/usr/bin/gcc' failed with exit code 1
[end of output]
note: This error originates from a subprocess, and is likely not a problem with pip.
error: legacy-install-failure
× Encountered error while trying to install package.
╰─> fasttext
Python 3.9/3.10均报此错误
依赖问题,fasttext 装不上.... 你其实也可以不装,但是llm-kira 必须要求装来着。。。。
它需要 一个 gcc
docker那个容器一打开就报上面的错误闪退,根本进不去。
在docker外手动执行
pip install -r requirements.txt
会报如下错误:Installing collected packages: fasttext, aiosignal, tzlocal, scikit-learn, rich, pyTelegramBotAPI, graia-amnesia, creart, aiohttp, fastapi, creart-graia, apscheduler, graia-ariadne DEPRECATION: fasttext is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559 Running setup.py install for fasttext ... error error: subprocess-exited-with-error × Running setup.py install for fasttext did not run successfully. │ exit code: 1 ╰─> [40 lines of output] /usr/local/python/3.10.4/lib/python3.10/site-packages/setuptools/dist.py:717: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( running install running build running build_py creating build creating build/lib.linux-x86_64-3.10 creating build/lib.linux-x86_64-3.10/fasttext copying python/fasttext_module/fasttext/__init__.py -> build/lib.linux-x86_64-3.10/fasttext copying python/fasttext_module/fasttext/FastText.py -> build/lib.linux-x86_64-3.10/fasttext creating build/lib.linux-x86_64-3.10/fasttext/util copying python/fasttext_module/fasttext/util/util.py -> build/lib.linux-x86_64-3.10/fasttext/util copying python/fasttext_module/fasttext/util/__init__.py -> build/lib.linux-x86_64-3.10/fasttext/util creating build/lib.linux-x86_64-3.10/fasttext/tests copying python/fasttext_module/fasttext/tests/__init__.py -> build/lib.linux-x86_64-3.10/fasttext/tests copying python/fasttext_module/fasttext/tests/test_script.py -> build/lib.linux-x86_64-3.10/fasttext/tests copying python/fasttext_module/fasttext/tests/test_configurations.py -> build/lib.linux-x86_64-3.10/fasttext/tests running build_ext creating tmp gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/python/3.10.4/include/python3.10 -c /tmp/tmp0cxd9lhc.cpp -o tmp/tmp0cxd9lhc.o -std=c++14 gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/python/3.10.4/include/python3.10 -c /tmp/tmpo5j7mey9.cpp -o tmp/tmpo5j7mey9.o -fvisibility=hidden building 'fasttext_pybind' extension creating build/temp.linux-x86_64-3.10 creating build/temp.linux-x86_64-3.10/python creating build/temp.linux-x86_64-3.10/python/fasttext_module creating build/temp.linux-x86_64-3.10/python/fasttext_module/fasttext creating build/temp.linux-x86_64-3.10/python/fasttext_module/fasttext/pybind creating build/temp.linux-x86_64-3.10/src gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/python/3.10.4/lib/python3.10/site-packages/pybind11/include -I/usr/local/python/3.10.4/lib/python3.10/site-packages/pybind11/include -Isrc -I/usr/local/python/3.10.4/include/python3.10 -c python/fasttext_module/fasttext/pybind/fasttext_pybind.cc -o build/temp.linux-x86_64-3.10/python/fasttext_module/fasttext/pybind/fasttext_pybind.o -DVERSION_INFO="0.9.2" -std=c++14 -fvisibility=hidden python/fasttext_module/fasttext/pybind/fasttext_pybind.cc: In lambda function: python/fasttext_module/fasttext/pybind/fasttext_pybind.cc:345:35: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘std::vector<long int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 345 | for (int32_t i = 0; i < vocab_freq.size(); i++) { | ~~^~~~~~~~~~~~~~~~~~~ python/fasttext_module/fasttext/pybind/fasttext_pybind.cc: In lambda function: python/fasttext_module/fasttext/pybind/fasttext_pybind.cc:359:35: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘std::vector<long int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 359 | for (int32_t i = 0; i < labels_freq.size(); i++) { | ~~^~~~~~~~~~~~~~~~~~~~ gcc: fatal error: Killed signal terminated program cc1plus compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> fasttext
Python 3.9/3.10均报此错误
docker 不应该依赖缺啊。你是不是没看教程? 用的啥docker 啊
docker那个容器一打开就报上面的错误闪退,根本进不去。 在docker外手动执行
pip install -r requirements.txt
会报如下错误:Installing collected packages: fasttext, aiosignal, tzlocal, scikit-learn, rich, pyTelegramBotAPI, graia-amnesia, creart, aiohttp, fastapi, creart-graia, apscheduler, graia-ariadne DEPRECATION: fasttext is being installed using the legacy 'setup.py install' method, because it does not have a 'pyproject.toml' and the 'wheel' package is not installed. pip 23.1 will enforce this behaviour change. A possible replacement is to enable the '--use-pep517' option. Discussion can be found at https://github.com/pypa/pip/issues/8559 Running setup.py install for fasttext ... error error: subprocess-exited-with-error × Running setup.py install for fasttext did not run successfully. │ exit code: 1 ╰─> [40 lines of output] /usr/local/python/3.10.4/lib/python3.10/site-packages/setuptools/dist.py:717: UserWarning: Usage of dash-separated 'description-file' will not be supported in future versions. Please use the underscore name 'description_file' instead warnings.warn( running install running build running build_py creating build creating build/lib.linux-x86_64-3.10 creating build/lib.linux-x86_64-3.10/fasttext copying python/fasttext_module/fasttext/__init__.py -> build/lib.linux-x86_64-3.10/fasttext copying python/fasttext_module/fasttext/FastText.py -> build/lib.linux-x86_64-3.10/fasttext creating build/lib.linux-x86_64-3.10/fasttext/util copying python/fasttext_module/fasttext/util/util.py -> build/lib.linux-x86_64-3.10/fasttext/util copying python/fasttext_module/fasttext/util/__init__.py -> build/lib.linux-x86_64-3.10/fasttext/util creating build/lib.linux-x86_64-3.10/fasttext/tests copying python/fasttext_module/fasttext/tests/__init__.py -> build/lib.linux-x86_64-3.10/fasttext/tests copying python/fasttext_module/fasttext/tests/test_script.py -> build/lib.linux-x86_64-3.10/fasttext/tests copying python/fasttext_module/fasttext/tests/test_configurations.py -> build/lib.linux-x86_64-3.10/fasttext/tests running build_ext creating tmp gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/python/3.10.4/include/python3.10 -c /tmp/tmp0cxd9lhc.cpp -o tmp/tmp0cxd9lhc.o -std=c++14 gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/python/3.10.4/include/python3.10 -c /tmp/tmpo5j7mey9.cpp -o tmp/tmpo5j7mey9.o -fvisibility=hidden building 'fasttext_pybind' extension creating build/temp.linux-x86_64-3.10 creating build/temp.linux-x86_64-3.10/python creating build/temp.linux-x86_64-3.10/python/fasttext_module creating build/temp.linux-x86_64-3.10/python/fasttext_module/fasttext creating build/temp.linux-x86_64-3.10/python/fasttext_module/fasttext/pybind creating build/temp.linux-x86_64-3.10/src gcc -pthread -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/usr/local/python/3.10.4/lib/python3.10/site-packages/pybind11/include -I/usr/local/python/3.10.4/lib/python3.10/site-packages/pybind11/include -Isrc -I/usr/local/python/3.10.4/include/python3.10 -c python/fasttext_module/fasttext/pybind/fasttext_pybind.cc -o build/temp.linux-x86_64-3.10/python/fasttext_module/fasttext/pybind/fasttext_pybind.o -DVERSION_INFO="0.9.2" -std=c++14 -fvisibility=hidden python/fasttext_module/fasttext/pybind/fasttext_pybind.cc: In lambda function: python/fasttext_module/fasttext/pybind/fasttext_pybind.cc:345:35: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘std::vector<long int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 345 | for (int32_t i = 0; i < vocab_freq.size(); i++) { | ~~^~~~~~~~~~~~~~~~~~~ python/fasttext_module/fasttext/pybind/fasttext_pybind.cc: In lambda function: python/fasttext_module/fasttext/pybind/fasttext_pybind.cc:359:35: warning: comparison of integer expressions of different signedness: ‘int32_t’ {aka ‘int’} and ‘std::vector<long int>::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 359 | for (int32_t i = 0; i < labels_freq.size(); i++) { | ~~^~~~~~~~~~~~~~~~~~~~ gcc: fatal error: Killed signal terminated program cc1plus compilation terminated. error: command '/usr/bin/gcc' failed with exit code 1 [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. error: legacy-install-failure × Encountered error while trying to install package. ╰─> fasttext
Python 3.9/3.10均报此错误
docker 不应该依赖缺啊。你是不是没看教程? 用的啥docker 啊
两个测试机的版本分别是:
Docker version 20.10.23, build 7155243
Docker version 20.10.22+azure-1, build 3a2c30b63ab20acfcc3f3550ea756a0561655a77
pip install fasttext-wheel pip install fasttext
pip install fasttext-wheel pip install fasttext
预先安装这两个包后可以正常运行,十分感谢!
另外安装的时候还遇到过依赖kenlm
无法安装,apt install python3-dev
后解决。
但docker还是缺依赖,不知道什么原因orz
刚刚拉取最新镜像重新测试,问题已经解决,感谢修复!