docs: 更新工具安装指南,引用 SuiteHub Packages
This commit is contained in:
+24
-21
@@ -9,8 +9,8 @@ https://suites.mercator.cn
|
||||
## CLI(可选)
|
||||
|
||||
```bash
|
||||
# 安装
|
||||
pip install https://git.mercator.cn/SuiteHub/agentgis-cli/raw/branch/main/dist/agentgis_cli-0.1.0-py3-none-any.whl
|
||||
# 安装 agentgis-cli
|
||||
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
|
||||
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 status <task-id>
|
||||
```
|
||||
@@ -34,23 +31,24 @@ gis-actions 是套件的本地执行引擎,跑在你的机器上。
|
||||
|
||||
### 前提条件
|
||||
|
||||
- **Python 3.10+**(验证:`python3 --version`)
|
||||
- **Debian / Ubuntu 系统**
|
||||
- **Docker**(验证:`docker ps`)
|
||||
- Linux:`apt install docker.io` 或 `yum install docker`
|
||||
- Windows/Mac:安装 Docker Desktop
|
||||
- `sudo apt install docker.io`
|
||||
- 能访问 `registry.mercator.cn`(拉取 gis-base 镜像)
|
||||
|
||||
### 安装
|
||||
|
||||
```bash
|
||||
# 下载 gis-actions 包
|
||||
# 或从源码安装
|
||||
# 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
|
||||
sudo dpkg -i agentgis-worker.deb
|
||||
|
||||
# 安装后会自动配置 systemd 服务和 Docker insecure-registry
|
||||
```
|
||||
|
||||
### 配置
|
||||
|
||||
创建 `config.json`:
|
||||
编辑 `/etc/agentgis/worker.json`:
|
||||
|
||||
```json
|
||||
{
|
||||
@@ -74,23 +72,28 @@ API Key 从 https://auth.mercator.cn 获取。
|
||||
### 启动
|
||||
|
||||
```bash
|
||||
python3 -m gis_actions --config config.json
|
||||
sudo systemctl start agentgis-worker
|
||||
sudo systemctl status agentgis-worker
|
||||
```
|
||||
|
||||
启动后自动连接调度中心,注册自身,开始等待任务。
|
||||
保持终端开着,或使用进程管理工具(systemd / supervisor)后台运行。
|
||||
|
||||
### 验证是否运行成功
|
||||
### 验证
|
||||
|
||||
```bash
|
||||
# 查看日志输出,应看到:
|
||||
# Worker xxx started, polling https://suites.mercator.cn every 5s
|
||||
# Worker registered successfully
|
||||
journalctl -u agentgis-worker -f
|
||||
# 应看到:Worker xxx started, polling https://suites.mercator.cn every 5s
|
||||
```
|
||||
|
||||
### 停止
|
||||
|
||||
Ctrl+C 停止。脚本包自动清理,不留痕迹。
|
||||
```bash
|
||||
sudo systemctl stop agentgis-worker
|
||||
```
|
||||
|
||||
### 卸载
|
||||
|
||||
```bash
|
||||
sudo dpkg --purge agentgis-worker
|
||||
```
|
||||
|
||||
### 数据流向
|
||||
|
||||
|
||||
Reference in New Issue
Block a user