From de6d57eb17f01b07198056812d047743d3d6e217 Mon Sep 17 00:00:00 2001 From: Gigon Bae Date: Fri, 24 Sep 2021 10:44:47 -0700 Subject: [PATCH 1/6] Do not use shlex.quote for Windows - shlex.quote() would remove '\' character on Windows path - Use 'shell=True' to execute shell command Signed-off-by: Gigon Bae --- monai/deploy/runner/utils.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/monai/deploy/runner/utils.py b/monai/deploy/runner/utils.py index de931ec9..02b7ae6e 100644 --- a/monai/deploy/runner/utils.py +++ b/monai/deploy/runner/utils.py @@ -10,7 +10,6 @@ # limitations under the License. import logging -import shlex import subprocess logger = logging.getLogger("app_runner") @@ -41,8 +40,7 @@ def run_cmd(cmd: str) -> int: Returns: output: child process returncode after the command has been executed. """ - args = shlex.split(cmd) - proc = subprocess.Popen(args, universal_newlines=True) + proc = subprocess.Popen(cmd, universal_newlines=True, shell=True) return proc.wait() From df52b70812aff5749be8ef69edd228c24f4526d3 Mon Sep 17 00:00:00 2001 From: Gigon Bae Date: Fri, 24 Sep 2021 10:47:03 -0700 Subject: [PATCH 2/6] =?UTF-8?q?Bump=20version:=200.1.0=20=E2=86=92=200.1.1?= =?UTF-8?q?rc1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gigon Bae --- .bumpversion.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 2bd3f4dc..2685d7c4 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.1.0 +current_version = 0.1.1rc1 parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?Pa|b|rc)(?P\d+))? serialize = {major}.{minor}.{patch}{release}{build} From 337db38ed2dccfbd306e36d87c7ae2d58f951ea6 Mon Sep 17 00:00:00 2001 From: Gigon Bae Date: Fri, 24 Sep 2021 11:05:46 -0700 Subject: [PATCH 3/6] Update .bumpversion.cfg to sign-off commit Signed-off-by: Gigon Bae --- .bumpversion.cfg | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 2685d7c4..70772d73 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -7,14 +7,16 @@ serialize = tag_name = {new_version} tag_message = Bump version: {current_version} → {new_version} commit = True +commit_args = -s tag = True [bumpversion:part:release] values = - '' a b rc + '' +optional_value = '' [bumpversion:part:build] first_value = 1 From f9903b92f8aeed0a259fa861de5c540a1c12e5aa Mon Sep 17 00:00:00 2001 From: Gigon Bae Date: Fri, 24 Sep 2021 13:39:37 -0700 Subject: [PATCH 4/6] Use POSIX path for App Runner Signed-off-by: Gigon Bae --- monai/deploy/runner/runner.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/monai/deploy/runner/runner.py b/monai/deploy/runner/runner.py index e787d89d..fa80a27d 100644 --- a/monai/deploy/runner/runner.py +++ b/monai/deploy/runner/runner.py @@ -12,6 +12,7 @@ import argparse import json import logging +import posixpath import shutil import sys import tempfile @@ -85,13 +86,14 @@ def run_app(map_name: str, input_path: Path, output_path: Path, app_info: dict, if not quiet: cmd += " -a STDOUT" - map_input = Path(app_info["input"]["path"]) - map_output = Path(app_info["output"]["path"]) - if not map_input.is_absolute(): - map_input = app_info["working-directory"] / map_input + # Use POSIX path for input and output paths as local paths are mounted to those paths in the container. + map_input = Path(app_info["input"]["path"]).as_posix() + map_output = Path(app_info["output"]["path"]).as_posix() + if not posixpath.isabs(map_input): + map_input = posixpath.join(app_info["working-directory"], map_input) - if not map_output.is_absolute(): - map_output = app_info["working-directory"] / map_output + if not posixpath.isabs(map_output): + map_output = posixpath.join(app_info["working-directory"], map_output) cmd += f' -e MONAI_INPUTPATH="{map_input}"' cmd += f' -e MONAI_OUTPUTPATH="{map_output}"' From 2030ac9ecf4aa5191fc548f051bc8a9ddb7e6277 Mon Sep 17 00:00:00 2001 From: Gigon Bae Date: Fri, 24 Sep 2021 13:40:34 -0700 Subject: [PATCH 5/6] =?UTF-8?q?Bump=20version:=200.1.1rc1=20=E2=86=92=200.?= =?UTF-8?q?1.1rc2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Gigon Bae --- .bumpversion.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 70772d73..0115767d 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.1.1rc1 +current_version = 0.1.1rc2 parse = (?P\d+)\.(?P\d+)\.(?P\d+)((?Pa|b|rc)(?P\d+))? serialize = {major}.{minor}.{patch}{release}{build} From 6ddf3f8ac38d84c98b95f380c5660d327265945f Mon Sep 17 00:00:00 2001 From: Gigon Bae Date: Fri, 24 Sep 2021 16:50:40 -0700 Subject: [PATCH 6/6] Update installation guide - CUDA on WSL Signed-off-by: Gigon Bae --- docs/source/getting_started/installing_app_sdk.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/source/getting_started/installing_app_sdk.md b/docs/source/getting_started/installing_app_sdk.md index 728f0ce0..7afc9dc6 100644 --- a/docs/source/getting_started/installing_app_sdk.md +++ b/docs/source/getting_started/installing_app_sdk.md @@ -15,7 +15,7 @@ pip install --upgrade monai-deploy-app-sdk ``` :::{note} -For packaging your application, [MONAI Application Packager](/developing_with_sdk/packaging_app) and [MONAI Application Runner (MAR)](/developing_with_sdk/executing_packaged_app_locally) requires NVIDIA Docker installed: +For packaging your application, [MONAI Application Packager](/developing_with_sdk/packaging_app) and [MONAI Application Runner (MAR)](/developing_with_sdk/executing_packaged_app_locally) requires NVIDIA Docker (NVIDIA Container Toolkit) installed: @@ -28,3 +28,7 @@ docker pull nvcr.io/nvidia/pytorch:21.07-py3 ``` ::: + +:::{note} +Windows users can install [CUDA on WSL](https://docs.nvidia.com/cuda/wsl-user-guide/index.html) to use MONAI Deploy App SDK. +:::