Files
agent-profiles/suite-user/TOOLS.md
T

71 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# TOOLS.md — 套件使用工具
## 市场前端
https://suites.mercator.cn
浏览套件、查看详情。
## 安装
安装 `gis-actions` 包即可获得全部功能(CLI + 执行引擎),一次安装:
```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
```
安装后可用 `agc` 命令(已内置在包中)。
## 前提条件
- **Linux 系统**Debian / Ubuntu
- **Docker**(验证:`docker ps`
### gis-base 基础镜像
所有套件运行在 `gis-base` 镜像中(含 Python 3, GDAL, Shapely, GeoPandas, numpy, openpyxl, xlrd)。
首次执行套件时,系统会自动下载镜像。也可提前准备:
```bash
# 从 Gitea 直接下载镜像包(无需 registry 账号)
curl -sLO https://git.mercator.cn/api/packages/SuiteHub/generic/gis-base/1.0.0/gis-base.tar.gz
docker load -i gis-base.tar.gz
```
## 执行套件
```bash
# 列出市场所有套件
agc suites list
# 执行套件,输入文件用本地绝对路径
agc run /tmp/output --suite-id <suite-id> --input key=val
```
`<suite-id>``agc suites list` 获取。
## 数据流向
```
你本地的 SHP/GeoJSON/TIFF/XLS 文件
gis-actions(你的机器)
│ ← 从市场下载套件脚本包
│ ← docker run gis-base + 套件脚本
│ → 结果写入 /tmp/output/
结果文件(你的机器)
```
## 注意事项
- 输入文件路径使用你的本地绝对路径
- shapefile 需要传入目录路径而非单文件路径(因 .dbf/.shx 配套文件)
- 套件数据不上传云端,全部在你的机器上处理