holoscan-cli 2.9.0__py3-none-any.whl → 3.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of holoscan-cli might be problematic. Click here for more details.
- holoscan_cli/__main__.py +0 -9
- holoscan_cli/common/argparse_types.py +3 -2
- holoscan_cli/common/constants.py +17 -7
- holoscan_cli/common/enum_types.py +9 -1
- holoscan_cli/nics/nics.py +1 -1
- holoscan_cli/packager/arguments.py +3 -1
- holoscan_cli/packager/container_builder.py +1 -0
- holoscan_cli/packager/package_command.py +0 -7
- holoscan_cli/packager/parameters.py +5 -4
- holoscan_cli/packager/platforms.py +1 -5
- holoscan_cli/runner/runner.py +0 -2
- {holoscan_cli-2.9.0.dist-info → holoscan_cli-3.0.0.dist-info}/METADATA +8 -3
- {holoscan_cli-2.9.0.dist-info → holoscan_cli-3.0.0.dist-info}/RECORD +16 -16
- {holoscan_cli-2.9.0.dist-info → holoscan_cli-3.0.0.dist-info}/WHEEL +1 -1
- {holoscan_cli-2.9.0.dist-info → holoscan_cli-3.0.0.dist-info}/LICENSE +0 -0
- {holoscan_cli-2.9.0.dist-info → holoscan_cli-3.0.0.dist-info}/entry_points.txt +0 -0
holoscan_cli/__main__.py
CHANGED
|
@@ -20,7 +20,6 @@ import os
|
|
|
20
20
|
from pathlib import Path
|
|
21
21
|
from typing import Optional, Union
|
|
22
22
|
|
|
23
|
-
from .common.enum_types import Platform, PlatformConfiguration
|
|
24
23
|
|
|
25
24
|
logging.getLogger("docker.api.build").setLevel(logging.WARNING)
|
|
26
25
|
logging.getLogger("docker.auth").setLevel(logging.WARNING)
|
|
@@ -97,14 +96,6 @@ def parse_args(argv: Optional[list[str]] = None) -> argparse.Namespace:
|
|
|
97
96
|
parser.print_help()
|
|
98
97
|
parser.exit()
|
|
99
98
|
|
|
100
|
-
if args.command == "package":
|
|
101
|
-
if args.platform[0] == Platform.X64Workstation:
|
|
102
|
-
args.platform_config = PlatformConfiguration.dGPU
|
|
103
|
-
elif args.platform_config is None:
|
|
104
|
-
parser.error(
|
|
105
|
-
f"'--platform-config' is required for '{args.platform[0].value}'"
|
|
106
|
-
)
|
|
107
|
-
|
|
108
99
|
return args
|
|
109
100
|
|
|
110
101
|
|
|
@@ -107,6 +107,7 @@ def valid_platforms(platforms_str: str) -> list[Platform]:
|
|
|
107
107
|
platforms = platforms_str.lower().split(",")
|
|
108
108
|
platform_enums = []
|
|
109
109
|
for platform in platforms:
|
|
110
|
+
platform = platform.strip()
|
|
110
111
|
if platform not in SDK.PLATFORMS:
|
|
111
112
|
raise argparse.ArgumentTypeError(
|
|
112
113
|
f"{platform} is not a valid option for --platforms."
|
|
@@ -128,7 +129,7 @@ def valid_platform_config(platform_config_str: str) -> PlatformConfiguration:
|
|
|
128
129
|
Otherwise, raises argparse.ArgumentTypeError.
|
|
129
130
|
"""
|
|
130
131
|
|
|
131
|
-
platform_config_str = platform_config_str.lower()
|
|
132
|
+
platform_config_str = platform_config_str.lower().strip()
|
|
132
133
|
if platform_config_str not in SDK.PLATFORM_CONFIGS:
|
|
133
134
|
raise argparse.ArgumentTypeError(
|
|
134
135
|
f"{platform_config_str} is not a valid option for --platform-config."
|
|
@@ -149,7 +150,7 @@ def valid_sdk_type(sdk_str: str) -> SdkType:
|
|
|
149
150
|
Otherwise, raises argparse.ArgumentTypeError.
|
|
150
151
|
"""
|
|
151
152
|
|
|
152
|
-
sdk_str = sdk_str.lower()
|
|
153
|
+
sdk_str = sdk_str.lower().strip()
|
|
153
154
|
if sdk_str not in SDK.SDKS:
|
|
154
155
|
raise argparse.ArgumentTypeError(f"{sdk_str} is not a valid option for --sdk.")
|
|
155
156
|
|
holoscan_cli/common/constants.py
CHANGED
|
@@ -77,19 +77,21 @@ class SDK:
|
|
|
77
77
|
"""
|
|
78
78
|
|
|
79
79
|
# Platform to architecture mappings
|
|
80
|
-
|
|
81
|
-
Platform.
|
|
82
|
-
Platform.
|
|
80
|
+
PLATFORM_ARCH_MAPPINGS = {
|
|
81
|
+
Platform.Jetson: Arch.arm64,
|
|
82
|
+
Platform.IGX_iGPU: Arch.arm64,
|
|
83
|
+
Platform.IGX_dGPU: Arch.arm64,
|
|
83
84
|
Platform.SBSA: Arch.arm64,
|
|
84
|
-
Platform.
|
|
85
|
+
Platform.x86_64: Arch.amd64,
|
|
85
86
|
}
|
|
86
87
|
|
|
87
88
|
# Values of all platforms supported by the Packager
|
|
88
89
|
PLATFORMS = [
|
|
89
|
-
Platform.
|
|
90
|
-
Platform.
|
|
90
|
+
Platform.Jetson.value,
|
|
91
|
+
Platform.IGX_iGPU.value,
|
|
92
|
+
Platform.IGX_dGPU.value,
|
|
91
93
|
Platform.SBSA.value,
|
|
92
|
-
Platform.
|
|
94
|
+
Platform.x86_64.value,
|
|
93
95
|
]
|
|
94
96
|
|
|
95
97
|
# Values of all platform configurations supported by the Packager
|
|
@@ -98,6 +100,14 @@ class SDK:
|
|
|
98
100
|
PlatformConfiguration.dGPU.value,
|
|
99
101
|
]
|
|
100
102
|
|
|
103
|
+
INTERNAL_PLATFORM_MAPPINGS = {
|
|
104
|
+
Platform.Jetson: (Platform.JetsonAgxOrinDevKit, PlatformConfiguration.iGPU),
|
|
105
|
+
Platform.IGX_iGPU: (Platform.IGXOrinDevIt, PlatformConfiguration.iGPU),
|
|
106
|
+
Platform.IGX_dGPU: (Platform.IGXOrinDevIt, PlatformConfiguration.dGPU),
|
|
107
|
+
Platform.SBSA: (Platform.SBSA, PlatformConfiguration.dGPU),
|
|
108
|
+
Platform.x86_64: (Platform.X64Workstation, PlatformConfiguration.dGPU),
|
|
109
|
+
}
|
|
110
|
+
|
|
101
111
|
# Values of SDKs supported by the Packager
|
|
102
112
|
SDKS = [SdkType.Holoscan.value, SdkType.MonaiDeploy.value]
|
|
103
113
|
|
|
@@ -37,10 +37,18 @@ class Arch(Enum):
|
|
|
37
37
|
|
|
38
38
|
|
|
39
39
|
class Platform(Enum):
|
|
40
|
+
# User values - when a new value is added, please also update SDK.PLATFORMS
|
|
41
|
+
Jetson = "jetson"
|
|
42
|
+
IGX_iGPU = "igx-igpu"
|
|
43
|
+
IGX_dGPU = "igx-dgpu"
|
|
44
|
+
SBSA = "sbsa"
|
|
45
|
+
x86_64 = "x86_64"
|
|
46
|
+
|
|
47
|
+
# Internal use only - for mapping actual platform with platform configuration
|
|
48
|
+
# as defined in SDK.INTERNAL_PLATFORM_MAPPINGS.
|
|
40
49
|
IGXOrinDevIt = "igx-orin-devkit"
|
|
41
50
|
JetsonAgxOrinDevKit = "jetson-agx-orin-devkit"
|
|
42
51
|
X64Workstation = "x64-workstation"
|
|
43
|
-
SBSA = "sbsa"
|
|
44
52
|
|
|
45
53
|
|
|
46
54
|
class PlatformConfiguration(Enum):
|
holoscan_cli/nics/nics.py
CHANGED
|
@@ -28,6 +28,6 @@ def execute_nics_command(args: Namespace):
|
|
|
28
28
|
strs = [f"\n\t{item[0]:<15} : {item[1]}" for item in ip_addresses]
|
|
29
29
|
print(f"Available network interface cards/IP addresses: \n{''.join(strs)}")
|
|
30
30
|
except Exception as ex:
|
|
31
|
-
|
|
31
|
+
logger.error("Error executing nics command.")
|
|
32
32
|
logger.debug(ex)
|
|
33
33
|
sys.exit(4)
|
|
@@ -127,7 +127,9 @@ class PackagingArguments:
|
|
|
127
127
|
self.build_parameters.monai_deploy_app_sdk_version
|
|
128
128
|
)
|
|
129
129
|
|
|
130
|
-
self._package_manifest.platform_config =
|
|
130
|
+
self._package_manifest.platform_config = self._platforms[
|
|
131
|
+
0
|
|
132
|
+
].platform_config.value
|
|
131
133
|
|
|
132
134
|
def _read_application_config_file(self, config_file_path: Path):
|
|
133
135
|
self._logger.info(
|
|
@@ -377,6 +377,7 @@ class PythonAppBuilder(BuilderBase):
|
|
|
377
377
|
pip_folder = os.path.join(self._temp_dir, "pip")
|
|
378
378
|
os.makedirs(pip_folder, exist_ok=True)
|
|
379
379
|
pip_requirements_path = os.path.join(pip_folder, "requirements.txt")
|
|
380
|
+
|
|
380
381
|
with open(pip_requirements_path, "w") as requirements_file:
|
|
381
382
|
# Use local requirements.txt packages if provided, otherwise use sdk provided packages
|
|
382
383
|
if self._build_parameters.requirements_file_path is not None:
|
|
@@ -22,7 +22,6 @@ from ..common.argparse_types import (
|
|
|
22
22
|
valid_dir_path,
|
|
23
23
|
valid_existing_dir_path,
|
|
24
24
|
valid_existing_path,
|
|
25
|
-
valid_platform_config,
|
|
26
25
|
valid_platforms,
|
|
27
26
|
valid_sdk_type,
|
|
28
27
|
)
|
|
@@ -70,12 +69,6 @@ def create_package_parser(
|
|
|
70
69
|
help="target platform(s) for the build output separated by comma. "
|
|
71
70
|
f"Valid values: {str.join(', ', SDK.PLATFORMS)}.",
|
|
72
71
|
)
|
|
73
|
-
parser.add_argument(
|
|
74
|
-
"--platform-config",
|
|
75
|
-
type=valid_platform_config,
|
|
76
|
-
help="target platform configuration for the build output. "
|
|
77
|
-
f"Valid values: {str.join(', ', SDK.PLATFORM_CONFIGS)}.",
|
|
78
|
-
)
|
|
79
72
|
parser.add_argument(
|
|
80
73
|
"--add",
|
|
81
74
|
action="append",
|
|
@@ -34,14 +34,15 @@ class PlatformParameters:
|
|
|
34
34
|
def __init__(
|
|
35
35
|
self,
|
|
36
36
|
platform: Platform,
|
|
37
|
-
platform_config: PlatformConfiguration,
|
|
38
37
|
tag: str,
|
|
39
38
|
version: str,
|
|
40
39
|
) -> None:
|
|
41
40
|
self._logger = logging.getLogger("platform.parameters")
|
|
42
|
-
self._platform
|
|
43
|
-
self._platform_config: PlatformConfiguration =
|
|
44
|
-
|
|
41
|
+
self._platform = SDK.INTERNAL_PLATFORM_MAPPINGS[platform][0]
|
|
42
|
+
self._platform_config: PlatformConfiguration = SDK.INTERNAL_PLATFORM_MAPPINGS[
|
|
43
|
+
platform
|
|
44
|
+
][1]
|
|
45
|
+
self._arch: Arch = SDK.PLATFORM_ARCH_MAPPINGS[platform]
|
|
45
46
|
self._tag_prefix: Optional[str]
|
|
46
47
|
self._version: Optional[str]
|
|
47
48
|
|
|
@@ -76,11 +76,7 @@ class Platform:
|
|
|
76
76
|
|
|
77
77
|
platforms = []
|
|
78
78
|
for platform in args.platform:
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
platform_parameters = PlatformParameters(
|
|
82
|
-
platform, platform_config, args.tag, version
|
|
83
|
-
)
|
|
79
|
+
platform_parameters = PlatformParameters(platform, args.tag, version)
|
|
84
80
|
|
|
85
81
|
(
|
|
86
82
|
platform_parameters.custom_base_image,
|
holoscan_cli/runner/runner.py
CHANGED
|
@@ -319,7 +319,6 @@ def execute_run_command(args: Namespace):
|
|
|
319
319
|
if not _dependency_verification(args.map):
|
|
320
320
|
logger.error("Execution Aborted")
|
|
321
321
|
sys.exit(2)
|
|
322
|
-
|
|
323
322
|
try:
|
|
324
323
|
# Fetch application manifest from MAP
|
|
325
324
|
app_info, pkg_info = _fetch_map_manifest(args.map)
|
|
@@ -330,7 +329,6 @@ def execute_run_command(args: Namespace):
|
|
|
330
329
|
if not _pkg_specific_dependency_verification(pkg_info):
|
|
331
330
|
logger.error("Execution Aborted")
|
|
332
331
|
sys.exit(2)
|
|
333
|
-
|
|
334
332
|
try:
|
|
335
333
|
# Run Holoscan Application
|
|
336
334
|
_run_app(args, app_info, pkg_info)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: holoscan-cli
|
|
3
|
-
Version:
|
|
3
|
+
Version: 3.0.0
|
|
4
4
|
Summary: Command line interface for packaging and running Holoscan applications.
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Keywords: AI,holoscan,medical,streaming,HPC,nvidia,docker,container
|
|
@@ -78,12 +78,15 @@ Holoscan CLI uses [Poetry](https://python-poetry.org/) for package and dependenc
|
|
|
78
78
|
|
|
79
79
|
```bash
|
|
80
80
|
# Create virtual environment
|
|
81
|
-
poetry
|
|
81
|
+
poetry env use python3.12
|
|
82
|
+
|
|
83
|
+
# Activate virtual environment
|
|
84
|
+
eval $(poetry env activate)
|
|
82
85
|
|
|
83
86
|
# Install dependencies
|
|
84
87
|
poetry install
|
|
85
88
|
|
|
86
|
-
# Configure pre-
|
|
89
|
+
# Configure pre-commit hooks
|
|
87
90
|
pre-commit install
|
|
88
91
|
|
|
89
92
|
# Run pre-commit against all files
|
|
@@ -96,6 +99,8 @@ poetry build
|
|
|
96
99
|
poetry run pytest
|
|
97
100
|
```
|
|
98
101
|
|
|
102
|
+
For more information on Poetry and its usages, see the [Poetry documentation](https://python-poetry.org/docs/).
|
|
103
|
+
|
|
99
104
|
## Contributing to the Holoscan CLI
|
|
100
105
|
|
|
101
106
|
See [CONTRIBUTING.md](./CONTRIBUTING.md) for details.
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
holoscan_cli/__init__.py,sha256=caPPFDAjPzNIAzHAtpWRuWy9GshNEetcN8FQiMmNsQQ,1092
|
|
2
|
-
holoscan_cli/__main__.py,sha256=
|
|
3
|
-
holoscan_cli/common/argparse_types.py,sha256=
|
|
2
|
+
holoscan_cli/__main__.py,sha256=sOdEmgaajrtrtVeg39MuW15BU8moal9Vz2HDcWZM__U,4891
|
|
3
|
+
holoscan_cli/common/argparse_types.py,sha256=4AYiQbQlHNx0RBrZyi9Fmy0A5VEJByLAbpv4oS9QQVo,5553
|
|
4
4
|
holoscan_cli/common/artifact_sources.py,sha256=LIz2OFZmCJNRCn5_qkyncEaEjwwpAbzZzBAlE3tnSjs,5728
|
|
5
|
-
holoscan_cli/common/constants.py,sha256=
|
|
5
|
+
holoscan_cli/common/constants.py,sha256=4yXMmz-PzHth5Qy4zt4E5bvpG6eQN3KQrjhyagRFDGw,4866
|
|
6
6
|
holoscan_cli/common/dockerutils.py,sha256=-gNdxzLh-nQWI-hJUQI-O5BM9OeqJkNa5R3DvVQXu2Q,17318
|
|
7
|
-
holoscan_cli/common/enum_types.py,sha256
|
|
7
|
+
holoscan_cli/common/enum_types.py,sha256=qdqMum01uM0-qrF2jyk1GYGoh76xBJsBUX9cvxVbVtA,1711
|
|
8
8
|
holoscan_cli/common/exceptions.py,sha256=ubN33Av69Xm_CUVC_5DeKx_zO8qfIc_T-_S18xDQguE,2999
|
|
9
9
|
holoscan_cli/common/sdk_utils.py,sha256=uDMOM_Jq3SnzDROrFERc8krDS6-BkhOebKV2h9I_-0Y,6659
|
|
10
10
|
holoscan_cli/common/utils.py,sha256=3plIFGMWy8WcRB2lL4fTqINlE1CyBkm9CDrIVA1qPDU,3796
|
|
11
11
|
holoscan_cli/logging.json,sha256=0tfLHoqV5_xH_q4m9gQufHYfYezocFVJxtlEj6UR3qI,809
|
|
12
12
|
holoscan_cli/nics/__init__.py,sha256=IMHmlnYvJxjlJGi1UxwRG0deK4w9M7-_WWDoCqKcjJE,737
|
|
13
|
-
holoscan_cli/nics/nics.py,sha256=
|
|
13
|
+
holoscan_cli/nics/nics.py,sha256=xcpo8uwQDJ7-46rPR-BEAWkyKHZOZ19gl9ahuxLNphs,1258
|
|
14
14
|
holoscan_cli/package-source.json,sha256=-Cheb17hJqV7-CJktvj9RATIM_oA00k6_VPpFkIlPAc,1326
|
|
15
15
|
holoscan_cli/packager/__init__.py,sha256=8uVz-FlG2vJV7Cz8ICOajioBbI9An5h-dRtSrkMCXZo,744
|
|
16
|
-
holoscan_cli/packager/arguments.py,sha256=
|
|
16
|
+
holoscan_cli/packager/arguments.py,sha256=h29zdNctHjGm5s9MihNa4VtrcyXpR8rn4wmKFyBtHXw,5739
|
|
17
17
|
holoscan_cli/packager/config_reader.py,sha256=oE0Tnp7v9dh_qAj6nPap-_R-YGLpYKGh09_FSV9oqVA,7352
|
|
18
|
-
holoscan_cli/packager/container_builder.py,sha256=
|
|
18
|
+
holoscan_cli/packager/container_builder.py,sha256=3y9UniwXK-lCBDZVvtrdqqpG00LwGrnk1Xr7w1CjCRg,17669
|
|
19
19
|
holoscan_cli/packager/manifest_files.py,sha256=jueQMgZzQ9DhP2KGC1YdndDNwJl3ECunEKicBb3Z9Mc,5957
|
|
20
20
|
holoscan_cli/packager/models.py,sha256=t3HXROo-obN5iNjKOkp8JvL6WuGP4QSRVZzET6V1wmI,3758
|
|
21
|
-
holoscan_cli/packager/package_command.py,sha256=
|
|
21
|
+
holoscan_cli/packager/package_command.py,sha256=woveQzQ3DSmygwUCy66QuWi49mq31sibWAfzrljdfew,6357
|
|
22
22
|
holoscan_cli/packager/packager.py,sha256=2Rykbb7pD3Ve0p_H0F0xNHr3J-moliTm8CNIhDWkRxI,4728
|
|
23
|
-
holoscan_cli/packager/parameters.py,sha256=
|
|
24
|
-
holoscan_cli/packager/platforms.py,sha256=
|
|
23
|
+
holoscan_cli/packager/parameters.py,sha256=ipxOuCMnbq5OzdmGnehxIElXX6YS_ZofqQH3CZgr22s,18693
|
|
24
|
+
holoscan_cli/packager/platforms.py,sha256=H9AMr83YkW_Vx8cpp6qJLDCLqa2lcVnSAfkKc6vl6iU,16721
|
|
25
25
|
holoscan_cli/packager/templates/Dockerfile.jinja2,sha256=BMNWtv0n1F6lP5H7RiKb8iUVZTtHvDgQCSHC_PpuBgE,16982
|
|
26
26
|
holoscan_cli/packager/templates/dockerignore,sha256=zzBkA9eWgPW4KWyObuYjp13bv_m24AnFUgoENGNhMcY,1755
|
|
27
27
|
holoscan_cli/packager/templates/tools.sh,sha256=q-LT31TfUPiSS6IWrESDJcR_F8dCU0Tnl8w3xTbaW6M,13509
|
|
@@ -29,11 +29,11 @@ holoscan_cli/py.typed,sha256=Z4hkVtwnqwhmVXOMES05WQZWjt4_rFEuditXTouPUJQ,684
|
|
|
29
29
|
holoscan_cli/runner/__init__.py,sha256=N3dOMkOWT3adYk_pRKqn2zYgZjVCkpn5u7xatA9_aWQ,738
|
|
30
30
|
holoscan_cli/runner/resources.py,sha256=R7wLnfwsG67jJD6U8d_gvteycsLPPDfWDYimAmnC-N4,5996
|
|
31
31
|
holoscan_cli/runner/run_command.py,sha256=5QKK70xng36LtYyPHz43YrocTLUxDh6h6UNTeHuIaSQ,7148
|
|
32
|
-
holoscan_cli/runner/runner.py,sha256=
|
|
32
|
+
holoscan_cli/runner/runner.py,sha256=1imprOaey_RYdNwwtXWTL9IfqyG3Z_DB82FInSo1YUk,10566
|
|
33
33
|
holoscan_cli/version/__init__.py,sha256=1pf-RBR16STdFXsh82bYly_lUyv1MgxuczbLOTDJRto,743
|
|
34
34
|
holoscan_cli/version/version.py,sha256=FL4DUcQ2FA4eyvL8YjR2rcdPCduMnbTBhLNeXlESLsI,1738
|
|
35
|
-
holoscan_cli-
|
|
36
|
-
holoscan_cli-
|
|
37
|
-
holoscan_cli-
|
|
38
|
-
holoscan_cli-
|
|
39
|
-
holoscan_cli-
|
|
35
|
+
holoscan_cli-3.0.0.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
36
|
+
holoscan_cli-3.0.0.dist-info/METADATA,sha256=mfc6n332CDnbT2iKAuLuDVxQyz5Qdkr8vB6LB4t9zz4,4032
|
|
37
|
+
holoscan_cli-3.0.0.dist-info/WHEEL,sha256=XbeZDeTWKc1w7CSIyre5aMDU_-PohRwTQceYnisIYYY,88
|
|
38
|
+
holoscan_cli-3.0.0.dist-info/entry_points.txt,sha256=ZbJklrhFtmmhqcGvGizL_4Pf9FTRgmZ11LblKPbj8yo,95
|
|
39
|
+
holoscan_cli-3.0.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|