
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
The UnitConversion microservice is packaged as a docker container named:
osdcunitconversionservice
It is available on dockerhub, under the digiwells organization, at:
https://hub.docker.com/?namespace=digiwells
The API (OpenApi schema) of the microservice is available and testable at:
[***]
The microservice itself is available at:
[] [] [] []
The service stores its SQLite database and local runtime files under the shared home/ location. In Docker this folder is mounted as /home.
The Docker image reads an optional external configuration file from:
/home/UnitConversion.Service.json
This path can be overridden with the UNITCONVERSION_EXTERNAL_CONFIG environment variable. Use a shared volume for /home when running the container so the database, vector database, optional external configuration, and generated MCP hub instance id survive container restarts.
The Docker image also carries a seed copy of the MCP vector document database at /app/seed/UnitConversionVectors.db. At startup, the service copies that seed into /home/UnitConversionVectors.db only when the runtime file is missing. This keeps /home persistent while avoiding the Kubernetes volume mount hiding the database bundled in the image.
Example:
bashdocker run -p 8080:8080 -e ASPNETCORE_URLS=http://+:8080 -v %CD%/home:/home osdcunitconversionservice
Alongside the REST API, the microservice exposes a https://modelcontextprotocol.io/ server that allows MCP compatible clients to call domain specific tools over HTTP (or WebSocket) transports. The public entry point is:
https://app.digiwells.no/UnitConversion/api/mcp
When running the service locally the default endpoint is:
http://localhost:5002/UnitConversion/api/mcp
| Tool name | Description |
|---|---|
ping | Returns a pong payload to validate connectivity |
get_all_physical_quantity_id / get_physical_quantity_by_id / get_all_physical_quantity | List or retrieve physical quantities |
find_physical_quantity_id_by_name | Tolerant lookup of a physical quantity identifier by name/synonym |
convert_unit_value | Convert values between two unit choices for a given physical quantity |
get_all_unit_system_id / get_unit_system_by_id / get_all_unit_system_light / get_all_unit_system | List or retrieve unit systems |
find_unit_system_id_by_name | Tolerant lookup of unit system identifiers |
post_unit_system, put_unit_system_by_id, delete_unit_system_by_id | Manage user-defined unit systems |
convert_unit_system_value | Convert values between two unit systems |
search_vector_resources | Returns the top vector-matched resource URIs plus similarity scores for a textual query |
get_all_unit_conversion_set_*, get_unit_conversion_set_by_id, post_unit_conversion_set, put_unit_conversion_set_by_id, delete_unit_conversion_set_by_id | Manage unit conversion sets |
get_all_unit_system_conversion_set_*, get_unit_system_conversion_set_by_id, post_unit_system_conversion_set, put_unit_system_conversion_set_by_id, delete_unit_system_conversion_set_by_id | Manage unit system conversion sets |
search_vector_resources expects a nomic-ai/nomic-embed-text compatible endpoint (default http://localhost:8080/embeddings). Configure VectorDocumentSearch:Nomic:* or the NOMIC_API_KEY environment variable if the inference server requires authentication, and ensure the vector database was generated with the same model/dimension pair. If search cannot run, the MCP response distinguishes between a missing vector database, an unreachable embedding endpoint, and an embedding dimension mismatch.
You can call tools over HTTP by POSTing a JSON-RPC 2.0 request. For example, to convert a value between two unit choices:
bashcurl -X POST \ -H "Content-Type: application/json" \ -H "Accept: application/json" \ -d '{ "jsonrpc": "2.0", "id": 1, "method": "tools.call", "params": { "name": "convert_unit_value", "arguments": { "physicalQuantity": "Mud Density", "unitIn": "kilogram per cubic metre", "unitOut": "pound per gallon", "value": 1200 } } }' \ http://localhost:5002/UnitConversion/api/mcp
Clients that prefer Server Sent Events (SSE) or WebSockets can switch the transport mode during the MCP handshake—the service accepts both HTTP streaming and WebSocket sessions.
The service can optionally register its MCP endpoint on an MCP hub. Enable this through the external configuration file:
json{ "McpHub": { "Enabled": true, "HubBaseUrl": "https://mcp-hub.example.com/api", "RegistrationEndpoint": "McpMicroservice", "RetryIntervalSeconds": 60, "PublicBaseUrl": "https://dev.digiwells.no", "ServiceName": "UnitConversion", "InstanceId": "", "UnregisterOnShutdown": true } }
When enabled, the service registers a fixed UnitConversion service type id, a configured or persisted instance id, and MCP URLs derived from PublicBaseUrl:
PublicBaseUrl + "/UnitConversion/api/mcp"PublicBaseUrl converted to ws/wss plus "/UnitConversion/api/mcp/ws"If HubBaseUrl or PublicBaseUrl is missing, registration is skipped. If the hub is configured but unreachable, registration is retried every RetryIntervalSeconds seconds. On graceful shutdown, the service attempts to unregister its instance when UnregisterOnShutdown is true.
The current work has been funded by the Research Council of Norway and Industry partners in the framework of the cent for research-based innovation SFI Digiwells (2020-2028) focused on Digitalization, Drilling Engineering and GeoSteering.
Eric Cayeux, NORCE Energy Modelling and Automation
Gilles Pelfrene, NORCE Energy Modelling and Automation
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务