Skip to content

Commit d200043

Browse files
committed
In fact needed to fix holoscan/__init__.py
Signed-off-by: M Q <mingmelvinq@nvidia.com>
1 parent b95650a commit d200043

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

monai/deploy/utils/importutil.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ def dist_requires(project_name: str) -> List[str]:
377377
if app:
378378
print(json.dumps(app.get_package_info(argv[3] if len(argv) > 3 else ""), indent=2))
379379

380-
holoscan_core_init_content_txt = """
380+
holoscan_init_content_txt = """
381381
# SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
382382
# SPDX-License-Identifier: Apache-2.0
383383
#
@@ -432,7 +432,7 @@ def __getattr__(name):
432432
"""
433433

434434

435-
def fix_holoscan_core_import():
435+
def fix_holoscan_import():
436436
"""Fix holoscan submodule core's __init__ to enable lazy load for avoiding failure on loading low level libs."""
437437

438438
holoscan_package_name = "holoscan"
@@ -443,4 +443,4 @@ def fix_holoscan_core_import():
443443
)
444444

445445
with open(holoscan_core_init_path, "w") as f_w:
446-
f_w.write(holoscan_core_init_content_txt)
446+
f_w.write(holoscan_init_content_txt)

run

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -328,14 +328,14 @@ install_python_dev_deps() {
328328
install_edit_mode
329329

330330
# Adding temp fix to address the issue of holoscan sdk dragging in low level dependencies, e.g. libcuda.so
331-
fix_holoscan_core_import
331+
fix_holoscan_import
332332
}
333333

334-
fix_holoscan_core_import() {
334+
fix_holoscan_import() {
335335
local holoscan_package_path=$(${MONAI_PY_EXE} $TOP/monai/deploy/utils/importutil.py dist_module_path holoscan)
336336
c_echo b "holoscan package core module path : " Z "${holoscan_package_path}/holoscan/core"
337-
c_echo b "fixing holoscan package core module import..."
338-
${MONAI_PY_EXE} $TOP/monai/deploy/utils/importutil.py fix_holoscan_core_import
337+
c_echo b "fixing holoscan package module import..."
338+
${MONAI_PY_EXE} $TOP/monai/deploy/utils/importutil.py fix_holoscan_import
339339
c_echo b "done fixing."
340340
}
341341

@@ -409,6 +409,7 @@ clean() {
409409
if [ -n "${VIRTUAL_ENV}" ] || [ -n "${CONDA_PREFIX}" ]; then
410410
c_echo W "Uninstalling MONAI Deploy App SDK installation..."
411411
run_command ${MONAI_PY_EXE} -m pip uninstall monai-deploy-app-sdk
412+
run_command ${MONAI_PY_EXE} -m pip uninstall holoscan
412413
fi
413414

414415
local monai_package_path=$(${MONAI_PY_EXE} $TOP/monai/deploy/utils/importutil.py dist_module_path monai)

0 commit comments

Comments
 (0)