docs: 更新工具安装指南,引用 SuiteHub Packages

This commit is contained in:
2026-07-10 05:43:45 +00:00
parent adb3ee9124
commit e7a3658cac
+24 -21
View File
@@ -9,8 +9,8 @@ https://suites.mercator.cn
## CLI(可选) ## CLI(可选)
```bash ```bash
# 安装 # 安装 agentgis-cli
pip install https://git.mercator.cn/SuiteHub/agentgis-cli/raw/branch/main/dist/agentgis_cli-0.1.0-py3-none-any.whl pip install https://git.mercator.cn/api/packages/SuiteHub/generic/agentgis-cli/0.1.0/agentgis_cli-0.1.0-py3-none-any.whl
# 配置 API Key # 配置 API Key
agc config set api-key mk_xxxxxxxxx agc config set api-key mk_xxxxxxxxx
@@ -21,9 +21,6 @@ agc run <suite-id> --inputs '{"input_path": "/data/myfile.shp"}'
# 查看套件列表 # 查看套件列表
agc suites list agc suites list
# 查看套件列表
agc suites list
# 查看执行状态 # 查看执行状态
agc status <task-id> agc status <task-id>
``` ```
@@ -34,23 +31,24 @@ gis-actions 是套件的本地执行引擎,跑在你的机器上。
### 前提条件 ### 前提条件
- **Python 3.10+**(验证:`python3 --version` - **Debian / Ubuntu 系统**
- **Docker**(验证:`docker ps` - **Docker**(验证:`docker ps`
- Linux`apt install docker.io``yum install docker` - `sudo apt install docker.io`
- Windows/Mac:安装 Docker Desktop
- 能访问 `registry.mercator.cn`(拉取 gis-base 镜像) - 能访问 `registry.mercator.cn`(拉取 gis-base 镜像)
### 安装 ### 安装
```bash ```bash
# 下载 gis-actions # 下载并安装 gis-actions
# 或从源码安装 wget -O agentgis-worker.deb https://git.mercator.cn/api/packages/SuiteHub/generic/gis-actions/v2.0.0-alpha/agentgis-worker_2.0.0-alpha_all.deb
# gis-actions 安装方式待定 sudo dpkg -i agentgis-worker.deb
# 安装后会自动配置 systemd 服务和 Docker insecure-registry
``` ```
### 配置 ### 配置
创建 `config.json` 编辑 `/etc/agentgis/worker.json`
```json ```json
{ {
@@ -74,23 +72,28 @@ API Key 从 https://auth.mercator.cn 获取。
### 启动 ### 启动
```bash ```bash
python3 -m gis_actions --config config.json sudo systemctl start agentgis-worker
sudo systemctl status agentgis-worker
``` ```
启动后自动连接调度中心,注册自身,开始等待任务。 ### 验证
保持终端开着,或使用进程管理工具(systemd / supervisor)后台运行。
### 验证是否运行成功
```bash ```bash
# 查看日志输出,应看到: journalctl -u agentgis-worker -f
# Worker xxx started, polling https://suites.mercator.cn every 5s # 应看到:Worker xxx started, polling https://suites.mercator.cn every 5s
# Worker registered successfully
``` ```
### 停止 ### 停止
Ctrl+C 停止。脚本包自动清理,不留痕迹。 ```bash
sudo systemctl stop agentgis-worker
```
### 卸载
```bash
sudo dpkg --purge agentgis-worker
```
### 数据流向 ### 数据流向