
如果你使用 DeepSeek、元宝 AI、Copilot、ChatGPT 等 AI 工具,协助配置轩辕镜像、编写 docker pull 命令、修改 Docker Compose 镜像地址、配置镜像加速、排查镜像拉取失败、分析报错日志等问题,请先让 AI 阅读并遵守轩辕镜像的规则文档。
只需在 AI 对话中先发送下面这句话即可:
请先完整阅读并严格遵守以下文档中的全部规则与要求:
https://xuanyuan.cloud/agents.md
在未充分阅读并理解该文档前,不要生成任何命令、配置、修改建议、故障排查方案或技术回答。后续所有输出都必须严格以该文档中的规范为最高优先级执行。查看 agents.md 用法指南与完整示范。国内用户首推 元宝 AI、DeepSeek 的深度思考模式,不推荐豆包 AI;Cursor 等编辑器可在对话 @ 该链接,或加入 User Rules。 若 AI 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
https://raw.githubusercontent.com/oceanprotocol/art/master/github/repo-banner%402x.png]([***]
帮助数据发布者提供扩展数据服务(如存储和计算)。 oceanprotocol.com
"🏄♀️🌊 Brizo是古希腊女神,被称为水手和渔民的保护者。她主要受到德洛斯岛女性的崇拜,她们会用小船摆放食物供品。Brizo也是一位擅长解读梦境的先知。"
。Brizo作为发布者生态的一部分,包含与基础设施(最初是云,也可以是本地部署)交互的凭据。
主要功能包括:
/services/consume端点,数据集文件会流式返回给用户,而不暴露实际URL。/services/compute端点,计算算法会通过计算提供者的服务操作器端点远程执行。详细功能可参考Brizo API文档。
如果您想贡献Brizo的开发,可以按照以下步骤操作(生产环境运行需另行配置):
bashgit clone git@github.com:oceanprotocol/brizo.git cd brizo/
bashvirtualenv venv -p python3.6 source venv/bin/activate
bashpip install -r requirements_dev.txt
bashgit clone git@github.com:oceanprotocol/barge.git cd barge bash start_ocean.sh --no-brizo --no-commons
Barge是Ocean Docker Compose文件的仓库,start_ocean.sh --no-brizo会启动Ocean项目所需的服务(不含Brizo实例)。更多信息请参考https://github.com/oceanprotocol/barge%E3%80%82
使用Flask(HTTP)
bashexport FLASK_APP=brizo/run.py export CONFIG_FILE=config.ini ./scripts/wait_for_migration_and_extract_keeper_artifacts.sh export PROVIDER_ADDRESS="您的以太坊地址" # 设置以下任一变量 export PROVIDER_KEY="私钥" export PROVIDER_ENCRYPTED_KEY="密钥文件中的加密JSON" export PROVIDER_KEYFILE="您的以太坊地址" # 如果使用PROVIDER_KEYFILE或PROVIDER_ENCRYPTED_KEY,需设置密码 export PROVIDER_PASSWORD="解密密钥的密码" flask run --port=8030
使用Gunicorn(HTTPS)
首先生成测试证书:
bashopenssl req -x509 -newkey rsa:4096 -nodes -out cert.pem -keyout key.pem -days 365 # Common Name(CN)填写localhost
编辑config.ini:
inibrizo.url = https://localhost:8030
启动Gunicorn:
bashgunicorn --certfile cert.pem --keyfile key.pem -b 0.0.0.0:8030 -w 1 brizo.run:app
启动Brizo后,可访问API文档:
bashhttps://127.0.0.1:8030/api/v1/docs
也可参考官方文档:Brizo API文档。
Brizo优先从环境变量CONFIG_FILE指定的路径加载配置,否则使用config.ini。部分配置可通过环境变量覆盖。
[keeper-contracts]
用于设置与keeper节点的连接和加载合约 artifacts。
[resources]
配置:
[***]
发布者可在此配置第三方服务凭据(如Azure Storage)。Brizo支持以下存储类型:
Azure Storage配置
在config.ini的[osmosis]部分设置:
ini[osmosis] azure.account.name = <Azure存储账户名> azure.account.key = <Azure存储账户密钥> azure.resource_group = <Azure资源组> azure.location = <Azure区域> azure.client.id = <Azure应用ID> azure.client.secret = <Azure应用密钥> azure.tenant.id = <Azure租户ID> azure.subscription.id = <Azure订阅ID> azure.share.input = compute azure.share.output = output
也可通过环境变量覆盖:AZURE_ACCOUNT_NAME、AZURE_ACCOUNT_KEY等。
Amazon S3配置
无需在config.ini中设置,凭据存储在其他位置,参考Amazon S3教程。
IPFS配置
设置环境变量IPFS_GATEWAY(默认值:[***]
本地存储配置
无需特殊设置,只需确保文件URL可被Brizo解析,参考本地存储教程。
支持计算到数据功能需:
config.ini的[resources]部分设置operator_service.urlOPERATOR_SERVICE_URLBrizo依赖以下Ocean库:
参考Ocean的Python开发指南:
通过Travis自动执行测试(配置在.travis.yaml),使用tox和pytest框架。
使用PyCharm调试Brizo:
bash start_ocean.sh --no-brizo --no-commons --local-nile-nodeSettings > Project Settings > Python Debugger,勾选"Gevent Compatible"Run > Edit Configurations,添加新配置(Python类型),设置脚本路径为brizo/run.py,工作目录为项目根目录CONFIG_FILE=config.ini、Azure凭据等)使用bumpversion.sh脚本更新版本,参数为major/minor/patch:
bash./bumpversion.sh patch
textCopyright 2018 Ocean Protocol Foundation Ltd. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at [***] Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务