如果你使用 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 无法访问外链,可 打开说明文档 复制全文粘贴。文档会随站点更新,复制内容可能过期,建议定期检查。
staging_service是一个用于搭建本地开发环境的服务镜像,主要提供文件管理、用户认证、Globus集成及文件类型检测等功能。该镜像需在Docker环境中运行,也支持本地Python开发调试,适用于需要处理用户文件、权限验证和第三方存储集成的开发场景。
requirements.txt依赖需创建以下目录结构:
data/ - bulk/ - username/ # 为每个需要使用服务的用户创建目录 - username/
安装Python依赖:
bashpip install -r requirements.txt
启动服务:
bash/deployment/bin/entrypoint.sh
bash/run_in_docker.sh
镜像包含Visual Studio Code的Python调试配置,与entrypoint.sh中的设置一致。在VSCode中打开项目后,可直接使用调试器设置断点进行本地调试和测试。
tar、unzip、zip、gzip、bzip2、md5sum、head、tail、wc所有路径均以用户主目录为根目录。
ci.kbase.us/services/staging_service/test-servicelocalhost:3000/test-serviceGET成功响应
200 OKThis is just a test. This is only a test.
ci.kbase.us/services/staging_service/test-authlocalhost:3000/test-authGETAuthorization: <Valid Auth token>成功响应
200 OKI'm authenticated as <username>
错误响应
401 Unauthorized,响应内容 Error Connecting to auth service ...400 Bad Request,响应内容 Must supply tokenci.kbase.us/services/staging_service/file-lifetimelocalhost:3000/file-lifetimeGET成功响应
200 OK90
默认不显示隐藏文件(以.开头的文件)。
ci.kbase.us/services/staging_service/list/{path to directory}ci.kbase.us/services/staging_service/list/{path to directory}?showHidden={True/False}localhost:3000/list/{path to directory}localhost:3000/list/{path to directory}?showHidden={True/False}GETAuthorization: <Valid Auth token>成功响应
200 OKjson[ { "name": "testFolder", "path": "nixonpjoshua/testFolder", "mtime": 1510949575000, "size": 96, "isFolder": true }, { "name": "testfile", "path": "nixonpjoshua/testfile", "mtime": 1510949629000, "size": 335, "isFolder": false } ]
错误响应
401 Unauthorized,响应内容 Error Connecting to auth service ...400 Bad Request,响应内容 Must supply token404 Not Found,响应内容 path <username>/<incorrect path> does not existci.kbase.us/services/staging_service/download/{path to file}localhost:3000/download/{path to file}GETAuthorization: <Valid Auth token>成功响应
200 OK错误响应
401 Unauthorized,响应内容 Error Connecting to auth service ...400 Bad Request,响应内容 Must supply token400 Bad Request,响应内容 <username>/<incorrect path> is a directory not a file404 Not Found,响应内容 path <username>/<incorrect path> does not exist默认不显示隐藏文件。
ci.kbase.us/services/staging_service/search/{search query}ci.kbase.us/services/staging_service/search/{search query}?showHidden={True/False}localhost:3000/search/{search query}localhost:3000/search/?showHidden={True/False}GETAuthorization: <Valid Auth token>成功响应
200 OKjson[ { "name": "testfile", "path": "nixonpjoshua/testfile", "mtime": 1510949629000, "size": 335, "isFolder": false }, { "name": "testFolder", "path": "nixonpjoshua/testFolder", "mtime": 1510949575000, "size": 96, "isFolder": true }, { "name": "testinnerFile", "path": "nixonpjoshua/testFolder/testinnerFile", "mtime": 1510949575000, "size": 0, "isFolder": false } ]
错误响应
401 Unauthorized,响应内容 Error Connecting to auth service ...400 Bad Request,响应内容 Must supply tokenci.kbase.us/services/staging_service/metadata/{path to file or folder}localhost:3000/metadata/{path to file or folder}GETAuthorization: <Valid Auth token>成功响应
200 OKjson{ "name": "testFolder", "path": "nixonpjoshua/testFolder", "mtime": 1510949575000, "size": 96, "isFolder": true }
json{ "md5": "73cf08ad9d78d3fc826f0f265139de33", "lineCount": "13", "head": "there is stuff in this file\nthere is stuff in this file\nthere is stuff in this file\nthere is stuff in this file\nthere is stuff in this file\nthere is stuff in this file\nthere is stuff in this file\nstuff at the bottom\nstuff at the bottom\nstuff at the bottom", "tail": "there is stuff in this file\nthere is stuff in this file\nthere is stuff in this file\nstuff at the bottom\nstuff at the bottom\nstuff at the bottom\nstuff at the bottom\nstuff at the bottom\nstuff at the bottom\nstuff at the bottom", "name": "testFile", "path": "nixonpjoshua/testFile", "mtime": 1510949629000, "size": 335, "isFolder": false }
错误响应
401 Unauthorized,响应内容 Error Connecting to auth service ...400 Bad Request,响应内容 Must supply token404 Not Found,响应内容 path <username>/<incorrect path> does not existci.kbase.us/services/staging_service/uploadlocalhost:3000/uploadPOSTAuthorization: <Valid Auth token>destPath: {path file should end up in}(文件目标路径)uploads: {multipart file}(多部分文件数据).开头的文件成功响应
200 OKjson[ { "name": "fasciculatum_supercontig.fasta", "path": "nixonpjoshua/fasciculatum_supercontig.fasta", "mtime": 1510950061000, "size": 31536508, "isFolder": false } ]
错误响应
401 Unauthorized,响应内容 Error Connecting to auth service ...400 Bad Request,响应内容 Must supply tokenci.kbase.us/services/staging_service/define-upa/{path to imported file}localhost:3000/define-upa/{path to imported file}POSTAuthorization: <Valid Auth token>UPA: {the actual UPA of imported file}(导入文件的UPA)成功响应
200 OKsuccessfully update UPA <UPA> for file <Path>
错误响应
401 Unauthorized,响应内容 Error Connecting to auth service ...400 Bad Request,响应内容 Must supply token400 Bad Request,响应内容 must provide UPA field in bodyci.kbase.us/services/staging_service/delete/{path to file or folder}localhost:3000/delete/{path to file or folder}DELETEAuthorization: <Valid Auth token>成功响应
200 OKsuccessfully deleted UPA <Path>
错误响应
401 Unauthorized,响应内容 Error Connecting to auth service ...400 Bad Request,响应内容 Must supply token404 Not Found,响应内容 could not delete <Path>403 Forbidden,响应内容 cannot delete home directory 或 cannot delete protected fileci.kbase.us/services/staging_service/mv/{path to file or folder}localhost:3000/mv/{path to file or folder}PATCHAuthorization: <Valid Auth token>newPath : {the new location/name for file or folder}(新路径/名称)成功响应
200 OKsuccessfully moved <path> to <newPath>
错误响应
401 Unauthorized,响应内容 Error Connecting to auth service ...400 Bad Request,响应内容 Must supply token400 Bad Request,响应内容 must provide newPath field in body403 Forbidden,响应内容 cannot rename home or move directory 或 cannot rename or move protected file409 Conflict,响应内容 <newPath> allready exists支持的归档格式:.zip、.ZIP、.tar.gz、.tgz、.tar.bz、.tar.bz2、.tar、.gz、.bz2、.bzip2
ci.kbase.us/services/staging_service/decompress/{path to archive}localhost:3000/decompress/{path to archive}PATCHAuthorization: <Valid Auth token>成功响应
200 OKsuccessfully decompressed <path to archive>
错误响应
401 Unauthorized,响应内容 Error Connecting to auth service ...400 Bad Request,响应内容 Must supply token400 Bad Request,响应内容 cannot decompress a <file extension> file认证后,查询AUTH获取文件路径和Globus ID文件,用于链接Globus。
ci.kbase.us/services/staging_service/add-acllocalhost:3000/add-aclGETAuthorization: <Valid Auth token>成功响应
您可以使用以下命令拉取该镜像。请将 <标签> 替换为具体的标签版本。如需查看所有可用标签版本,请访问 标签列表页面。
来自真实用户的反馈,见证轩辕镜像的优质服务