Skip to content

Commit

Permalink
Release/2.9.0 (#18)
Browse files Browse the repository at this point in the history
* Update for 2.9 GA

Signed-off-by: Victor Chang <[email protected]>
  • Loading branch information
mocsharp authored Jan 28, 2025
1 parent 51e23c9 commit 4b7cffc
Show file tree
Hide file tree
Showing 21 changed files with 1,457 additions and 12 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ on:
required: true
type: string
default: v
rc:
description: 'RC Build Number'
required: false
type: number
ga:
description: 'GA (Official) Build'
required: true
Expand Down Expand Up @@ -151,6 +155,9 @@ jobs:
uses: Gr1N/setup-poetry@v9

- name: Build
env:
rc: ${{ github.event.inputs.rc }}
ga: ${{ github.event.inputs.ga }}
run: |
git tag -l
poetry run which python
Expand Down Expand Up @@ -191,25 +198,27 @@ jobs:
VERSION=${{ github.event.inputs.version }}
VERSION="${VERSION/?}"
shellspec -e VERSION=$VERSION -o j
# - name: JUnit Report Action
# uses: mikepenz/action[email protected]
# if: false # success() || failure()
# with:
# report_paths: 'tests/verification/report/*.xml'
- name: Upload Test Report
uses: test-summary/action@v2.4
if: always()
with:
paths: 'tests/verification/report/*.xml'

testpypi-deploy:
if: ${{ inputs.ga == 'false' }}
if: ${{ inputs.ga == false }}
name: publish-test-pypi
permissions:
id-token: write
runs-on: ubuntu-latest
needs: [verification-test]
steps:
- name: Download build
uses: actions/[email protected]
with:
name: build-artifact
path: dist/
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
verbose: true
path: dist/
7 changes: 4 additions & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -124,16 +124,17 @@ format-jinja = """
{%- if branch == 'main' -%}
{{ serialize_pep440(base, stage, dev=distance) }}
{%- elif branch and branch.startswith("release/") -%}
{%- if env.ga and env.ga == true -%}
{# Debug: env["ga"] = {{ env["ga"] }} #}
{%- if env["ga"] == 'true' -%}
{{ serialize_pep440(base)}}
{%- else -%}
{{ serialize_pep440(base, stage="rc", revision=distance) }}
{{ serialize_pep440(base, stage="rc", revision=env["rc"] ) }}
{%- endif -%}
{%- else -%}
{{ serialize_pep440(base, stage="alpha", revision=distance) }}
{%- endif -%}
"""

[build-system]
requires = ["poetry-core>=2.0.0", "poetry-dynamic-versioning>=1.5.0,<2.0.0"]
requires = ["poetry-core>=2.0.0", "poetry-dynamic-versioning>=1.7.1,<2.0.0"]
build-backend = "poetry_dynamic_versioning.backend"
2 changes: 1 addition & 1 deletion releases/2.9.0/artifacts.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"2.9.0": {
"holoscan": {
"debian-version": "2.9.0.1-1",
"debian-version": "2.9.0.2-1",
"wheel-version": "2.9.0",
"base-images": {
"dgpu": "nvcr.io/nvidia/cuda:12.6.0-runtime-ubuntu22.04",
Expand Down
1 change: 0 additions & 1 deletion src/holoscan_cli/common/artifact_sources.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ def validate(self, data: Any):
def download_manifest(self):
self._download_manifest_internal(
ArtifactSources.ManifestFileUrl,
{"Authorization": f"Bearer {ArtifactSources.EdgeROToken}"},
)

def _download_manifest_internal(self, url, headers=None):
Expand Down
1 change: 1 addition & 0 deletions src/holoscan_cli/packager/packager.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ def _package_application(args: Namespace):
Error: {result.error}
""" # noqa: E501
)
sys.exit(1)


def execute_package_command(args: Namespace):
Expand Down
147 changes: 147 additions & 0 deletions tests/automation/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# Holoscan CLI Test Automation

This directory contains scripts to automate the testing of packaging and running applications designed using [Holoscan SDK](https://developer.nvidia.com/holoscan-sdk).

## Requirements

To successfully execute the test automation script, the system must meet the requirements specified by both the [Holoscan SDK](https://docs.nvidia.com/holoscan/sdk-user-guide/sdk_installation.html) and the [Holoscan CLI](https://github.com/nvidia-holoscan/holoscan-cli). Additionally, the following tools are required to package and run the application:

- Holoscan CLI
- jq
- curl
- An [NGC](https://catalog.ngc.nvidia.com/) account, which must be logged in via `docker login nvcr.io`

## Usage

To run the test automation script, navigate to the automation directory, then execute the script with the application directory as an argument:

```
cd tests/automation
./test.sh [application-directory]
# for example
./tests.sh ./endoscopy_tool_tracking_cpp
```

The `test.sh` script invokes `check.sh` to verify that all system requirements are met. It will exit if any of the requirements are missing.

The automation script performs the following steps:

1. Clones the specified git repository.
1. Packages the application.
1. Downloads the configured test data.
1. Run the packaged application.
1. Cleans up any downloaded and generated data.

### Adding New Application

Automating the testing of a new Holoscan-enabled application is straightforward and can be accomplished with the following steps:

1. Create a new directory and include a `config.json` file that defines the application and specifies where the script can retrieve the test data. Refer to the sections below for examples and the configuration schema.
1. Optionally, copy the application's configuration YAML file and modify the values to ensure that the application can start and exit on its own.

This is all that's required.

### Sample Configuration

#### Holoscan Application

Here’s a sample configuration for testing the C++ version of the Video Replayer:

With this configuration, the test automation script will clone the [Holoscan SDK repository](https://github.com/nvidia-holoscan/holoscan-sdk) from GitHub, download test data from NGC, package the application with `--include holoviz`, and run the application using the supplied `app.yaml` configuration file along with the `--render` option.

```json
{
"name": "video-replayer-cpp",
"source": {
"repo": "https://github.com/nvidia-holoscan/holoscan-sdk.git",
"path": "examples/video_replayer/cpp",
"lang": "cpp"
},
"config": {
"source": "local",
"path": "./app.yaml"
},
"package": {
"args": "--includes holoviz"
},
"run": {
"args": "--render"
},
"data": {
"dirname" : "racerx",
"source" : "https://api.ngc.nvidia.com/v2/resources/org/nvidia/team/clara-holoscan/holoscan_racerx_video/20231009/files"
}
}
```

#### Holohub Application

Another sample configuration is used for testing the Endoscopy Tool Tracking application from Holohub:

In this case, the test automation script will clone the [Holohub](https://github.com/nvidia-holoscan/holohub) repository, invoke the `devcontainer` script to build the specified application, utilize test data downloaded by the `devcontainer` script, and package the application using the provided `app.yaml` file with additional arguments defined in `package.args`. Finally, it executes the application with the arguments specified in `run.args`.

```json
{
"name": "endoscopy-tool-tracking-cpp",
"source": {
"repo": "https://github.com/nvidia-holoscan/holohub.git",
"app": "endoscopy_tool_tracking",
"lang": "python",
"path": "applications/endoscopy_tool_tracking/python/endoscopy_tool_tracking.py"
},
"config": {
"source": "local",
"path": "./app.yaml"
},
"package": {
"args": "--includes onnx holoviz --add <src>/install/lib --add <src>/install/python/lib/"
},
"run": {
"args": "--render"
},
"data": {
"source" : "local-holohub",
"dirname" : "endoscopy"
}
}
```

> [!NOTE]
> The test automation script supports packaging Holohub applications from the `install/` generated by the devcontainer script. If a desired application does not create artifacts in the `install/` directory, update the associated CMake configuration to [install](https://cmake.org/cmake/help/latest/command/install.html) the application first.
### Configuration Schema

```
{
"name": "<name of the application>", # Required
"source": {
"repo": "<HTTP-based git url>.git", # Required
"path": "<application's relative path from the root of the repository", # Required
"lang": "<cpp|python>", # Required
"app": "Holohub only: name of application. Same as the application name used by the devcontainer script."
},
"config": {
"source": "[local]", # optional value
"path": "./app.yaml" # Required
},
"package": {
"args": "<additional arguments to pass to the CLI Packager>"
},
"run": {
"args": "<additional arguments to pass to the CLI Runner>"
},
"data": {
"source" : "<NGC URL|local-holohub>", # 'local-holohub' means to use test data downloaded by the devcontainer script
"dirname" : "<directory name to store the test data. For Holohub, the relative path to the data directory from Holohub.>"
}
}
```

## Links

- [Holoscan SDK User Guide](https://docs.nvidia.com/holoscan/sdk-user-guide)
- [Holoscan Application Package Specification (HAP)](https://docs.nvidia.com/holoscan/sdk-user-guide/cli/hap.html)
- [Holscan SDK Github Repository](https://github.com/nvidia-holoscan/holoscan-sdk)
- [Holohub Github Repository](https://github.com/nvidia-holoscan/holohub/)
- [Holoscan CLI Github Repository](https://github.com/nvidia-holoscan/holoscan-cli)
- [NGC](https://ngc.nvidia.com/)
32 changes: 32 additions & 0 deletions tests/automation/artifacts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
{
"2.9.0": {
"holoscan": {
"debian-version": "2.9.0.2-1",
"wheel-version": "2.9.0",
"base-images": {
"dgpu": "nvcr.io/nvidia/cuda:12.6.0-runtime-ubuntu22.04",
"igpu": "nvcr.io/nvidia/tensorrt:24.08-py3-igpu"
},
"build-images": {
"igpu": {
"jetson-agx-orin-devkit": "nvcr.io/nvidia/clara-holoscan/holoscan:v2.9.0-igpu",
"igx-orin-devkit": "nvcr.io/nvidia/clara-holoscan/holoscan:v2.9.0-igpu",
"sbsa": "nvcr.io/nvidia/clara-holoscan/holoscan:v2.9.0-igpu"
},
"dgpu": {
"x64-workstation": "nvcr.io/nvidia/clara-holoscan/holoscan:v2.9.0-dgpu",
"igx-orin-devkit": "nvcr.io/nvidia/clara-holoscan/holoscan:v2.9.0-dgpu",
"sbsa": "nvcr.io/nvidia/clara-holoscan/holoscan:v2.9.0-dgpu",
"clara-agx-devkit": "nvcr.io/nvidia/clara-holoscan/holoscan:v2.9.0-dgpu"
},
"cpu": {
"x64-workstation": "nvcr.io/nvidia/clara-holoscan/holoscan:v2.9.0-dgpu"
}
}
},
"health-probes": {
"linux/amd64": "https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/v0.4.19/grpc_health_probe-linux-amd64",
"linux/arm64": "https://github.com/grpc-ecosystem/grpc-health-probe/releases/download/v0.4.19/grpc_health_probe-linux-arm64"
}
}
}
50 changes: 50 additions & 0 deletions tests/automation/check.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
#!/bin/bash

# SPDX-FileCopyrightText: Copyright (c) 2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
# SPDX-License-Identifier: Apache-2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#===============================================================================

echo "Checking system requirements..."

status=0
if ! command -v curl 2>&1 >/dev/null
then
echo "curl could not be found, use the following command to install curl"
echo "$ sudo apt install curl"
status=-1
fi

if ! command -v jq 2>&1 >/dev/null
then
echo "jq could not be found, use the following command to install jq"
echo "$ sudo apt install jq"
status=-1
fi

if ! command -v holoscan 2>&1 >/dev/null
then
echo "Holoscan CLI could not be found, use the following command to install holoscan"
echo "$ pip install holoscan-cli"
status=-1
fi

if ! docker login nvcr.io < /dev/null >& /dev/null
then
echo "Please login to nvcr.io. For example:"
echo "$ docker login nvcr.io"
status=-1
fi

exit $status
Loading

0 comments on commit 4b7cffc

Please sign in to comment.