From a4754f85bd535dc61fb1c1f64ba2ba5639bc7d14 Mon Sep 17 00:00:00 2001 From: Huawei Date: Mon, 13 Jul 2026 16:39:44 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20=E9=87=8D=E5=86=99=20suite-user/AGENTS.m?= =?UTF-8?q?d=20=E2=80=94=20=E7=89=88=E6=9C=AC=E5=8F=B7+=E8=B7=AF=E5=BE=84+?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E5=AF=B9=E9=BD=90=20v3.0.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- suite-user/AGENTS.md | 51 +++++++++++++++++++++++++++----------------- 1 file changed, 32 insertions(+), 19 deletions(-) diff --git a/suite-user/AGENTS.md b/suite-user/AGENTS.md index 6ad8ebf..a875501 100644 --- a/suite-user/AGENTS.md +++ b/suite-user/AGENTS.md @@ -2,6 +2,29 @@ 你是 AgentGIS 平台的最终用户。你的任务是使用现成的 GIS 套件处理数据。 +## 前置准备 + +### 安装 gis-actions + +```bash +# 下载最新版 +curl -sLO https://git.mercator.cn/api/packages/AgentGIS/generic/gis-actions/3.0.5/gis-actions_3.0.5_all.deb + +# 安装 +sudo dpkg -i gis-actions_3.0.5_all.deb + +# 确认安装成功 +agc --help +``` + +### 确认 Docker 可用 + +```bash +docker ps +``` + +首次执行 `agc run` 时会自动下载 gis-base 运行镜像。 + ## 执行流程 ### 1. 查市场,选套件 @@ -10,35 +33,25 @@ curl -s https://suites.mercator.cn/api/v1/suites | python3 -m json.tool ``` -### 2. 在本地执行套件 +记下你要用的套件 ID。 -所有处理跑在你自己的机器上,数据不上云。 +### 2. 在本地执行 ```bash SUITE_MARKET_URL="https://suites.mercator.cn" \ agc run /tmp/my-output \ --suite-id \ - --input input_path=/path/to/data.shp + --input key=value \ + --input key2=value2 ``` -- `` 从市场获取 - 文件路径用本地绝对路径 -- 参数名请查阅套件文档的 `params` 定义 -- shapefile 只需传 `.shp` 路径,配套文件会自动复制 +- 一个文件一个 `--input`,支持多个 +- shapefile 只需传 `.shp` 路径,配套文件(.shx/.dbf/.prj)会自动复制 ### 3. 取结果 -结果文件在工作目录(例如 `/tmp/my-output`)中。 - -## 前提条件 - -- **Linux 系统**(Debian / Ubuntu) -- **Docker**(验证:`docker ps`) -- **安装 gis-actions**: - ```bash - curl -sLO https://git.mercator.cn/api/packages/SuiteHub/generic/gis-actions/3.0.2/gis-actions_3.0.2_all.deb - sudo dpkg -i gis-actions_3.0.2_all.deb - ``` +结果文件在 `--input output_path` 指定的路径下,默认在 `/tmp/my-output/_step_outputs/` 中。 ## 数据流向 @@ -47,10 +60,10 @@ agc run /tmp/my-output \ │ ▼ agc run(你的机器) - │ ← 从市场下载套件脚本包 + │ ← 从套件市场下载脚本包 │ ← 复制输入文件到工作目录 │ → docker run gis-base + 套件脚本 │ → 结果写入 /tmp/output/ ▼ -结果文件(你的机器) +结果文件留在你的机器 ```