
如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
可扩展反向图像搜索
基于 http://kubernetes.io/ 和 https://www.elastic.co/ 构建
https://github.com/dsys/match/stargazers https://hub.docker.com/r/dsys/match/ http://kubernetes.io https://app.fossa.io/projects/git%2Bhttps%3A%2F%2Fgithub.com%2Fdsys%2Fmatch?ref=badge_shield
Match 简化了相似图像的搜索过程,使用先进的感知哈希算法,对缩放和90度旋转具有不变性。其HTTP API易于集成,适用于多种反向图像搜索场景。借助Kubernetes和Elasticsearch,Match可轻松扩展至数十亿图像规模,同时让您完全控制数据存储位置。Match底层主要使用 https://github.com/ascribe/image-match 实现图像搜索功能。
通过环境变量配置Match:
bashdocker run -e ELASTICSEARCH_URL=https://daisy.us-west-1.es.amazonaws.com -it docker.xuanyuan.run/dsys/match
git clone https://github.com/dsys/match.git && cd matchmake dev服务配置(match-service.yml)
yamlapiVersion: v1 kind: Service metadata: name: match spec: ports: - name: http port: 80 protocol: TCP selector: app: match
复制控制器配置(match-rc.yml)
yamlapiVersion: v1 kind: ReplicationController metadata: name: match spec: replicas: 1 selector: app: match template: metadata: labels: app: match spec: containers: - name: match image: docker.xuanyuan.run/dsys/match:latest ports: - containerPort: 80 env: - name: WORKER_COUNT value: "4" - name: ELASTICSEARCH_URL valueFrom: secretKeyRef: name: match key: elasticsearch.url - name: ELASTICSEARCH_INDEX valueFrom: secretKeyRef: name: match key: elasticsearch.index - name: ELASTICSEARCH_DOC_TYPE valueFrom: secretKeyRef: name: match key: elasticsearch.doc-type
密钥配置(match-secret.yml)
yamlapiVersion: v1 kind: Secret metadata: name: match data: # 替换为您的Elasticsearch URL(base64编码) elasticsearch.url: aHR0cHM6Ly9kYWlzeS51cy13ZXN0LTEuZXMuYW1hem9uYXdzLmNvbQ== elasticsearch.index: aW1hZ2Vz elasticsearch.doc-type: aW1hZ2Vz
Match提供简单的HTTP API,支持application/x-www-form-urlencoded或multipart/form-data参数:
添加图像签名到数据库
参数:
url/image(必填):图像URL或上传文件filepath(必填):数据库中的图像路径(重复路径会覆盖)metadata(可选):附加的JSON元数据响应示例:
json{"status":"ok","error":[],"method":"add","result":[]}
删除数据库中的图像签名
参数:filepath(必填)
响应示例:
json{"status":"ok","error":[],"method":"delete","result":[]}
搜索相似图像
参数:
url/image(必填):搜索基准图像all_orientations(默认:true):是否搜索90度旋转的相似图像响应示例:
json{"status":"ok","error":[],"method":"search","result":[{"score":99.0,"filepath":"http://example.com/image.jpg"}]}
对比两张图像的相似度
参数:url1/image1和url2/image2(必填)
响应示例:
json{"status":"ok","error":[],"method":"compare","result":[{"score":99.0}]}
获取数据库中的图像签名数量
响应示例:
json{"status":"ok","error":[],"method":"count","result":[420]}
列出数据库中的图像路径
参数:offset(默认:0)、limit(默认:20)
响应示例:
json{"status":"ok","error":[],"method":"list","result":["http://example.com/image1.jpg","http://example.com/image2.jpg"]}
检查服务健康状态
响应示例:
json{"status":"ok","error":[],"method":"ping","result":[]}
bashexport ELASTICSEARCH_URL=https://daisy.us-west-1.es.amazonaws.com make build make run make push
Match基于 https://github.com/ascribe/image-match 开发,后者基于论文《An image signature for any kind of image》(Goldberg et al)。Match采用 https://github.com/dsys/match/blob/master/LICENSE%EF%BC%8Cascribe/image-match%E9%87%87%E7%94%A8Apache 2.0许可证。
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务