Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 39 additions & 0 deletions .github/workflows/package-open-vocabulary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Package Open Vocabulary

on:
workflow_dispatch:
pull_request:
branches: [main]
paths:
- 'apps/open-vocabulary/**'
- 'market/packaging/**'
- '.github/workflows/package-open-vocabulary.yml'
push:
branches: [main]
paths:
- 'apps/open-vocabulary/**'
- 'market/packaging/**'
- '.github/workflows/package-open-vocabulary.yml'

permissions:
contents: read

jobs:
package:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
- run: uv python install 3.11
- name: Test the app
run: uv run --locked pytest -q apps/open-vocabulary/tests
- name: Fetch assets and build the ARM64 package
run: |
uv run --locked python market/packaging/fetch_assets.py apps/open-vocabulary
uv run --locked python market/packaging/build.py apps/open-vocabulary --out dist/open-vocabulary
- uses: actions/upload-artifact@v4
with:
name: open-vocabulary-arm64
path: dist/open-vocabulary/open-vocabulary-*-arm64.tar.gz
if-no-files-found: error
compression-level: 0
14 changes: 4 additions & 10 deletions apps/open-vocabulary/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,21 +37,15 @@ uv run pytest apps/open-vocabulary/tests apps/test_manifest_schema.py
| `wheels/ftfy-6.3.1-py3-none-any.whl` | 文本清理 |
| `wheels/wcwidth-0.9.4-py3-none-any.whl` | ftfy 的运行时依赖 |

官方构建从模型池的 `models/open-vocabulary/<上表相对路径>` 下载资产。模型池提供这些文件后,可以使用仓库标准命令下载并打包。 [资产发布指南](../../docs/guide/app-publishing-and-permissions-guide.md#3-模型与大资源文件免上传-git)
在 GitHub Actions 中选择 **Package Open Vocabulary**,点击 **Run workflow** 即可打包。涉及本应用的拉取请求和合入 `main` 的更新也会触发构建。完成后,从运行页面的 **Artifacts** 下载 `open-vocabulary-arm64`,解压即可取得设备用的 `.tar.gz` 安装包。

本地与 CI 使用相同的命令。下载器按清单中的 `x-url` 从 Seeed 获取两个模型,从 PyPI 获取两个指定的通用 wheel,并校验各文件的大小和 SHA-256。

```sh
uv run python market/packaging/fetch_assets.py apps/open-vocabulary
uv run python market/packaging/build.py apps/open-vocabulary --out dist/open-vocabulary
```

当前模型资产尚待发布到模型池。已有 0.1.6 开发包时,可以提取上表文件并保留相对路径,再用本地资产打包。

```sh
uv run python market/packaging/build.py apps/open-vocabulary \
--payload-root /path/to/open-vocabulary-assets \
--out dist/open-vocabulary
```

打包器校验 manifest 中的大小和 SHA-256,输出 `open-vocabulary-0.1.6-arm64.tar.gz`。模型和 wheel 由包携带,Kit、SDK、NumPy、RKNNLite 和 RGA 由设备提供。开发包安装所需的信任配置见[应用中心发布指南](../../docs/guide/app-center-publishing.md)。
安装包位于 `dist/open-vocabulary/open-vocabulary-<版本>-arm64.tar.gz`。模型和 wheel 由包携带,Kit、SDK、NumPy、RKNNLite 和 RGA 由设备提供。开发包安装所需的信任配置见[应用中心发布指南](../../docs/guide/app-center-publishing.md)。

模型与词表来源见 [SOURCES.json](SOURCES.json) 和 [THIRD_PARTY.md](THIRD_PARTY.md)。
8 changes: 6 additions & 2 deletions apps/open-vocabulary/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
"filename": "ftfy-6.3.1-py3-none-any.whl",
"source": "bundled",
"file": "wheels/ftfy-6.3.1-py3-none-any.whl",
"x-url": "https://files.pythonhosted.org/packages/ab/6e/81d47999aebc1b155f81eca4477a616a70f238a2549848c38983f3c22a82/ftfy-6.3.1-py3-none-any.whl",
"sha256": "7c70eb532015cd2f9adb53f101fb6c7945988d023a085d127d1573dc49dd0083",
"size": 44821,
"tags": ["py3-none-any"]
Expand All @@ -28,6 +29,7 @@
"filename": "wcwidth-0.9.4-py3-none-any.whl",
"source": "bundled",
"file": "wheels/wcwidth-0.9.4-py3-none-any.whl",
"x-url": "https://files.pythonhosted.org/packages/6f/0c/309b1813b230d1dbbd6f2c2ab2bb21ef68992358977605d9ef289bbfedcc/wcwidth-0.9.4-py3-none-any.whl",
"sha256": "901eace6d2dd25ebb917d0ce5db18e5c537e1504c905cf32f0d006c12098b05d",
"size": 301806,
"tags": ["py3-none-any"]
Expand Down Expand Up @@ -118,11 +120,11 @@
"id": "open-vocabulary",
"name": "Open Vocabulary Detection",
"name_zh": "开放词汇目标检测",
"version": "0.1.6",
"version": "0.1.7",
"type": "self-hosted",
"entry": "app.py",
"release": {
"sequence": 7,
"sequence": 8,
"channel": "dev"
},
"author": "reCamera Pro Demo",
Expand Down Expand Up @@ -181,6 +183,7 @@
"source": "bundled",
"file": "models/world_v21s.rknn",
"mount": "models/world_v21s.rknn",
"x-url": "https://files.seeedstudio.com/Solution/models/yolo-world/world_v21s.rknn",
"size": 27257330,
"sha256": "03b14b7acbeda002f056151480de427d8aa4dde949e35d217672a560666e6114",
"required": true,
Expand All @@ -192,6 +195,7 @@
"source": "bundled",
"file": "models/clip_v21.rknn",
"mount": "models/clip_v21.rknn",
"x-url": "https://files.seeedstudio.com/Solution/models/yolo-world/clip_v21.rknn",
"size": 129545073,
"sha256": "29362861b0f871bd3796960459132c3ec2ba82a4e94eb28b16c9d3fda2570287",
"required": true,
Expand Down
Loading