diff --git a/monai/deploy/operators/dicom_series_to_volume_operator.py b/monai/deploy/operators/dicom_series_to_volume_operator.py index c4c81282..dc49fbdb 100644 --- a/monai/deploy/operators/dicom_series_to_volume_operator.py +++ b/monai/deploy/operators/dicom_series_to_volume_operator.py @@ -39,6 +39,11 @@ class DICOMSeriesToVolumeOperator(Operator): image: Image object. """ + # Use constants instead of enums in monai to avoid dependency at this level. + MONAI_UTIL_ENUMS_SPACEKEYS_LPS = "LPS" + MONAI_TRANSFORMS_SPATIAL_METADATA_NAME = "space" + METADATA_SPACE_LPS = {MONAI_TRANSFORMS_SPATIAL_METADATA_NAME: MONAI_UTIL_ENUMS_SPACEKEYS_LPS} + def __init__(self, fragment: Fragment, *args, **kwargs): """Create an instance for a containing application object. @@ -84,6 +89,18 @@ def convert_to_image(self, study_selected_series_list: List[StudySelectedSeries] metadata.update(self._get_instance_properties(study_selected_series.study)) selection_metadata = {"selection_name": selection_name} metadata.update(selection_metadata) + # Add the metadata to specify LPS. + # Previously, this was set in ImageReader class, but moving it here allows other loaders + # to determine this value on its own, e.g. NIfTI loader but it does not set this + # resulting in the MONAI Orientation transform to default the labels to RAS. + # It is assumed that the ImageOrientationPatient will be set accordingly if the + # PatientPosition is other than HFS. + # NOTE: This value is properly parsed by MONAI Orientation transform from v1.5.1 onwards. + # Some early MONAI model inference configs incorrectly specify orientation to RAS + # due part to previous MONAI versions did not correctly parse this metadata from + # the input MetaTensor and defaulting to RAS. Now with LPS properly set, the inference + # configs then need to be updated to specify LPS, to achieve the same result. + metadata.update(self.METADATA_SPACE_LPS) voxel_data = self.generate_voxel_data(dicom_series) image = self.create_volumetric_image(voxel_data, metadata) diff --git a/monai/deploy/operators/monai_bundle_inference_operator.py b/monai/deploy/operators/monai_bundle_inference_operator.py index b8126f01..74a897bd 100644 --- a/monai/deploy/operators/monai_bundle_inference_operator.py +++ b/monai/deploy/operators/monai_bundle_inference_operator.py @@ -614,7 +614,7 @@ def _init_config(self, config_names): ) def _get_compose(self, obj_name, disallowed_prefixes): - """Gets a Compose object containing a sequence fo transforms from item `obj_name` in `self._parser`.""" + """Gets a Compose object containing a sequence of transforms from item `obj_name` in `self._parser`.""" if self._parser.get(obj_name) is not None: compose = self._parser.get_parsed_content(obj_name) @@ -749,6 +749,7 @@ def compute(self, op_input, op_output, context): raise ValueError("`meta_data` must be a dict.") value = MetaTensor.ensure_torch_and_prune_meta(value, meta_data) inputs[name] = value + logging.debug(f"Input MetaTensor metadata 'space': {value.meta.get('space', None)}") # Named metadata dict not needed any more, as it is in the MetaTensor inputs = self.pre_process(inputs) @@ -1062,7 +1063,8 @@ def _convert_from_image_dicom_source(self, img: Image) -> Tuple[np.ndarray, Dict # Use defines MetaKeys directly meta_dict[MetaKeys.ORIGINAL_AFFINE] = np.asarray(img_meta_dict.get("nifti_affine_transform", None)) meta_dict[MetaKeys.AFFINE] = meta_dict[MetaKeys.ORIGINAL_AFFINE].copy() - meta_dict[MetaKeys.SPACE] = SpaceKeys.LPS # not using SpaceKeys.RAS or affine_lps_to_ras + # Disabled setting the SPACE key below as it has changed to be set in the actual loader implementation. + # meta_dict[MetaKeys.SPACE] = SpaceKeys.LPS # not using SpaceKeys.RAS or affine_lps_to_ras # Similarly the Image ndarray has dim order DHW, to be rearranged to WHD. # TODO: Need to revisit this once multi-channel image is supported and the Image class itself diff --git a/monai/deploy/operators/monai_seg_inference_operator.py b/monai/deploy/operators/monai_seg_inference_operator.py index 20003f57..6e9bbde8 100644 --- a/monai/deploy/operators/monai_seg_inference_operator.py +++ b/monai/deploy/operators/monai_seg_inference_operator.py @@ -90,7 +90,7 @@ def filter_sw_kwargs(**kwargs) -> Tuple[Dict[str, Any], Dict[str, Any]]: - Are not explicitly defined in the __init__ of this class - Are not explicitly used when calling sliding_window_inference - 2. A dicionary of named parameters to pass to the base class __init__ of this class that: + 2. A dictionary of named parameters to pass to the base class __init__ of this class that: - Are not used when calling sliding_window_inference - Can be successfully converted from Python --> Holoscan's C++ layer @@ -582,7 +582,8 @@ def _get_meta_dict(self, img: Image) -> Dict: # Use define metadata kyes directly meta_dict[MetaKeys.ORIGINAL_AFFINE] = np.asarray(img_meta_dict.get("nifti_affine_transform", None)) meta_dict[MetaKeys.AFFINE] = meta_dict[MetaKeys.ORIGINAL_AFFINE].copy() - meta_dict[MetaKeys.SPACE] = SpaceKeys.LPS # not using SpaceKeys.RAS or affine_lps_to_ras + # Disabled setting the SPACE key below as it has changed to be set in the actual loader implementation. + # meta_dict[MetaKeys.SPACE] = SpaceKeys.LPS # not using SpaceKeys.RAS or affine_lps_to_ras # The spatial shape, again, referring to ITKReader, it is the WHD meta_dict[MetaKeys.SPATIAL_SHAPE] = np.asarray(img.asnumpy().T.shape) # Well, no channel as the image data shape is forced to the the same as spatial shape diff --git a/notebooks/tutorials/03_segmentation_app.ipynb b/notebooks/tutorials/03_segmentation_app.ipynb index 1933f47a..b6bddd17 100644 --- a/notebooks/tutorials/03_segmentation_app.ipynb +++ b/notebooks/tutorials/03_segmentation_app.ipynb @@ -99,7 +99,9 @@ "name": "stdout", "output_type": "stream", "text": [ - "/home/mqin/src/md-app-sdk/monai/deploy/utils/importutil.py:20: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + "/home/mqin/src/md-app-sdk/.venv/lib/python3.10/site-packages/monai/deploy/utils/importutil.py:20: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + " import pkg_resources\n", + "/home/mqin/src/md-app-sdk/.venv/lib/python3.10/site-packages/monai/deploy/utils/importutil.py:20: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", " import pkg_resources\n" ] } @@ -405,7 +407,7 @@ "name": "stderr", "output_type": "stream", "text": [ - "/home/mqin/src/md-app-sdk/monai/deploy/utils/importutil.py:20: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + "/home/mqin/src/md-app-sdk/.venv/lib/python3.10/site-packages/monai/deploy/utils/importutil.py:20: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", " import pkg_resources\n" ] } @@ -749,78 +751,78 @@ "output_type": "stream", "text": [ "[info] [fragment.cpp:969] Loading extensions from configs...\n", - "[2025-09-29 23:44:21,073] [INFO] (root) - Parsed args: Namespace(log_level=None, input=None, output=None, model=None, workdir=None, triton_server_netloc=None, argv=[])\n", - "[2025-09-29 23:44:21,081] [INFO] (root) - AppContext object: AppContext(input_path=dcm, output_path=output, model_path=models, workdir=), triton_server_netloc=\n", - "[2025-09-29 23:44:21,082] [INFO] (__main__.AISpleenSegApp) - App input and output path: dcm, output\n", + "[2025-09-30 18:29:37,547] [INFO] (root) - Parsed args: Namespace(log_level=None, input=None, output=None, model=None, workdir=None, triton_server_netloc=None, argv=[])\n", + "[2025-09-30 18:29:37,553] [INFO] (root) - AppContext object: AppContext(input_path=dcm, output_path=output, model_path=models, workdir=), triton_server_netloc=\n", + "[2025-09-30 18:29:37,554] [INFO] (__main__.AISpleenSegApp) - App input and output path: dcm, output\n", "[info] [gxf_executor.cpp:344] Creating context\n", "[info] [gxf_executor.cpp:2508] Activating Graph...\n", "[info] [gxf_executor.cpp:2579] Running Graph...\n", "[info] [gxf_executor.cpp:2581] Waiting for completion...\n", "[info] [greedy_scheduler.cpp:191] Scheduling 5 entities\n", - "[2025-09-29 23:44:21,243] [INFO] (monai.deploy.operators.dicom_data_loader_operator.DICOMDataLoaderOperator) - No or invalid input path from the optional input port: None\n", - "[2025-09-29 23:44:21,732] [INFO] (root) - Finding series for Selection named: CT Series\n", - "[2025-09-29 23:44:21,733] [INFO] (root) - Searching study, : 1.3.6.1.4.1.14519.5.2.1.7085.2626.822645453932810382886582736291\n", + "[2025-09-30 18:29:37,727] [INFO] (monai.deploy.operators.dicom_data_loader_operator.DICOMDataLoaderOperator) - No or invalid input path from the optional input port: None\n", + "[2025-09-30 18:29:38,077] [INFO] (root) - Finding series for Selection named: CT Series\n", + "[2025-09-30 18:29:38,078] [INFO] (root) - Searching study, : 1.3.6.1.4.1.14519.5.2.1.7085.2626.822645453932810382886582736291\n", " # of series: 1\n", - "[2025-09-29 23:44:21,734] [INFO] (root) - Working on series, instance UID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", - "[2025-09-29 23:44:21,734] [INFO] (root) - On attribute: 'StudyDescription' to match value: '(.*?)'\n", - "[2025-09-29 23:44:21,735] [INFO] (root) - Series attribute StudyDescription value: CT ABDOMEN W IV CONTRAST\n", - "[2025-09-29 23:44:21,736] [INFO] (root) - On attribute: 'Modality' to match value: '(?i)CT'\n", - "[2025-09-29 23:44:21,737] [INFO] (root) - Series attribute Modality value: CT\n", - "[2025-09-29 23:44:21,737] [INFO] (root) - On attribute: 'SeriesDescription' to match value: '(.*?)'\n", - "[2025-09-29 23:44:21,738] [INFO] (root) - Series attribute SeriesDescription value: ABD/PANC 3.0 B31f\n", - "[2025-09-29 23:44:21,739] [INFO] (root) - On attribute: 'ImageType' to match value: ['PRIMARY', 'ORIGINAL']\n", - "[2025-09-29 23:44:21,739] [INFO] (root) - Series attribute ImageType value: None\n", - "[2025-09-29 23:44:21,740] [INFO] (root) - Instance level attribute ImageType value: [\"['ORIGINAL', 'PRIMARY', 'AXIAL', 'CT_SOM5 SPI']\"]\n", - "[2025-09-29 23:44:21,741] [INFO] (root) - Selected Series, UID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", - "[2025-09-29 23:44:21,741] [INFO] (root) - Series Selection finalized\n", - "[2025-09-29 23:44:21,742] [INFO] (root) - Series Description of selected DICOM Series for inference: ABD/PANC 3.0 B31f\n", - "[2025-09-29 23:44:21,743] [INFO] (root) - Series Instance UID of selected DICOM Series for inference: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", + "[2025-09-30 18:29:38,079] [INFO] (root) - Working on series, instance UID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", + "[2025-09-30 18:29:38,080] [INFO] (root) - On attribute: 'StudyDescription' to match value: '(.*?)'\n", + "[2025-09-30 18:29:38,081] [INFO] (root) - Series attribute StudyDescription value: CT ABDOMEN W IV CONTRAST\n", + "[2025-09-30 18:29:38,083] [INFO] (root) - On attribute: 'Modality' to match value: '(?i)CT'\n", + "[2025-09-30 18:29:38,084] [INFO] (root) - Series attribute Modality value: CT\n", + "[2025-09-30 18:29:38,085] [INFO] (root) - On attribute: 'SeriesDescription' to match value: '(.*?)'\n", + "[2025-09-30 18:29:38,087] [INFO] (root) - Series attribute SeriesDescription value: ABD/PANC 3.0 B31f\n", + "[2025-09-30 18:29:38,088] [INFO] (root) - On attribute: 'ImageType' to match value: ['PRIMARY', 'ORIGINAL']\n", + "[2025-09-30 18:29:38,089] [INFO] (root) - Series attribute ImageType value: None\n", + "[2025-09-30 18:29:38,091] [INFO] (root) - Instance level attribute ImageType value: [\"['ORIGINAL', 'PRIMARY', 'AXIAL', 'CT_SOM5 SPI']\"]\n", + "[2025-09-30 18:29:38,092] [INFO] (root) - Selected Series, UID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", + "[2025-09-30 18:29:38,093] [INFO] (root) - Series Selection finalized\n", + "[2025-09-30 18:29:38,094] [INFO] (root) - Series Description of selected DICOM Series for inference: ABD/PANC 3.0 B31f\n", + "[2025-09-30 18:29:38,095] [INFO] (root) - Series Instance UID of selected DICOM Series for inference: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", "/home/mqin/src/md-app-sdk/.venv/lib/python3.10/site-packages/monai/utils/deprecate_utils.py:321: FutureWarning: monai.transforms.spatial.dictionary Orientationd.__init__:labels: Current default value of argument `labels=(('L', 'R'), ('P', 'A'), ('I', 'S'))` was changed in version None from `labels=(('L', 'R'), ('P', 'A'), ('I', 'S'))` to `labels=None`. Default value changed to None meaning that the transform now uses the 'space' of a meta-tensor, if applicable, to determine appropriate axis labels.\n", " warn_deprecated(argname, msg, warning_category)\n", - "[2025-09-29 23:44:22,119] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Converted Image object metadata:\n", - "[2025-09-29 23:44:22,121] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesInstanceUID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239, type \n", - "[2025-09-29 23:44:22,122] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesDate: 20090831, type \n", - "[2025-09-29 23:44:22,123] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesTime: 101721.452, type \n", - "[2025-09-29 23:44:22,124] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Modality: CT, type \n", - "[2025-09-29 23:44:22,125] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesDescription: ABD/PANC 3.0 B31f, type \n", - "[2025-09-29 23:44:22,126] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - PatientPosition: HFS, type \n", - "[2025-09-29 23:44:22,126] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesNumber: 8, type \n", - "[2025-09-29 23:44:22,127] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - row_pixel_spacing: 0.7890625, type \n", - "[2025-09-29 23:44:22,128] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - col_pixel_spacing: 0.7890625, type \n", - "[2025-09-29 23:44:22,129] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - depth_pixel_spacing: 1.5, type \n", - "[2025-09-29 23:44:22,129] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - row_direction_cosine: [1.0, 0.0, 0.0], type \n", - "[2025-09-29 23:44:22,130] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - col_direction_cosine: [0.0, 1.0, 0.0], type \n", - "[2025-09-29 23:44:22,130] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - depth_direction_cosine: [0.0, 0.0, 1.0], type \n", - "[2025-09-29 23:44:22,131] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - dicom_affine_transform: [[ 0.7890625 0. 0. -197.60547 ]\n", + "[2025-09-30 18:29:38,529] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Converted Image object metadata:\n", + "[2025-09-30 18:29:38,529] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesInstanceUID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239, type \n", + "[2025-09-30 18:29:38,530] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesDate: 20090831, type \n", + "[2025-09-30 18:29:38,530] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesTime: 101721.452, type \n", + "[2025-09-30 18:29:38,531] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Modality: CT, type \n", + "[2025-09-30 18:29:38,531] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesDescription: ABD/PANC 3.0 B31f, type \n", + "[2025-09-30 18:29:38,532] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - PatientPosition: HFS, type \n", + "[2025-09-30 18:29:38,533] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesNumber: 8, type \n", + "[2025-09-30 18:29:38,533] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - row_pixel_spacing: 0.7890625, type \n", + "[2025-09-30 18:29:38,535] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - col_pixel_spacing: 0.7890625, type \n", + "[2025-09-30 18:29:38,536] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - depth_pixel_spacing: 1.5, type \n", + "[2025-09-30 18:29:38,537] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - row_direction_cosine: [1.0, 0.0, 0.0], type \n", + "[2025-09-30 18:29:38,538] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - col_direction_cosine: [0.0, 1.0, 0.0], type \n", + "[2025-09-30 18:29:38,538] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - depth_direction_cosine: [0.0, 0.0, 1.0], type \n", + "[2025-09-30 18:29:38,540] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - dicom_affine_transform: [[ 0.7890625 0. 0. -197.60547 ]\n", " [ 0. 0.7890625 0. -398.60547 ]\n", " [ 0. 0. 1.5 -383. ]\n", " [ 0. 0. 0. 1. ]], type \n", - "[2025-09-29 23:44:22,132] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - nifti_affine_transform: [[ -0.7890625 -0. -0. 197.60547 ]\n", + "[2025-09-30 18:29:38,541] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - nifti_affine_transform: [[ -0.7890625 -0. -0. 197.60547 ]\n", " [ -0. -0.7890625 -0. 398.60547 ]\n", " [ 0. 0. 1.5 -383. ]\n", " [ 0. 0. 0. 1. ]], type \n", - "[2025-09-29 23:44:22,133] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyInstanceUID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.822645453932810382886582736291, type \n", - "[2025-09-29 23:44:22,133] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyID: , type \n", - "[2025-09-29 23:44:22,134] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyDate: 20090831, type \n", - "[2025-09-29 23:44:22,134] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyTime: 095948.599, type \n", - "[2025-09-29 23:44:22,135] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyDescription: CT ABDOMEN W IV CONTRAST, type \n", - "[2025-09-29 23:44:22,135] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - AccessionNumber: 5471978513296937, type \n", - "[2025-09-29 23:44:22,140] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - selection_name: CT Series, type \n", - "[2025-09-29 23:44:22,141] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - space: LPS, type \n" + "[2025-09-30 18:29:38,542] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyInstanceUID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.822645453932810382886582736291, type \n", + "[2025-09-30 18:29:38,543] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyID: , type \n", + "[2025-09-30 18:29:38,546] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyDate: 20090831, type \n", + "[2025-09-30 18:29:38,547] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyTime: 095948.599, type \n", + "[2025-09-30 18:29:38,548] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyDescription: CT ABDOMEN W IV CONTRAST, type \n", + "[2025-09-30 18:29:38,548] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - AccessionNumber: 5471978513296937, type \n", + "[2025-09-30 18:29:38,549] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - selection_name: CT Series, type \n", + "[2025-09-30 18:29:38,549] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - space: LPS, type \n" ] }, { "name": "stdout", "output_type": "stream", "text": [ - "2025-09-29 23:44:22,776 INFO image_writer.py:197 - writing: /home/mqin/src/md-app-sdk/notebooks/tutorials/output/saved_images_folder/1.3.6.1.4.1.14519.5.2.1.7085.2626/1.3.6.1.4.1.14519.5.2.1.7085.2626.nii\n" + "2025-09-30 18:29:39,201 INFO image_writer.py:197 - writing: /home/mqin/src/md-app-sdk/notebooks/tutorials/output/saved_images_folder/1.3.6.1.4.1.14519.5.2.1.7085.2626/1.3.6.1.4.1.14519.5.2.1.7085.2626.nii\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "[2025-09-29 23:44:24,436] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Input of shape: torch.Size([1, 1, 270, 270, 106])\n", + "[2025-09-30 18:29:41,040] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Input of shape: torch.Size([1, 1, 270, 270, 106])\n", "/home/mqin/src/md-app-sdk/.venv/lib/python3.10/site-packages/monai/inferers/utils.py:226: UserWarning: Using a non-tuple sequence for multidimensional indexing is deprecated and will be changed in pytorch 2.9; use x[tuple(seq)] instead of x[seq]. In pytorch 2.9 this will be interpreted as tensor index, x[torch.tensor(seq)], which will result either in an error or a different result (Triggered internally at /pytorch/torch/csrc/autograd/python_variable_indexing.cpp:306.)\n", " win_data = torch.cat([inputs[win_slice] for win_slice in unravel_slice]).to(sw_device)\n", "/home/mqin/src/md-app-sdk/.venv/lib/python3.10/site-packages/monai/inferers/utils.py:370: UserWarning: Using a non-tuple sequence for multidimensional indexing is deprecated and will be changed in pytorch 2.9; use x[tuple(seq)] instead of x[seq]. In pytorch 2.9 this will be interpreted as tensor index, x[torch.tensor(seq)], which will result either in an error or a different result (Triggered internally at /pytorch/torch/csrc/autograd/python_variable_indexing.cpp:306.)\n", @@ -831,34 +833,34 @@ "name": "stdout", "output_type": "stream", "text": [ - "2025-09-29 23:44:25,454 INFO image_writer.py:197 - writing: /home/mqin/src/md-app-sdk/notebooks/tutorials/output/saved_images_folder/1.3.6.1.4.1.14519.5.2.1.7085.2626/1.3.6.1.4.1.14519.5.2.1.7085.2626_seg.nii\n" + "2025-09-30 18:29:42,211 INFO image_writer.py:197 - writing: /home/mqin/src/md-app-sdk/notebooks/tutorials/output/saved_images_folder/1.3.6.1.4.1.14519.5.2.1.7085.2626/1.3.6.1.4.1.14519.5.2.1.7085.2626_seg.nii\n" ] }, { "name": "stderr", "output_type": "stream", "text": [ - "[2025-09-29 23:44:26,921] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform length/batch size of output: 1\n", - "[2025-09-29 23:44:26,923] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform pixel spacings for pred: tensor([0.7891, 0.7891, 1.5000], dtype=torch.float64)\n", - "[2025-09-29 23:44:27,049] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform pred of shape: (1, 512, 512, 204)\n", - "[2025-09-29 23:44:27,089] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Output Seg image numpy array of type shape: (204, 512, 512)\n", - "[2025-09-29 23:44:27,095] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Output Seg image pixel max value: 1\n", + "[2025-09-30 18:29:43,678] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform length/batch size of output: 1\n", + "[2025-09-30 18:29:43,688] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform pixel spacings for pred: tensor([0.7891, 0.7891, 1.5000], dtype=torch.float64)\n", + "[2025-09-30 18:29:43,822] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform pred of shape: (1, 512, 512, 204)\n", + "[2025-09-30 18:29:43,878] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Output Seg image numpy array of type shape: (204, 512, 512)\n", + "[2025-09-30 18:29:43,885] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Output Seg image pixel max value: 1\n", "/home/mqin/src/md-app-sdk/.venv/lib/python3.10/site-packages/highdicom/base.py:165: UserWarning: The string \"C3N-00198\" is unlikely to represent the intended person name since it contains only a single component. Construct a person name according to the format in described in https://dicom.nema.org/dicom/2013/output/chtml/part05/sect_6.2.html#sect_6.2.1.2, or, in pydicom 2.2.0 or later, use the pydicom.valuerep.PersonName.from_named_components() method to construct the person name correctly. If a single-component name is really intended, add a trailing caret character to disambiguate the name.\n", " check_person_name(patient_name)\n", - "[2025-09-29 23:44:28,454] [INFO] (highdicom.base) - copy Image-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", - "[2025-09-29 23:44:28,455] [INFO] (highdicom.base) - copy attributes of module \"Specimen\"\n", - "[2025-09-29 23:44:28,456] [INFO] (highdicom.base) - copy Patient-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", - "[2025-09-29 23:44:28,457] [INFO] (highdicom.base) - copy attributes of module \"Patient\"\n", - "[2025-09-29 23:44:28,458] [INFO] (highdicom.base) - copy attributes of module \"Clinical Trial Subject\"\n", - "[2025-09-29 23:44:28,459] [INFO] (highdicom.base) - copy Study-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", - "[2025-09-29 23:44:28,460] [INFO] (highdicom.base) - copy attributes of module \"General Study\"\n", - "[2025-09-29 23:44:28,460] [INFO] (highdicom.base) - copy attributes of module \"Patient Study\"\n", - "[2025-09-29 23:44:28,461] [INFO] (highdicom.base) - copy attributes of module \"Clinical Trial Study\"\n", + "[2025-09-30 18:29:45,433] [INFO] (highdicom.base) - copy Image-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", + "[2025-09-30 18:29:45,435] [INFO] (highdicom.base) - copy attributes of module \"Specimen\"\n", + "[2025-09-30 18:29:45,436] [INFO] (highdicom.base) - copy Patient-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", + "[2025-09-30 18:29:45,437] [INFO] (highdicom.base) - copy attributes of module \"Patient\"\n", + "[2025-09-30 18:29:45,438] [INFO] (highdicom.base) - copy attributes of module \"Clinical Trial Subject\"\n", + "[2025-09-30 18:29:45,439] [INFO] (highdicom.base) - copy Study-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", + "[2025-09-30 18:29:45,440] [INFO] (highdicom.base) - copy attributes of module \"General Study\"\n", + "[2025-09-30 18:29:45,442] [INFO] (highdicom.base) - copy attributes of module \"Patient Study\"\n", + "[2025-09-30 18:29:45,443] [INFO] (highdicom.base) - copy attributes of module \"Clinical Trial Study\"\n", "[info] [greedy_scheduler.cpp:372] Scheduler stopped: Some entities are waiting for execution, but there are no periodic or async entities to get out of the deadlock.\n", "[info] [greedy_scheduler.cpp:401] Scheduler finished.\n", "[info] [gxf_executor.cpp:2588] Deactivating Graph...\n", "[info] [gxf_executor.cpp:2597] Graph execution finished.\n", - "[2025-09-29 23:44:28,569] [INFO] (__main__.AISpleenSegApp) - End run\n" + "[2025-09-30 18:29:45,557] [INFO] (__main__.AISpleenSegApp) - End run\n" ] } ], @@ -1297,95 +1299,95 @@ "name": "stdout", "output_type": "stream", "text": [ - "/home/mqin/src/md-app-sdk/monai/deploy/utils/importutil.py:20: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", + "/home/mqin/src/md-app-sdk/.venv/lib/python3.10/site-packages/monai/deploy/utils/importutil.py:20: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", " import pkg_resources\n", "[\u001b[32minfo\u001b[m] [fragment.cpp:969] Loading extensions from configs...\n", - "[2025-09-29 23:44:32,617] [INFO] (root) - Parsed args: Namespace(log_level=None, input=None, output=None, model=None, workdir=None, triton_server_netloc=None, argv=['my_app'])\n", - "[2025-09-29 23:44:32,620] [INFO] (root) - AppContext object: AppContext(input_path=dcm, output_path=output, model_path=models, workdir=), triton_server_netloc=\n", - "[2025-09-29 23:44:32,620] [INFO] (app.AISpleenSegApp) - App input and output path: dcm, output\n", + "[2025-09-30 18:29:50,368] [INFO] (root) - Parsed args: Namespace(log_level=None, input=None, output=None, model=None, workdir=None, triton_server_netloc=None, argv=['my_app'])\n", + "[2025-09-30 18:29:50,372] [INFO] (root) - AppContext object: AppContext(input_path=dcm, output_path=output, model_path=models, workdir=), triton_server_netloc=\n", + "[2025-09-30 18:29:50,372] [INFO] (app.AISpleenSegApp) - App input and output path: dcm, output\n", "[\u001b[32minfo\u001b[m] [gxf_executor.cpp:344] Creating context\n", "[\u001b[32minfo\u001b[m] [gxf_executor.cpp:2508] Activating Graph...\n", "[\u001b[32minfo\u001b[m] [gxf_executor.cpp:2579] Running Graph...\n", "[\u001b[32minfo\u001b[m] [gxf_executor.cpp:2581] Waiting for completion...\n", "[\u001b[32minfo\u001b[m] [greedy_scheduler.cpp:191] Scheduling 5 entities\n", - "[2025-09-29 23:44:32,742] [INFO] (monai.deploy.operators.dicom_data_loader_operator.DICOMDataLoaderOperator) - No or invalid input path from the optional input port: None\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - Finding series for Selection named: CT Series\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - Searching study, : 1.3.6.1.4.1.14519.5.2.1.7085.2626.822645453932810382886582736291\n", + "[2025-09-30 18:29:50,498] [INFO] (monai.deploy.operators.dicom_data_loader_operator.DICOMDataLoaderOperator) - No or invalid input path from the optional input port: None\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - Finding series for Selection named: CT Series\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - Searching study, : 1.3.6.1.4.1.14519.5.2.1.7085.2626.822645453932810382886582736291\n", " # of series: 1\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - Working on series, instance UID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - On attribute: 'StudyDescription' to match value: '(.*?)'\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - Series attribute StudyDescription value: CT ABDOMEN W IV CONTRAST\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - On attribute: 'Modality' to match value: '(?i)CT'\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - Series attribute Modality value: CT\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - On attribute: 'SeriesDescription' to match value: '(.*?)'\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - Series attribute SeriesDescription value: ABD/PANC 3.0 B31f\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - On attribute: 'ImageType' to match value: ['PRIMARY', 'ORIGINAL']\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - Series attribute ImageType value: None\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - Instance level attribute ImageType value: [\"['ORIGINAL', 'PRIMARY', 'AXIAL', 'CT_SOM5 SPI']\"]\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - Selected Series, UID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - Series Selection finalized\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - Series Description of selected DICOM Series for inference: ABD/PANC 3.0 B31f\n", - "[2025-09-29 23:44:33,040] [INFO] (root) - Series Instance UID of selected DICOM Series for inference: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - Working on series, instance UID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - On attribute: 'StudyDescription' to match value: '(.*?)'\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - Series attribute StudyDescription value: CT ABDOMEN W IV CONTRAST\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - On attribute: 'Modality' to match value: '(?i)CT'\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - Series attribute Modality value: CT\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - On attribute: 'SeriesDescription' to match value: '(.*?)'\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - Series attribute SeriesDescription value: ABD/PANC 3.0 B31f\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - On attribute: 'ImageType' to match value: ['PRIMARY', 'ORIGINAL']\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - Series attribute ImageType value: None\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - Instance level attribute ImageType value: [\"['ORIGINAL', 'PRIMARY', 'AXIAL', 'CT_SOM5 SPI']\"]\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - Selected Series, UID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - Series Selection finalized\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - Series Description of selected DICOM Series for inference: ABD/PANC 3.0 B31f\n", + "[2025-09-30 18:29:50,911] [INFO] (root) - Series Instance UID of selected DICOM Series for inference: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", "/home/mqin/src/md-app-sdk/.venv/lib/python3.10/site-packages/monai/utils/deprecate_utils.py:321: FutureWarning: monai.transforms.spatial.dictionary Orientationd.__init__:labels: Current default value of argument `labels=(('L', 'R'), ('P', 'A'), ('I', 'S'))` was changed in version None from `labels=(('L', 'R'), ('P', 'A'), ('I', 'S'))` to `labels=None`. Default value changed to None meaning that the transform now uses the 'space' of a meta-tensor, if applicable, to determine appropriate axis labels.\n", " warn_deprecated(argname, msg, warning_category)\n", - "[2025-09-29 23:44:33,404] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Converted Image object metadata:\n", - "[2025-09-29 23:44:33,404] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesInstanceUID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239, type \n", - "[2025-09-29 23:44:33,404] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesDate: 20090831, type \n", - "[2025-09-29 23:44:33,404] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesTime: 101721.452, type \n", - "[2025-09-29 23:44:33,404] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Modality: CT, type \n", - "[2025-09-29 23:44:33,404] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesDescription: ABD/PANC 3.0 B31f, type \n", - "[2025-09-29 23:44:33,404] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - PatientPosition: HFS, type \n", - "[2025-09-29 23:44:33,404] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesNumber: 8, type \n", - "[2025-09-29 23:44:33,404] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - row_pixel_spacing: 0.7890625, type \n", - "[2025-09-29 23:44:33,404] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - col_pixel_spacing: 0.7890625, type \n", - "[2025-09-29 23:44:33,404] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - depth_pixel_spacing: 1.5, type \n", - "[2025-09-29 23:44:33,404] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - row_direction_cosine: [1.0, 0.0, 0.0], type \n", - "[2025-09-29 23:44:33,404] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - col_direction_cosine: [0.0, 1.0, 0.0], type \n", - "[2025-09-29 23:44:33,404] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - depth_direction_cosine: [0.0, 0.0, 1.0], type \n", - "[2025-09-29 23:44:33,405] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - dicom_affine_transform: [[ 0.7890625 0. 0. -197.60547 ]\n", + "[2025-09-30 18:29:51,293] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Converted Image object metadata:\n", + "[2025-09-30 18:29:51,293] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesInstanceUID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesDate: 20090831, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesTime: 101721.452, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Modality: CT, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesDescription: ABD/PANC 3.0 B31f, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - PatientPosition: HFS, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesNumber: 8, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - row_pixel_spacing: 0.7890625, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - col_pixel_spacing: 0.7890625, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - depth_pixel_spacing: 1.5, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - row_direction_cosine: [1.0, 0.0, 0.0], type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - col_direction_cosine: [0.0, 1.0, 0.0], type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - depth_direction_cosine: [0.0, 0.0, 1.0], type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - dicom_affine_transform: [[ 0.7890625 0. 0. -197.60547 ]\n", " [ 0. 0.7890625 0. -398.60547 ]\n", " [ 0. 0. 1.5 -383. ]\n", " [ 0. 0. 0. 1. ]], type \n", - "[2025-09-29 23:44:33,405] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - nifti_affine_transform: [[ -0.7890625 -0. -0. 197.60547 ]\n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - nifti_affine_transform: [[ -0.7890625 -0. -0. 197.60547 ]\n", " [ -0. -0.7890625 -0. 398.60547 ]\n", " [ 0. 0. 1.5 -383. ]\n", " [ 0. 0. 0. 1. ]], type \n", - "[2025-09-29 23:44:33,405] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyInstanceUID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.822645453932810382886582736291, type \n", - "[2025-09-29 23:44:33,405] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyID: , type \n", - "[2025-09-29 23:44:33,405] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyDate: 20090831, type \n", - "[2025-09-29 23:44:33,405] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyTime: 095948.599, type \n", - "[2025-09-29 23:44:33,405] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyDescription: CT ABDOMEN W IV CONTRAST, type \n", - "[2025-09-29 23:44:33,405] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - AccessionNumber: 5471978513296937, type \n", - "[2025-09-29 23:44:33,405] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - selection_name: CT Series, type \n", - "[2025-09-29 23:44:33,405] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - space: LPS, type \n", - "2025-09-29 23:44:34,044 INFO image_writer.py:197 - writing: /home/mqin/src/md-app-sdk/notebooks/tutorials/output/saved_images_folder/1.3.6.1.4.1.14519.5.2.1.7085.2626/1.3.6.1.4.1.14519.5.2.1.7085.2626.nii\n", - "[2025-09-29 23:44:35,794] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Input of shape: torch.Size([1, 1, 270, 270, 106])\n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyInstanceUID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.822645453932810382886582736291, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyID: , type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyDate: 20090831, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyTime: 095948.599, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyDescription: CT ABDOMEN W IV CONTRAST, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - AccessionNumber: 5471978513296937, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - selection_name: CT Series, type \n", + "[2025-09-30 18:29:51,294] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - space: LPS, type \n", + "2025-09-30 18:29:51,956 INFO image_writer.py:197 - writing: /home/mqin/src/md-app-sdk/notebooks/tutorials/output/saved_images_folder/1.3.6.1.4.1.14519.5.2.1.7085.2626/1.3.6.1.4.1.14519.5.2.1.7085.2626.nii\n", + "[2025-09-30 18:29:53,772] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Input of shape: torch.Size([1, 1, 270, 270, 106])\n", "/home/mqin/src/md-app-sdk/.venv/lib/python3.10/site-packages/monai/inferers/utils.py:226: UserWarning: Using a non-tuple sequence for multidimensional indexing is deprecated and will be changed in pytorch 2.9; use x[tuple(seq)] instead of x[seq]. In pytorch 2.9 this will be interpreted as tensor index, x[torch.tensor(seq)], which will result either in an error or a different result (Triggered internally at /pytorch/torch/csrc/autograd/python_variable_indexing.cpp:306.)\n", " win_data = torch.cat([inputs[win_slice] for win_slice in unravel_slice]).to(sw_device)\n", "/home/mqin/src/md-app-sdk/.venv/lib/python3.10/site-packages/monai/inferers/utils.py:370: UserWarning: Using a non-tuple sequence for multidimensional indexing is deprecated and will be changed in pytorch 2.9; use x[tuple(seq)] instead of x[seq]. In pytorch 2.9 this will be interpreted as tensor index, x[torch.tensor(seq)], which will result either in an error or a different result (Triggered internally at /pytorch/torch/csrc/autograd/python_variable_indexing.cpp:306.)\n", " out[idx_zm] += p\n", - "2025-09-29 23:44:36,872 INFO image_writer.py:197 - writing: /home/mqin/src/md-app-sdk/notebooks/tutorials/output/saved_images_folder/1.3.6.1.4.1.14519.5.2.1.7085.2626/1.3.6.1.4.1.14519.5.2.1.7085.2626_seg.nii\n", - "[2025-09-29 23:44:38,317] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform length/batch size of output: 1\n", - "[2025-09-29 23:44:38,318] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform pixel spacings for pred: tensor([0.7891, 0.7891, 1.5000], dtype=torch.float64)\n", - "[2025-09-29 23:44:38,443] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform pred of shape: (1, 512, 512, 204)\n", - "[2025-09-29 23:44:38,482] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Output Seg image numpy array of type shape: (204, 512, 512)\n", - "[2025-09-29 23:44:38,487] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Output Seg image pixel max value: 1\n", + "2025-09-30 18:29:54,989 INFO image_writer.py:197 - writing: /home/mqin/src/md-app-sdk/notebooks/tutorials/output/saved_images_folder/1.3.6.1.4.1.14519.5.2.1.7085.2626/1.3.6.1.4.1.14519.5.2.1.7085.2626_seg.nii\n", + "[2025-09-30 18:29:56,547] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform length/batch size of output: 1\n", + "[2025-09-30 18:29:56,549] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform pixel spacings for pred: tensor([0.7891, 0.7891, 1.5000], dtype=torch.float64)\n", + "[2025-09-30 18:29:56,689] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform pred of shape: (1, 512, 512, 204)\n", + "[2025-09-30 18:29:56,732] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Output Seg image numpy array of type shape: (204, 512, 512)\n", + "[2025-09-30 18:29:56,737] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Output Seg image pixel max value: 1\n", "/home/mqin/src/md-app-sdk/.venv/lib/python3.10/site-packages/highdicom/base.py:165: UserWarning: The string \"C3N-00198\" is unlikely to represent the intended person name since it contains only a single component. Construct a person name according to the format in described in https://dicom.nema.org/dicom/2013/output/chtml/part05/sect_6.2.html#sect_6.2.1.2, or, in pydicom 2.2.0 or later, use the pydicom.valuerep.PersonName.from_named_components() method to construct the person name correctly. If a single-component name is really intended, add a trailing caret character to disambiguate the name.\n", " check_person_name(patient_name)\n", - "[2025-09-29 23:44:39,777] [INFO] (highdicom.base) - copy Image-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", - "[2025-09-29 23:44:39,777] [INFO] (highdicom.base) - copy attributes of module \"Specimen\"\n", - "[2025-09-29 23:44:39,777] [INFO] (highdicom.base) - copy Patient-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", - "[2025-09-29 23:44:39,777] [INFO] (highdicom.base) - copy attributes of module \"Patient\"\n", - "[2025-09-29 23:44:39,778] [INFO] (highdicom.base) - copy attributes of module \"Clinical Trial Subject\"\n", - "[2025-09-29 23:44:39,778] [INFO] (highdicom.base) - copy Study-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", - "[2025-09-29 23:44:39,778] [INFO] (highdicom.base) - copy attributes of module \"General Study\"\n", - "[2025-09-29 23:44:39,778] [INFO] (highdicom.base) - copy attributes of module \"Patient Study\"\n", - "[2025-09-29 23:44:39,778] [INFO] (highdicom.base) - copy attributes of module \"Clinical Trial Study\"\n", + "[2025-09-30 18:29:58,268] [INFO] (highdicom.base) - copy Image-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", + "[2025-09-30 18:29:58,269] [INFO] (highdicom.base) - copy attributes of module \"Specimen\"\n", + "[2025-09-30 18:29:58,269] [INFO] (highdicom.base) - copy Patient-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", + "[2025-09-30 18:29:58,269] [INFO] (highdicom.base) - copy attributes of module \"Patient\"\n", + "[2025-09-30 18:29:58,269] [INFO] (highdicom.base) - copy attributes of module \"Clinical Trial Subject\"\n", + "[2025-09-30 18:29:58,269] [INFO] (highdicom.base) - copy Study-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", + "[2025-09-30 18:29:58,270] [INFO] (highdicom.base) - copy attributes of module \"General Study\"\n", + "[2025-09-30 18:29:58,270] [INFO] (highdicom.base) - copy attributes of module \"Patient Study\"\n", + "[2025-09-30 18:29:58,270] [INFO] (highdicom.base) - copy attributes of module \"Clinical Trial Study\"\n", "[\u001b[32minfo\u001b[m] [greedy_scheduler.cpp:372] Scheduler stopped: Some entities are waiting for execution, but there are no periodic or async entities to get out of the deadlock.\n", "[\u001b[32minfo\u001b[m] [greedy_scheduler.cpp:401] Scheduler finished.\n", "[\u001b[32minfo\u001b[m] [gxf_executor.cpp:2588] Deactivating Graph...\n", "[\u001b[32minfo\u001b[m] [gxf_executor.cpp:2597] Graph execution finished.\n", - "[2025-09-29 23:44:39,872] [INFO] (app.AISpleenSegApp) - End run\n", + "[2025-09-30 18:29:58,398] [INFO] (app.AISpleenSegApp) - End run\n", "[\u001b[32minfo\u001b[m] [gxf_executor.cpp:379] Destroying context\n" ] } @@ -1405,7 +1407,7 @@ "output_type": "stream", "text": [ "output:\n", - "1.2.826.0.1.3680043.10.511.3.29717756681998834683338751730398576.dcm\n", + "1.2.826.0.1.3680043.10.511.3.3214240315526252042636124072020054.dcm\n", "saved_images_folder\n", "\n", "output/saved_images_folder:\n", @@ -1505,587 +1507,31 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": null, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ - "[2025-09-29 23:44:41,781] [INFO] (common) - Downloading CLI manifest file...\n", - "[2025-09-29 23:44:41,978] [DEBUG] (common) - Validating CLI manifest file...\n", - "[2025-09-29 23:44:41,980] [INFO] (packager.parameters) - Application: /home/mqin/src/md-app-sdk/notebooks/tutorials/my_app\n", - "[2025-09-29 23:44:41,981] [INFO] (packager.parameters) - Detected application type: Python Module\n", - "[2025-09-29 23:44:41,981] [INFO] (packager) - Scanning for models in /home/mqin/src/md-app-sdk/notebooks/tutorials/models...\n", - "[2025-09-29 23:44:41,981] [DEBUG] (packager) - Model model=/home/mqin/src/md-app-sdk/notebooks/tutorials/models/model added.\n", - "[2025-09-29 23:44:41,981] [INFO] (packager) - Reading application configuration from /home/mqin/src/md-app-sdk/notebooks/tutorials/my_app/app.yaml...\n", - "[2025-09-29 23:44:41,985] [INFO] (packager) - Generating app.json...\n", - "[2025-09-29 23:44:41,985] [INFO] (packager) - Generating pkg.json...\n", - "[2025-09-29 23:44:41,989] [DEBUG] (common) - \n", - "=============== Begin app.json ===============\n", - "{\n", - " \"apiVersion\": \"1.0.0\",\n", - " \"command\": \"[\\\"python3\\\", \\\"/opt/holoscan/app\\\"]\",\n", - " \"environment\": {\n", - " \"HOLOSCAN_APPLICATION\": \"/opt/holoscan/app\",\n", - " \"HOLOSCAN_INPUT_PATH\": \"input/\",\n", - " \"HOLOSCAN_OUTPUT_PATH\": \"output/\",\n", - " \"HOLOSCAN_WORKDIR\": \"/var/holoscan\",\n", - " \"HOLOSCAN_MODEL_PATH\": \"/opt/holoscan/models\",\n", - " \"HOLOSCAN_CONFIG_PATH\": \"/var/holoscan/app.yaml\",\n", - " \"HOLOSCAN_APP_MANIFEST_PATH\": \"/etc/holoscan/app.json\",\n", - " \"HOLOSCAN_PKG_MANIFEST_PATH\": \"/etc/holoscan/pkg.json\",\n", - " \"HOLOSCAN_DOCS_PATH\": \"/opt/holoscan/docs\",\n", - " \"HOLOSCAN_LOGS_PATH\": \"/var/holoscan/logs\"\n", - " },\n", - " \"input\": {\n", - " \"path\": \"input/\",\n", - " \"formats\": null\n", - " },\n", - " \"liveness\": null,\n", - " \"output\": {\n", - " \"path\": \"output/\",\n", - " \"formats\": null\n", - " },\n", - " \"readiness\": null,\n", - " \"sdk\": \"monai-deploy\",\n", - " \"sdkVersion\": \"1.0.0\",\n", - " \"timeout\": 0,\n", - " \"version\": 1.0,\n", - " \"workingDirectory\": \"/var/holoscan\"\n", - "}\n", - "================ End app.json ================\n", - " \n", - "[2025-09-29 23:44:41,989] [DEBUG] (common) - \n", - "=============== Begin pkg.json ===============\n", - "{\n", - " \"apiVersion\": \"1.0.0\",\n", - " \"applicationRoot\": \"/opt/holoscan/app\",\n", - " \"modelRoot\": \"/opt/holoscan/models\",\n", - " \"models\": {\n", - " \"model\": \"/opt/holoscan/models/model\"\n", - " },\n", - " \"resources\": {\n", - " \"cpu\": 1,\n", - " \"gpu\": 1,\n", - " \"memory\": \"1Gi\",\n", - " \"gpuMemory\": \"6Gi\"\n", - " },\n", - " \"version\": 1.0,\n", - " \"platformConfig\": \"dgpu\"\n", - "}\n", - "================ End pkg.json ================\n", - " \n", - "[2025-09-29 23:44:42,011] [DEBUG] (packager.builder) - ================ Begin requirements.txt ================\n", - "[2025-09-29 23:44:42,011] [DEBUG] (packager.builder) - highdicom>=0.18.2\n", - "[2025-09-29 23:44:42,011] [DEBUG] (packager.builder) - monai>=1.0\n", - "[2025-09-29 23:44:42,011] [DEBUG] (packager.builder) - nibabel>=3.2.1\n", - "[2025-09-29 23:44:42,011] [DEBUG] (packager.builder) - numpy>=1.21.6\n", - "[2025-09-29 23:44:42,011] [DEBUG] (packager.builder) - pydicom>=2.3.0\n", - "[2025-09-29 23:44:42,011] [DEBUG] (packager.builder) - setuptools>=59.5.0 # for pkg_resources\n", - "[2025-09-29 23:44:42,011] [DEBUG] (packager.builder) - SimpleITK>=2.0.0\n", - "[2025-09-29 23:44:42,011] [DEBUG] (packager.builder) - torch>=1.12.0\n", - "[2025-09-29 23:44:42,011] [DEBUG] (packager.builder) - \n", - "[2025-09-29 23:44:42,011] [DEBUG] (packager.builder) - ================ End requirements.txt ==================\n", - "[2025-09-29 23:44:42,012] [DEBUG] (packager.builder) - \n", - "========== Begin Build Parameters ==========\n", - "{'add_hosts': None,\n", - " 'additional_lib_paths': '',\n", - " 'app_config_file_path': PosixPath('/home/mqin/src/md-app-sdk/notebooks/tutorials/my_app/app.yaml'),\n", - " 'app_dir': PosixPath('/opt/holoscan/app'),\n", - " 'app_json': '/etc/holoscan/app.json',\n", - " 'application': PosixPath('/home/mqin/src/md-app-sdk/notebooks/tutorials/my_app'),\n", - " 'application_directory': PosixPath('/home/mqin/src/md-app-sdk/notebooks/tutorials/my_app'),\n", - " 'application_type': 'PythonModule',\n", - " 'build_cache': PosixPath('/home/mqin/.holoscan_build_cache'),\n", - " 'cmake_args': '',\n", - " 'command': '[\"python3\", \"/opt/holoscan/app\"]',\n", - " 'command_filename': 'my_app',\n", - " 'config_file_path': PosixPath('/var/holoscan/app.yaml'),\n", - " 'docs_dir': PosixPath('/opt/holoscan/docs'),\n", - " 'full_input_path': PosixPath('/var/holoscan/input'),\n", - " 'full_output_path': PosixPath('/var/holoscan/output'),\n", - " 'gid': 1000,\n", - " 'holoscan_sdk_version': '3.5.0',\n", - " 'includes': [],\n", - " 'input_data': None,\n", - " 'input_dir': 'input/',\n", - " 'lib_dir': PosixPath('/opt/holoscan/lib'),\n", - " 'logs_dir': PosixPath('/var/holoscan/logs'),\n", - " 'models': {'model': PosixPath('/home/mqin/src/md-app-sdk/notebooks/tutorials/models/model')},\n", - " 'models_dir': PosixPath('/opt/holoscan/models'),\n", - " 'monai_deploy_app_sdk_version': '1.0.0',\n", - " 'no_cache': False,\n", - " 'output_dir': 'output/',\n", - " 'pip_packages': None,\n", - " 'pkg_json': '/etc/holoscan/pkg.json',\n", - " 'requirements_file_path': PosixPath('/home/mqin/src/md-app-sdk/notebooks/tutorials/my_app/requirements.txt'),\n", - " 'sdk': ,\n", - " 'sdk_type': 'monai-deploy',\n", - " 'tarball_output': None,\n", - " 'timeout': 0,\n", - " 'title': 'MONAI Deploy App Package - MONAI Bundle AI App',\n", - " 'uid': 1000,\n", - " 'username': 'holoscan',\n", - " 'version': 1.0,\n", - " 'working_dir': PosixPath('/var/holoscan')}\n", - "=========== End Build Parameters ===========\n", - "\n", - "[2025-09-29 23:44:42,012] [DEBUG] (packager.builder) - \n", - "========== Begin Platform Parameters ==========\n", - "{'base_image': 'nvcr.io/nvidia/cuda:12.8.1-runtime-ubuntu24.04',\n", - " 'build_image': None,\n", - " 'cuda_deb_arch': 'x86_64',\n", - " 'custom_base_image': False,\n", - " 'custom_holoscan_sdk': False,\n", - " 'custom_monai_deploy_sdk': False,\n", - " 'gpu_type': 'dgpu',\n", - " 'holoscan_deb_arch': 'amd64',\n", - " 'holoscan_sdk_file': '3.5.0',\n", - " 'holoscan_sdk_filename': '3.5.0',\n", - " 'monai_deploy_sdk_file': None,\n", - " 'monai_deploy_sdk_filename': None,\n", - " 'tag': 'my_app:1.0',\n", - " 'target_arch': 'x86_64'}\n", - "=========== End Platform Parameters ===========\n", - "\n", - "[2025-09-29 23:44:42,029] [DEBUG] (packager.builder) - \n", - "========== Begin Dockerfile ==========\n", - "\n", - "ARG GPU_TYPE=dgpu\n", - "\n", - "\n", - "\n", - "\n", - "FROM nvcr.io/nvidia/cuda:12.8.1-runtime-ubuntu24.04 AS base\n", - "\n", - "RUN apt-get update \\\n", - " && apt-get install -y --no-install-recommends --no-install-suggests \\\n", - " curl \\\n", - " jq \\\n", - " && rm -rf /var/lib/apt/lists/*\n", - "\n", - "\n", - "\n", - "\n", - "# FROM base AS mofed-installer\n", - "# ARG MOFED_VERSION=23.10-2.1.3.1\n", - "\n", - "# # In a container, we only need to install the user space libraries, though the drivers are still\n", - "# # needed on the host.\n", - "# # Note: MOFED's installation is not easily portable, so we can't copy the output of this stage\n", - "# # to our final stage, but must inherit from it. For that reason, we keep track of the build/install\n", - "# # only dependencies in the `MOFED_DEPS` variable (parsing the output of `--check-deps-only`) to\n", - "# # remove them in that same layer, to ensure they are not propagated in the final image.\n", - "# WORKDIR /opt/nvidia/mofed\n", - "# ARG MOFED_INSTALL_FLAGS=\"--dpdk --with-mft --user-space-only --force --without-fw-update\"\n", - "# RUN UBUNTU_VERSION=$(cat /etc/lsb-release | grep DISTRIB_RELEASE | cut -d= -f2) \\\n", - "# && OFED_PACKAGE=\"MLNX_OFED_LINUX-${MOFED_VERSION}-ubuntu${UBUNTU_VERSION}-$(uname -m)\" \\\n", - "# && curl -S -# -o ${OFED_PACKAGE}.tgz -L \\\n", - "# https://www.mellanox.com/downloads/ofed/MLNX_OFED-${MOFED_VERSION}/${OFED_PACKAGE}.tgz \\\n", - "# && tar xf ${OFED_PACKAGE}.tgz \\\n", - "# && MOFED_INSTALLER=$(find . -name mlnxofedinstall -type f -executable -print) \\\n", - "# && MOFED_DEPS=$(${MOFED_INSTALLER} ${MOFED_INSTALL_FLAGS} --check-deps-only 2>/dev/null | tail -n1 | cut -d' ' -f3-) \\\n", - "# && apt-get update \\\n", - "# && apt-get install --no-install-recommends -y ${MOFED_DEPS} \\\n", - "# && ${MOFED_INSTALLER} ${MOFED_INSTALL_FLAGS} \\\n", - "# && rm -r * \\\n", - "# && apt-get remove -y ${MOFED_DEPS} && apt-get autoremove -y \\\n", - "# && rm -rf /var/lib/apt/lists/*\n", - "\n", - "FROM base AS release\n", - "ENV DEBIAN_FRONTEND=noninteractive\n", - "ENV TERM=xterm-256color\n", - "\n", - "ARG GPU_TYPE\n", - "ARG UNAME\n", - "ARG UID\n", - "ARG GID\n", - "\n", - "RUN mkdir -p /etc/holoscan/ \\\n", - " && mkdir -p /opt/holoscan/ \\\n", - " && mkdir -p /var/holoscan \\\n", - " && mkdir -p /opt/holoscan/app \\\n", - " && mkdir -p /var/holoscan/input \\\n", - " && mkdir -p /var/holoscan/output\n", - "\n", - "LABEL base=\"nvcr.io/nvidia/cuda:12.8.1-runtime-ubuntu24.04\"\n", - "LABEL tag=\"my_app:1.0\"\n", - "LABEL org.opencontainers.image.title=\"MONAI Deploy App Package - MONAI Bundle AI App\"\n", - "LABEL org.opencontainers.image.version=\"1.0\"\n", - "LABEL org.nvidia.holoscan=\"3.5.0\"\n", - "\n", - "LABEL org.monai.deploy.app-sdk=\"1.0.0\"\n", - "\n", - "ENV HOLOSCAN_INPUT_PATH=/var/holoscan/input\n", - "ENV HOLOSCAN_OUTPUT_PATH=/var/holoscan/output\n", - "ENV HOLOSCAN_WORKDIR=/var/holoscan\n", - "ENV HOLOSCAN_APPLICATION=/opt/holoscan/app\n", - "ENV HOLOSCAN_TIMEOUT=0\n", - "ENV HOLOSCAN_MODEL_PATH=/opt/holoscan/models\n", - "ENV HOLOSCAN_DOCS_PATH=/opt/holoscan/docs\n", - "ENV HOLOSCAN_CONFIG_PATH=/var/holoscan/app.yaml\n", - "ENV HOLOSCAN_APP_MANIFEST_PATH=/etc/holoscan/app.json\n", - "ENV HOLOSCAN_PKG_MANIFEST_PATH=/etc/holoscan/pkg.json\n", - "ENV HOLOSCAN_LOGS_PATH=/var/holoscan/logs\n", - "ENV HOLOSCAN_VERSION=3.5.0\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "# If torch is installed, we can skip installing Python\n", - "ENV PYTHON_VERSION=3.12.3-*\n", - "ENV PYTHON_PIP_VERSION=24.0+dfsg-*\n", - "\n", - "RUN apt update \\\n", - " && apt-get install -y --no-install-recommends --no-install-suggests \\\n", - " python3-minimal=${PYTHON_VERSION} \\\n", - " libpython3-stdlib=${PYTHON_VERSION} \\\n", - " python3=${PYTHON_VERSION} \\\n", - " python3-venv=${PYTHON_VERSION} \\\n", - " python3-pip=${PYTHON_PIP_VERSION} \\\n", - " && rm -rf /var/lib/apt/lists/*\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "\n", - "RUN if id \"ubuntu\" >/dev/null 2>&1; then touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu; fi\n", - "RUN groupadd -f -g $GID $UNAME\n", - "RUN useradd -rm -d /home/$UNAME -s /bin/bash -g $GID -G sudo -u $UID $UNAME\n", - "RUN chown -R holoscan /var/holoscan && \\\n", - " chown -R holoscan /var/holoscan/input && \\\n", - " chown -R holoscan /var/holoscan/output\n", - "\n", - "# Set the working directory\n", - "WORKDIR /var/holoscan\n", - "\n", - "# Copy HAP/MAP tool script\n", - "COPY ./tools /var/holoscan/tools\n", - "RUN chmod +x /var/holoscan/tools\n", - "\n", - "# Remove EXTERNALLY-MANAGED directory\n", - "RUN rm -rf /usr/lib/python3.12/EXTERNALLY-MANAGED\n", - "\n", - "# Set the working directory\n", - "WORKDIR /var/holoscan\n", - "\n", - "USER $UNAME\n", - "\n", - "ENV PATH=/home/${UNAME}/.local/bin:/opt/nvidia/holoscan/bin:$PATH\n", - "ENV LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/${UNAME}/.local/lib/python3.10/site-packages/holoscan/lib\n", - "\n", - "COPY ./pip/requirements.txt /tmp/requirements.txt\n", - "\n", - "RUN pip install --upgrade pip\n", - "RUN pip install --no-cache-dir --user -r /tmp/requirements.txt\n", - "\n", - "\n", - "# Install MONAI Deploy App SDK\n", - "\n", - "# Install MONAI Deploy from PyPI org\n", - "RUN pip install monai-deploy-app-sdk==1.0.0\n", - "\n", - "\n", - "COPY ./models /opt/holoscan/models\n", - "\n", - "\n", - "COPY ./map/app.json /etc/holoscan/app.json\n", - "COPY ./app.config /var/holoscan/app.yaml\n", - "COPY ./map/pkg.json /etc/holoscan/pkg.json\n", - "\n", - "COPY ./app /opt/holoscan/app\n", - "\n", - "\n", - "\n", - "ENTRYPOINT [\"/var/holoscan/tools\"]\n", - "=========== End Dockerfile ===========\n", - "\n", - "[2025-09-29 23:44:42,728] [INFO] (common) - Using existing Docker BuildKit builder `holoscan_app_builder`\n", - "[2025-09-29 23:44:42,729] [DEBUG] (packager.builder) - Building Holoscan Application Package: tag=my_app-x64-workstation-dgpu-linux-amd64:1.0\n", - "[2025-09-29 23:44:42,729] [INFO] (packager.builder) - \n", - "===============================================================================\n", - "Building image for: x64-workstation\n", - " Architecture: linux/amd64\n", - " Base Image: nvcr.io/nvidia/cuda:12.8.1-runtime-ubuntu24.04\n", - " Build Image: N/A\n", - " Cache: Enabled\n", - " Configuration: dgpu\n", - " Holoscan SDK Package: 3.5.0\n", - " MONAI Deploy App SDK Package: N/A\n", - " gRPC Health Probe: N/A\n", - " SDK Version: 3.5.0\n", - " SDK: monai-deploy\n", - " Tag: my_app-x64-workstation-dgpu-linux-amd64:1.0\n", - " Included features/dependencies: N/A\n", - " \n", - "#0 building with \"holoscan_app_builder\" instance using docker-container driver\n", - "\n", - "#1 [internal] load build definition from Dockerfile\n", - "#1 transferring dockerfile: 4.76kB done\n", - "#1 DONE 0.1s\n", - "\n", - "#2 [internal] load metadata for nvcr.io/nvidia/cuda:12.8.1-runtime-ubuntu24.04\n", - "#2 ...\n", - "\n", - "#3 [auth] nvidia/cuda:pull token for nvcr.io\n", - "#3 DONE 0.0s\n", - "\n", - "#2 [internal] load metadata for nvcr.io/nvidia/cuda:12.8.1-runtime-ubuntu24.04\n", - "#2 DONE 0.5s\n", - "\n", - "#4 [internal] load .dockerignore\n", - "#4 transferring context: 1.80kB done\n", - "#4 DONE 0.1s\n", - "\n", - "#5 importing cache manifest from nvcr.io/nvidia/cuda:12.8.1-runtime-ubuntu24.04\n", - "#5 ...\n", - "\n", - "#6 [internal] load build context\n", - "#6 DONE 0.0s\n", - "\n", - "#7 importing cache manifest from local:1788272027054474049\n", - "#7 inferred cache manifest type: application/vnd.oci.image.index.v1+json done\n", - "#7 DONE 0.0s\n", - "\n", - "#5 importing cache manifest from nvcr.io/nvidia/cuda:12.8.1-runtime-ubuntu24.04\n", - "#5 inferred cache manifest type: application/vnd.docker.distribution.manifest.list.v2+json done\n", - "#5 DONE 0.4s\n", - "\n", - "#8 [base 1/2] FROM nvcr.io/nvidia/cuda:12.8.1-runtime-ubuntu24.04@sha256:ebef3c171eeef0298e4eb2e4be843105edf3b8b0ac45e0b43acee358e8046867\n", - "#8 resolve nvcr.io/nvidia/cuda:12.8.1-runtime-ubuntu24.04@sha256:ebef3c171eeef0298e4eb2e4be843105edf3b8b0ac45e0b43acee358e8046867 0.1s done\n", - "#8 DONE 0.1s\n", - "\n", - "#6 [internal] load build context\n", - "#6 transferring context: 19.43MB 0.1s done\n", - "#6 DONE 0.2s\n", - "\n", - "#9 [release 1/20] RUN mkdir -p /etc/holoscan/ && mkdir -p /opt/holoscan/ && mkdir -p /var/holoscan && mkdir -p /opt/holoscan/app && mkdir -p /var/holoscan/input && mkdir -p /var/holoscan/output\n", - "#9 CACHED\n", - "\n", - "#10 [release 7/20] WORKDIR /var/holoscan\n", - "#10 CACHED\n", - "\n", - "#11 [release 10/20] RUN rm -rf /usr/lib/python3.12/EXTERNALLY-MANAGED\n", - "#11 CACHED\n", - "\n", - "#12 [release 11/20] WORKDIR /var/holoscan\n", - "#12 CACHED\n", - "\n", - "#13 [release 6/20] RUN chown -R holoscan /var/holoscan && chown -R holoscan /var/holoscan/input && chown -R holoscan /var/holoscan/output\n", - "#13 CACHED\n", - "\n", - "#14 [release 5/20] RUN useradd -rm -d /home/holoscan -s /bin/bash -g 1000 -G sudo -u 1000 holoscan\n", - "#14 CACHED\n", - "\n", - "#15 [release 2/20] RUN apt update && apt-get install -y --no-install-recommends --no-install-suggests python3-minimal=3.12.3-* libpython3-stdlib=3.12.3-* python3=3.12.3-* python3-venv=3.12.3-* python3-pip=24.0+dfsg-* && rm -rf /var/lib/apt/lists/*\n", - "#15 CACHED\n", - "\n", - "#16 [release 9/20] RUN chmod +x /var/holoscan/tools\n", - "#16 CACHED\n", - "\n", - "#17 [release 3/20] RUN if id \"ubuntu\" >/dev/null 2>&1; then touch /var/mail/ubuntu && chown ubuntu /var/mail/ubuntu && userdel -r ubuntu; fi\n", - "#17 CACHED\n", - "\n", - "#18 [release 8/20] COPY ./tools /var/holoscan/tools\n", - "#18 CACHED\n", - "\n", - "#19 [base 2/2] RUN apt-get update && apt-get install -y --no-install-recommends --no-install-suggests curl jq && rm -rf /var/lib/apt/lists/*\n", - "#19 CACHED\n", - "\n", - "#20 [release 4/20] RUN groupadd -f -g 1000 holoscan\n", - "#20 CACHED\n", - "\n", - "#21 [release 12/20] COPY ./pip/requirements.txt /tmp/requirements.txt\n", - "#21 CACHED\n", - "\n", - "#22 [release 13/20] RUN pip install --upgrade pip\n", - "#22 0.820 Defaulting to user installation because normal site-packages is not writeable\n", - "#22 0.889 Requirement already satisfied: pip in /usr/lib/python3/dist-packages (24.0)\n", - "#22 1.093 Collecting pip\n", - "#22 1.158 Downloading pip-25.2-py3-none-any.whl.metadata (4.7 kB)\n", - "#22 1.192 Downloading pip-25.2-py3-none-any.whl (1.8 MB)\n", - "#22 1.273 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.8/1.8 MB 23.4 MB/s eta 0:00:00\n", - "#22 1.306 Installing collected packages: pip\n", - "#22 2.113 Successfully installed pip-25.2\n", - "#22 DONE 3.1s\n", - "\n", - "#23 [release 14/20] RUN pip install --no-cache-dir --user -r /tmp/requirements.txt\n", - "#23 0.669 Collecting highdicom>=0.18.2 (from -r /tmp/requirements.txt (line 1))\n", - "#23 0.707 Downloading highdicom-0.26.1-py3-none-any.whl.metadata (5.8 kB)\n", - "#23 0.741 Collecting monai>=1.0 (from -r /tmp/requirements.txt (line 2))\n", - "#23 0.747 Downloading monai-1.5.1-py3-none-any.whl.metadata (13 kB)\n", - "#23 0.789 Collecting nibabel>=3.2.1 (from -r /tmp/requirements.txt (line 3))\n", - "#23 0.793 Downloading nibabel-5.3.2-py3-none-any.whl.metadata (9.1 kB)\n", - "#23 0.977 Collecting numpy>=1.21.6 (from -r /tmp/requirements.txt (line 4))\n", - "#23 0.980 Downloading numpy-2.3.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (62 kB)\n", - "#23 1.014 Collecting pydicom>=2.3.0 (from -r /tmp/requirements.txt (line 5))\n", - "#23 1.019 Downloading pydicom-3.0.1-py3-none-any.whl.metadata (9.4 kB)\n", - "#23 1.026 Requirement already satisfied: setuptools>=59.5.0 in /usr/lib/python3/dist-packages (from -r /tmp/requirements.txt (line 6)) (68.1.2)\n", - "#23 1.055 Collecting SimpleITK>=2.0.0 (from -r /tmp/requirements.txt (line 7))\n", - "#23 1.062 Downloading simpleitk-2.5.2-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (7.2 kB)\n", - "#23 1.107 Collecting torch>=1.12.0 (from -r /tmp/requirements.txt (line 8))\n", - "#23 1.110 Downloading torch-2.8.0-cp312-cp312-manylinux_2_28_x86_64.whl.metadata (30 kB)\n", - "#23 1.257 Collecting pillow>=8.3 (from highdicom>=0.18.2->-r /tmp/requirements.txt (line 1))\n", - "#23 1.260 Downloading pillow-11.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (9.0 kB)\n", - "#23 1.361 Collecting pyjpegls>=1.0.0 (from highdicom>=0.18.2->-r /tmp/requirements.txt (line 1))\n", - "#23 1.366 Downloading pyjpegls-1.5.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.metadata (4.5 kB)\n", - "#23 1.391 Collecting typing-extensions>=4.0.0 (from highdicom>=0.18.2->-r /tmp/requirements.txt (line 1))\n", - "#23 1.395 Downloading typing_extensions-4.15.0-py3-none-any.whl.metadata (3.3 kB)\n", - "#23 1.433 Collecting packaging>=20 (from nibabel>=3.2.1->-r /tmp/requirements.txt (line 3))\n", - "#23 1.436 Downloading packaging-25.0-py3-none-any.whl.metadata (3.3 kB)\n", - "#23 1.456 Collecting filelock (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.460 Downloading filelock-3.19.1-py3-none-any.whl.metadata (2.1 kB)\n", - "#23 1.477 Collecting sympy>=1.13.3 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.480 Downloading sympy-1.14.0-py3-none-any.whl.metadata (12 kB)\n", - "#23 1.496 Collecting networkx (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.499 Downloading networkx-3.5-py3-none-any.whl.metadata (6.3 kB)\n", - "#23 1.513 Collecting jinja2 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.517 Downloading jinja2-3.1.6-py3-none-any.whl.metadata (2.9 kB)\n", - "#23 1.533 Collecting fsspec (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.536 Downloading fsspec-2025.9.0-py3-none-any.whl.metadata (10 kB)\n", - "#23 1.564 Collecting nvidia-cuda-nvrtc-cu12==12.8.93 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.567 Downloading nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl.metadata (1.7 kB)\n", - "#23 1.576 Collecting nvidia-cuda-runtime-cu12==12.8.90 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.579 Downloading nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (1.7 kB)\n", - "#23 1.590 Collecting nvidia-cuda-cupti-cu12==12.8.90 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.593 Downloading nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (1.7 kB)\n", - "#23 1.605 Collecting nvidia-cudnn-cu12==9.10.2.21 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.609 Downloading nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_x86_64.whl.metadata (1.8 kB)\n", - "#23 1.619 Collecting nvidia-cublas-cu12==12.8.4.1 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.622 Downloading nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_x86_64.whl.metadata (1.7 kB)\n", - "#23 1.632 Collecting nvidia-cufft-cu12==11.3.3.83 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.635 Downloading nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (1.7 kB)\n", - "#23 1.646 Collecting nvidia-curand-cu12==10.3.9.90 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.649 Downloading nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_x86_64.whl.metadata (1.7 kB)\n", - "#23 1.659 Collecting nvidia-cusolver-cu12==11.7.3.90 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.663 Downloading nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_x86_64.whl.metadata (1.8 kB)\n", - "#23 1.672 Collecting nvidia-cusparse-cu12==12.5.8.93 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.675 Downloading nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (1.8 kB)\n", - "#23 1.682 Collecting nvidia-cusparselt-cu12==0.7.1 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.686 Downloading nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_x86_64.whl.metadata (7.0 kB)\n", - "#23 1.694 Collecting nvidia-nccl-cu12==2.27.3 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.699 Downloading nvidia_nccl_cu12-2.27.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (2.0 kB)\n", - "#23 1.711 Collecting nvidia-nvtx-cu12==12.8.90 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.714 Downloading nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (1.8 kB)\n", - "#23 1.725 Collecting nvidia-nvjitlink-cu12==12.8.93 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.727 Downloading nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl.metadata (1.7 kB)\n", - "#23 1.734 Collecting nvidia-cufile-cu12==1.13.1.3 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.738 Downloading nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl.metadata (1.7 kB)\n", - "#23 1.747 Collecting triton==3.4.0 (from torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.750 Downloading triton-3.4.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.metadata (1.7 kB)\n", - "#23 1.780 Collecting mpmath<1.4,>=1.1.0 (from sympy>=1.13.3->torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.784 Downloading mpmath-1.3.0-py3-none-any.whl.metadata (8.6 kB)\n", - "#23 1.836 Collecting MarkupSafe>=2.0 (from jinja2->torch>=1.12.0->-r /tmp/requirements.txt (line 8))\n", - "#23 1.839 Downloading markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl.metadata (2.7 kB)\n", - "#23 1.848 Downloading highdicom-0.26.1-py3-none-any.whl (1.1 MB)\n", - "#23 1.861 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.1/1.1 MB 120.6 MB/s 0:00:00\n", - "#23 1.866 Downloading monai-1.5.1-py3-none-any.whl (2.7 MB)\n", - "#23 1.904 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 84.9 MB/s 0:00:00\n", - "#23 1.910 Downloading numpy-2.3.3-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (16.6 MB)\n", - "#23 2.063 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 16.6/16.6 MB 111.2 MB/s 0:00:00\n", - "#23 2.069 Downloading nibabel-5.3.2-py3-none-any.whl (3.3 MB)\n", - "#23 2.100 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.3/3.3 MB 119.8 MB/s 0:00:00\n", - "#23 2.106 Downloading pydicom-3.0.1-py3-none-any.whl (2.4 MB)\n", - "#23 2.129 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.4/2.4 MB 117.9 MB/s 0:00:00\n", - "#23 2.134 Downloading simpleitk-2.5.2-cp311-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (52.6 MB)\n", - "#23 2.801 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 52.6/52.6 MB 79.2 MB/s 0:00:00\n", - "#23 2.808 Downloading torch-2.8.0-cp312-cp312-manylinux_2_28_x86_64.whl (887.9 MB)\n", - "#23 14.04 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 887.9/887.9 MB 72.2 MB/s 0:00:11\n", - "#23 14.04 Downloading nvidia_cublas_cu12-12.8.4.1-py3-none-manylinux_2_27_x86_64.whl (594.3 MB)\n", - "#23 19.72 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 594.3/594.3 MB 112.0 MB/s 0:00:05\n", - "#23 19.72 Downloading nvidia_cuda_cupti_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (10.2 MB)\n", - "#23 19.84 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.2/10.2 MB 88.5 MB/s 0:00:00\n", - "#23 19.85 Downloading nvidia_cuda_nvrtc_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl (88.0 MB)\n", - "#23 20.65 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 88.0/88.0 MB 110.7 MB/s 0:00:00\n", - "#23 20.65 Downloading nvidia_cuda_runtime_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (954 kB)\n", - "#23 20.67 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 954.8/954.8 kB 115.9 MB/s 0:00:00\n", - "#23 20.67 Downloading nvidia_cudnn_cu12-9.10.2.21-py3-none-manylinux_2_27_x86_64.whl (706.8 MB)\n", - "#23 28.45 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 706.8/706.8 MB 93.5 MB/s 0:00:07\n", - "#23 28.46 Downloading nvidia_cufft_cu12-11.3.3.83-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (193.1 MB)\n", - "#23 30.82 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 193.1/193.1 MB 82.1 MB/s 0:00:02\n", - "#23 30.82 Downloading nvidia_cufile_cu12-1.13.1.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (1.2 MB)\n", - "#23 30.84 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1.2/1.2 MB 119.4 MB/s 0:00:00\n", - "#23 30.85 Downloading nvidia_curand_cu12-10.3.9.90-py3-none-manylinux_2_27_x86_64.whl (63.6 MB)\n", - "#23 31.50 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 63.6/63.6 MB 99.8 MB/s 0:00:00\n", - "#23 31.50 Downloading nvidia_cusolver_cu12-11.7.3.90-py3-none-manylinux_2_27_x86_64.whl (267.5 MB)\n", - "#23 34.93 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 267.5/267.5 MB 77.6 MB/s 0:00:03\n", - "#23 34.93 Downloading nvidia_cusparse_cu12-12.5.8.93-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (288.2 MB)\n", - "#23 38.45 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 288.2/288.2 MB 79.5 MB/s 0:00:03\n", - "#23 38.46 Downloading nvidia_cusparselt_cu12-0.7.1-py3-none-manylinux2014_x86_64.whl (287.2 MB)\n", - "#23 41.73 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 287.2/287.2 MB 88.3 MB/s 0:00:03\n", - "#23 41.73 Downloading nvidia_nccl_cu12-2.27.3-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (322.4 MB)\n", - "#23 45.81 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 322.4/322.4 MB 78.4 MB/s 0:00:04\n", - "#23 45.82 Downloading nvidia_nvjitlink_cu12-12.8.93-py3-none-manylinux2010_x86_64.manylinux_2_12_x86_64.whl (39.3 MB)\n", - "#23 46.21 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 39.3/39.3 MB 104.3 MB/s 0:00:00\n", - "#23 46.22 Downloading nvidia_nvtx_cu12-12.8.90-py3-none-manylinux2014_x86_64.manylinux_2_17_x86_64.whl (89 kB)\n", - "#23 46.23 Downloading triton-3.4.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (155.6 MB)\n", - "#23 48.05 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.6/155.6 MB 85.2 MB/s 0:00:01\n", - "#23 48.06 Downloading packaging-25.0-py3-none-any.whl (66 kB)\n", - "#23 48.07 Downloading pillow-11.3.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (6.6 MB)\n", - "#23 48.14 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.6/6.6 MB 101.2 MB/s 0:00:00\n", - "#23 48.23 Downloading pyjpegls-1.5.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB)\n", - "#23 48.33 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 26.4 MB/s 0:00:00\n", - "#23 48.33 Downloading sympy-1.14.0-py3-none-any.whl (6.3 MB)\n", - "#23 48.47 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.3/6.3 MB 44.4 MB/s 0:00:00\n", - "#23 48.48 Downloading mpmath-1.3.0-py3-none-any.whl (536 kB)\n", - "#23 48.49 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 536.2/536.2 kB 139.8 MB/s 0:00:00\n", - "#23 48.49 Downloading typing_extensions-4.15.0-py3-none-any.whl (44 kB)\n", - "#23 48.49 Downloading filelock-3.19.1-py3-none-any.whl (15 kB)\n", - "#23 48.50 Downloading fsspec-2025.9.0-py3-none-any.whl (199 kB)\n", - "#23 48.50 Downloading jinja2-3.1.6-py3-none-any.whl (134 kB)\n", - "#23 48.51 Downloading markupsafe-3.0.3-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl (22 kB)\n", - "#23 48.51 Downloading networkx-3.5-py3-none-any.whl (2.0 MB)\n", - "#23 48.53 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.0/2.0 MB 116.8 MB/s 0:00:00\n", - "#23 57.28 Installing collected packages: SimpleITK, nvidia-cusparselt-cu12, mpmath, typing-extensions, triton, sympy, pydicom, pillow, packaging, nvidia-nvtx-cu12, nvidia-nvjitlink-cu12, nvidia-nccl-cu12, nvidia-curand-cu12, nvidia-cufile-cu12, nvidia-cuda-runtime-cu12, nvidia-cuda-nvrtc-cu12, nvidia-cuda-cupti-cu12, nvidia-cublas-cu12, numpy, networkx, MarkupSafe, fsspec, filelock, pyjpegls, nvidia-cusparse-cu12, nvidia-cufft-cu12, nvidia-cudnn-cu12, nibabel, jinja2, nvidia-cusolver-cu12, highdicom, torch, monai\n", - "#23 121.2 \n", - "#23 121.2 Successfully installed MarkupSafe-3.0.3 SimpleITK-2.5.2 filelock-3.19.1 fsspec-2025.9.0 highdicom-0.26.1 jinja2-3.1.6 monai-1.5.1 mpmath-1.3.0 networkx-3.5 nibabel-5.3.2 numpy-2.3.3 nvidia-cublas-cu12-12.8.4.1 nvidia-cuda-cupti-cu12-12.8.90 nvidia-cuda-nvrtc-cu12-12.8.93 nvidia-cuda-runtime-cu12-12.8.90 nvidia-cudnn-cu12-9.10.2.21 nvidia-cufft-cu12-11.3.3.83 nvidia-cufile-cu12-1.13.1.3 nvidia-curand-cu12-10.3.9.90 nvidia-cusolver-cu12-11.7.3.90 nvidia-cusparse-cu12-12.5.8.93 nvidia-cusparselt-cu12-0.7.1 nvidia-nccl-cu12-2.27.3 nvidia-nvjitlink-cu12-12.8.93 nvidia-nvtx-cu12-12.8.90 packaging-25.0 pillow-11.3.0 pydicom-3.0.1 pyjpegls-1.5.1 sympy-1.14.0 torch-2.8.0 triton-3.4.0 typing-extensions-4.15.0\n", - "#23 DONE 122.6s\n", - "\n", - "#24 [release 15/20] RUN pip install monai-deploy-app-sdk==1.0.0\n", - "#24 0.781 Defaulting to user installation because normal site-packages is not writeable\n", - "#24 1.033 Collecting monai-deploy-app-sdk==1.0.0\n", - "#24 1.150 Downloading monai_deploy_app_sdk-1.0.0-py3-none-any.whl.metadata (7.6 kB)\n", - "#24 1.175 Requirement already satisfied: numpy>=1.21.6 in /home/holoscan/.local/lib/python3.12/site-packages (from monai-deploy-app-sdk==1.0.0) (2.3.3)\n", - "#24 1.297 INFO: pip is looking at multiple versions of monai-deploy-app-sdk to determine which version is compatible with other requirements. This could take a while.\n", - "#24 1.298 ERROR: Could not find a version that satisfies the requirement holoscan~=1.0 (from monai-deploy-app-sdk) (from versions: 0.0.0.post1, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 3.0.0, 3.1.0, 3.2.0, 3.3.0, 3.4.0, 3.5.0, 3.6.0)\n", - "#24 1.447 ERROR: No matching distribution found for holoscan~=1.0\n", - "#24 ERROR: process \"/bin/sh -c pip install monai-deploy-app-sdk==1.0.0\" did not complete successfully: exit code: 1\n", - "------\n", - " > [release 15/20] RUN pip install monai-deploy-app-sdk==1.0.0:\n", - "0.781 Defaulting to user installation because normal site-packages is not writeable\n", - "1.033 Collecting monai-deploy-app-sdk==1.0.0\n", - "1.150 Downloading monai_deploy_app_sdk-1.0.0-py3-none-any.whl.metadata (7.6 kB)\n", - "1.175 Requirement already satisfied: numpy>=1.21.6 in /home/holoscan/.local/lib/python3.12/site-packages (from monai-deploy-app-sdk==1.0.0) (2.3.3)\n", - "1.297 INFO: pip is looking at multiple versions of monai-deploy-app-sdk to determine which version is compatible with other requirements. This could take a while.\n", - "1.298 ERROR: Could not find a version that satisfies the requirement holoscan~=1.0 (from monai-deploy-app-sdk) (from versions: 0.0.0.post1, 2.6.0, 2.7.0, 2.8.0, 2.9.0, 3.0.0, 3.1.0, 3.2.0, 3.3.0, 3.4.0, 3.5.0, 3.6.0)\n", - "1.447 ERROR: No matching distribution found for holoscan~=1.0\n", - "------\n", - "Dockerfile:140\n", - "--------------------\n", - " 138 | \n", - " 139 | # Install MONAI Deploy from PyPI org\n", - " 140 | >>> RUN pip install monai-deploy-app-sdk==1.0.0\n", - " 141 | \n", - " 142 | \n", - "--------------------\n", - "ERROR: failed to build: failed to solve: process \"/bin/sh -c pip install monai-deploy-app-sdk==1.0.0\" did not complete successfully: exit code: 1\n", - "The command executed was `/usr/bin/docker buildx build --progress plain --build-arg UID=1000 --build-arg GID=1000 --build-arg UNAME=holoscan --build-arg GPU_TYPE=dgpu --builder holoscan_app_builder --pull --load --file /tmp/holoscan_tmptsbybsaz/Dockerfile --cache-from type=local,src=/home/mqin/.holoscan_build_cache --cache-from type=registry,ref=nvcr.io/nvidia/cuda:12.8.1-runtime-ubuntu24.04 --cache-to type=local,dest=/home/mqin/.holoscan_build_cache --platform linux/amd64 --tag my_app-x64-workstation-dgpu-linux-amd64:1.0 /tmp/holoscan_tmptsbybsaz`.\n", - "It returned with code 1\n", - "The content of stdout is ''\n", - "The content of stderr can be found above the stacktrace (it wasn't captured).\n", - "[2025-09-29 23:46:52,256] [INFO] (packager) - Build Summary:\n", - "\n", - "Platform: x64-workstation/dgpu\n", - " Status: Failure\n", - " Error: Error building image: see Docker output for additional details.\n", - " \n" + "usage: monai-deploy package [-h] [-l {DEBUG,INFO,WARN,ERROR,CRITICAL}]\n", + " [--add ADDITIONAL_LIBS] --config CONFIG\n", + " [--docs DOCS] [--models MODELS] --platform\n", + " PLATFORM [--timeout TIMEOUT] [--version VERSION]\n", + " [--add-host ADD_HOSTS] [--base-image BASE_IMAGE]\n", + " [--build-image BUILD_IMAGE]\n", + " [--build-cache BUILD_CACHE]\n", + " [--cmake-args CMAKE_ARGS]\n", + " [--holoscan-sdk-file HOLOSCAN_SDK_FILE]\n", + " [--includes [{debug,holoviz,torch,onnx} ...]]\n", + " [--input-data INPUT_DATA]\n", + " [--monai-deploy-sdk-file MONAI_DEPLOY_SDK_FILE]\n", + " [--no-cache] [--sdk SDK]\n", + " [--sdk-version SDK_VERSION] [--source SOURCE]\n", + " [--output OUTPUT] --tag TAG [--username USERNAME]\n", + " [--uid UID] [--gid GID]\n", + " application\n", + "monai-deploy package: error: argument -l/--log-level: invalid choice: 'MONAI-DEPLOY-SDK-FILE' (choose from 'DEBUG', 'INFO', 'WARN', 'ERROR', 'CRITICAL')\n" ] } ], @@ -2113,7 +1559,7 @@ "name": "stdout", "output_type": "stream", "text": [ - "my_app-x64-workstation-dgpu-linux-amd64 1.0 497a1c32b76e 3 weeks ago 10.3GB\n" + "my_app-x64-workstation-dgpu-linux-amd64 1.0 cfc03ea74fd7 3 hours ago 11.5GB\n" ] } ], @@ -2141,23 +1587,23 @@ "text": [ "output\n", "dcm\n", - "[2025-09-29 23:46:53,770] [INFO] (runner) - Checking dependencies...\n", - "[2025-09-29 23:46:53,770] [INFO] (runner) - --> Verifying if \"docker\" is installed...\n", + "[2025-09-30 18:30:02,980] [INFO] (runner) - Checking dependencies...\n", + "[2025-09-30 18:30:02,980] [INFO] (runner) - --> Verifying if \"docker\" is installed...\n", "\n", - "[2025-09-29 23:46:53,771] [INFO] (runner) - --> Verifying if \"docker-buildx\" is installed...\n", + "[2025-09-30 18:30:02,980] [INFO] (runner) - --> Verifying if \"docker-buildx\" is installed...\n", "\n", - "[2025-09-29 23:46:53,771] [INFO] (runner) - --> Verifying if \"my_app-x64-workstation-dgpu-linux-amd64:1.0\" is available...\n", + "[2025-09-30 18:30:02,980] [INFO] (runner) - --> Verifying if \"my_app-x64-workstation-dgpu-linux-amd64:1.0\" is available...\n", "\n", - "[2025-09-29 23:46:53,899] [INFO] (runner) - Reading HAP/MAP manifest...\n", - "Successfully copied 2.56kB to /tmp/tmp_tzi5rwl/app.json\n", - "Successfully copied 2.05kB to /tmp/tmp_tzi5rwl/pkg.json\n", - "c6b784bef1f56095b133293927d341b883a932b2d894367ea2b0e065d1221f4b\n", - "[2025-09-29 23:46:54,265] [INFO] (runner) - --> Verifying if \"nvidia-ctk\" is installed...\n", + "[2025-09-30 18:30:03,070] [INFO] (runner) - Reading HAP/MAP manifest...\n", + "Successfully copied 2.56kB to /tmp/tmpjksfr5pj/app.json\n", + "Successfully copied 2.05kB to /tmp/tmpjksfr5pj/pkg.json\n", + "3cfb3be292dc85cd2f35ccae1b853a86561ca60f369886ff6fdad88c5d6366e6\n", + "[2025-09-30 18:30:03,608] [INFO] (runner) - --> Verifying if \"nvidia-ctk\" is installed...\n", "\n", - "[2025-09-29 23:46:54,265] [INFO] (runner) - --> Verifying \"nvidia-ctk\" version...\n", + "[2025-09-30 18:30:03,608] [INFO] (runner) - --> Verifying \"nvidia-ctk\" version...\n", "\n", - "[2025-09-29 23:46:54,667] [INFO] (common) - Launching container (4d77d0dd21f3) using image 'my_app-x64-workstation-dgpu-linux-amd64:1.0'...\n", - " container name: bold_kowalevski\n", + "[2025-09-30 18:30:04,004] [INFO] (common) - Launching container (6f2868245795) using image 'my_app-x64-workstation-dgpu-linux-amd64:1.0'...\n", + " container name: agitated_fermat\n", " host name: mingq-dt\n", " network: host\n", " user: 1000:1000\n", @@ -2167,7 +1613,7 @@ " shared memory size: 67108864\n", " devices: \n", " group_add: 44\n", - "2025-09-30 06:46:55 [INFO] Launching application python3 /opt/holoscan/app ...\n", + "2025-10-01 01:30:05 [INFO] Launching application python3 /opt/holoscan/app ...\n", "\n", "/home/holoscan/.local/lib/python3.12/site-packages/monai/deploy/utils/importutil.py:20: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.\n", "\n", @@ -2177,11 +1623,11 @@ "\n", "[info] [gxf_executor.cpp:344] Creating context\n", "\n", - "[2025-09-30 06:47:02,343] [INFO] (root) - Parsed args: Namespace(log_level=None, input=None, output=None, model=None, workdir=None, triton_server_netloc=None, argv=['/opt/holoscan/app'])\n", + "[2025-10-01 01:30:11,177] [INFO] (root) - Parsed args: Namespace(log_level=None, input=None, output=None, model=None, workdir=None, triton_server_netloc=None, argv=['/opt/holoscan/app'])\n", "\n", - "[2025-09-30 06:47:02,349] [INFO] (root) - AppContext object: AppContext(input_path=/var/holoscan/input, output_path=/var/holoscan/output, model_path=/opt/holoscan/models, workdir=/var/holoscan), triton_server_netloc=\n", + "[2025-10-01 01:30:11,184] [INFO] (root) - AppContext object: AppContext(input_path=/var/holoscan/input, output_path=/var/holoscan/output, model_path=/opt/holoscan/models, workdir=/var/holoscan), triton_server_netloc=\n", "\n", - "[2025-09-30 06:47:02,349] [INFO] (app.AISpleenSegApp) - App input and output path: /var/holoscan/input, /var/holoscan/output\n", + "[2025-10-01 01:30:11,184] [INFO] (app.AISpleenSegApp) - App input and output path: /var/holoscan/input, /var/holoscan/output\n", "\n", "[info] [gxf_executor.cpp:2508] Activating Graph...\n", "\n", @@ -2191,71 +1637,75 @@ "\n", "[info] [greedy_scheduler.cpp:191] Scheduling 5 entities\n", "\n", - "[2025-09-30 06:47:02,513] [INFO] (monai.deploy.operators.dicom_data_loader_operator.DICOMDataLoaderOperator) - No or invalid input path from the optional input port: None\n", + "[2025-10-01 01:30:11,339] [INFO] (monai.deploy.operators.dicom_data_loader_operator.DICOMDataLoaderOperator) - No or invalid input path from the optional input port: None\n", "\n", - "[2025-09-30 06:47:02,915] [INFO] (root) - Finding series for Selection named: CT Series\n", + "[2025-10-01 01:30:11,663] [INFO] (root) - Finding series for Selection named: CT Series\n", "\n", - "[2025-09-30 06:47:02,915] [INFO] (root) - Searching study, : 1.3.6.1.4.1.14519.5.2.1.7085.2626.822645453932810382886582736291\n", + "[2025-10-01 01:30:11,663] [INFO] (root) - Searching study, : 1.3.6.1.4.1.14519.5.2.1.7085.2626.822645453932810382886582736291\n", "\n", " # of series: 1\n", "\n", - "[2025-09-30 06:47:02,915] [INFO] (root) - Working on series, instance UID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", + "[2025-10-01 01:30:11,663] [INFO] (root) - Working on series, instance UID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", + "\n", + "[2025-10-01 01:30:11,663] [INFO] (root) - On attribute: 'StudyDescription' to match value: '(.*?)'\n", "\n", - "[2025-09-30 06:47:02,915] [INFO] (root) - On attribute: 'StudyDescription' to match value: '(.*?)'\n", + "[2025-10-01 01:30:11,663] [INFO] (root) - Series attribute StudyDescription value: CT ABDOMEN W IV CONTRAST\n", "\n", - "[2025-09-30 06:47:02,916] [INFO] (root) - Series attribute StudyDescription value: CT ABDOMEN W IV CONTRAST\n", + "[2025-10-01 01:30:11,663] [INFO] (root) - On attribute: 'Modality' to match value: '(?i)CT'\n", "\n", - "[2025-09-30 06:47:02,916] [INFO] (root) - On attribute: 'Modality' to match value: '(?i)CT'\n", + "[2025-10-01 01:30:11,663] [INFO] (root) - Series attribute Modality value: CT\n", "\n", - "[2025-09-30 06:47:02,916] [INFO] (root) - Series attribute Modality value: CT\n", + "[2025-10-01 01:30:11,664] [INFO] (root) - On attribute: 'SeriesDescription' to match value: '(.*?)'\n", "\n", - "[2025-09-30 06:47:02,916] [INFO] (root) - On attribute: 'SeriesDescription' to match value: '(.*?)'\n", + "[2025-10-01 01:30:11,664] [INFO] (root) - Series attribute SeriesDescription value: ABD/PANC 3.0 B31f\n", "\n", - "[2025-09-30 06:47:02,916] [INFO] (root) - Series attribute SeriesDescription value: ABD/PANC 3.0 B31f\n", + "[2025-10-01 01:30:11,664] [INFO] (root) - On attribute: 'ImageType' to match value: ['PRIMARY', 'ORIGINAL']\n", "\n", - "[2025-09-30 06:47:02,916] [INFO] (root) - On attribute: 'ImageType' to match value: ['PRIMARY', 'ORIGINAL']\n", + "[2025-10-01 01:30:11,664] [INFO] (root) - Series attribute ImageType value: None\n", "\n", - "[2025-09-30 06:47:02,916] [INFO] (root) - Series attribute ImageType value: None\n", + "[2025-10-01 01:30:11,664] [INFO] (root) - Instance level attribute ImageType value: [\"['ORIGINAL', 'PRIMARY', 'AXIAL', 'CT_SOM5 SPI']\"]\n", "\n", - "[2025-09-30 06:47:02,916] [INFO] (root) - Instance level attribute ImageType value: [\"['ORIGINAL', 'PRIMARY', 'AXIAL', 'CT_SOM5 SPI']\"]\n", + "[2025-10-01 01:30:11,664] [INFO] (root) - Selected Series, UID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", "\n", - "[2025-09-30 06:47:02,916] [INFO] (root) - Selected Series, UID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", + "[2025-10-01 01:30:11,664] [INFO] (root) - Series Selection finalized\n", "\n", - "[2025-09-30 06:47:02,916] [INFO] (root) - Series Selection finalized\n", + "[2025-10-01 01:30:11,664] [INFO] (root) - Series Description of selected DICOM Series for inference: ABD/PANC 3.0 B31f\n", "\n", - "[2025-09-30 06:47:02,916] [INFO] (root) - Series Description of selected DICOM Series for inference: ABD/PANC 3.0 B31f\n", + "[2025-10-01 01:30:11,664] [INFO] (root) - Series Instance UID of selected DICOM Series for inference: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", "\n", - "[2025-09-30 06:47:02,916] [INFO] (root) - Series Instance UID of selected DICOM Series for inference: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239\n", + "/home/holoscan/.local/lib/python3.12/site-packages/monai/utils/deprecate_utils.py:321: FutureWarning: monai.transforms.spatial.dictionary Orientationd.__init__:labels: Current default value of argument `labels=(('L', 'R'), ('P', 'A'), ('I', 'S'))` was changed in version None from `labels=(('L', 'R'), ('P', 'A'), ('I', 'S'))` to `labels=None`. Default value changed to None meaning that the transform now uses the 'space' of a meta-tensor, if applicable, to determine appropriate axis labels.\n", + "\n", + " warn_deprecated(argname, msg, warning_category)\n", "\n", - "[2025-09-30 06:47:03,267] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Converted Image object metadata:\n", + "[2025-10-01 01:30:12,202] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Converted Image object metadata:\n", "\n", - "[2025-09-30 06:47:03,267] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesInstanceUID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239, type \n", + "[2025-10-01 01:30:12,202] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesInstanceUID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.119403521930927333027265674239, type \n", "\n", - "[2025-09-30 06:47:03,267] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesDate: 20090831, type \n", + "[2025-10-01 01:30:12,202] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesDate: 20090831, type \n", "\n", - "[2025-09-30 06:47:03,267] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesTime: 101721.452, type \n", + "[2025-10-01 01:30:12,202] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesTime: 101721.452, type \n", "\n", - "[2025-09-30 06:47:03,267] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Modality: CT, type \n", + "[2025-10-01 01:30:12,202] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Modality: CT, type \n", "\n", - "[2025-09-30 06:47:03,267] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesDescription: ABD/PANC 3.0 B31f, type \n", + "[2025-10-01 01:30:12,202] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesDescription: ABD/PANC 3.0 B31f, type \n", "\n", - "[2025-09-30 06:47:03,267] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - PatientPosition: HFS, type \n", + "[2025-10-01 01:30:12,202] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - PatientPosition: HFS, type \n", "\n", - "[2025-09-30 06:47:03,267] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesNumber: 8, type \n", + "[2025-10-01 01:30:12,202] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - SeriesNumber: 8, type \n", "\n", - "[2025-09-30 06:47:03,267] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - row_pixel_spacing: 0.7890625, type \n", + "[2025-10-01 01:30:12,202] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - row_pixel_spacing: 0.7890625, type \n", "\n", - "[2025-09-30 06:47:03,267] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - col_pixel_spacing: 0.7890625, type \n", + "[2025-10-01 01:30:12,202] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - col_pixel_spacing: 0.7890625, type \n", "\n", - "[2025-09-30 06:47:03,267] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - depth_pixel_spacing: 1.5, type \n", + "[2025-10-01 01:30:12,202] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - depth_pixel_spacing: 1.5, type \n", "\n", - "[2025-09-30 06:47:03,267] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - row_direction_cosine: [1.0, 0.0, 0.0], type \n", + "[2025-10-01 01:30:12,202] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - row_direction_cosine: [1.0, 0.0, 0.0], type \n", "\n", - "[2025-09-30 06:47:03,267] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - col_direction_cosine: [0.0, 1.0, 0.0], type \n", + "[2025-10-01 01:30:12,202] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - col_direction_cosine: [0.0, 1.0, 0.0], type \n", "\n", - "[2025-09-30 06:47:03,267] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - depth_direction_cosine: [0.0, 0.0, 1.0], type \n", + "[2025-10-01 01:30:12,202] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - depth_direction_cosine: [0.0, 0.0, 1.0], type \n", "\n", - "[2025-09-30 06:47:03,268] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - dicom_affine_transform: [[ 0.7890625 0. 0. -197.60547 ]\n", + "[2025-10-01 01:30:12,203] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - dicom_affine_transform: [[ 0.7890625 0. 0. -197.60547 ]\n", "\n", " [ 0. 0.7890625 0. -398.60547 ]\n", "\n", @@ -2263,7 +1713,7 @@ "\n", " [ 0. 0. 0. 1. ]], type \n", "\n", - "[2025-09-30 06:47:03,268] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - nifti_affine_transform: [[ -0.7890625 -0. -0. 197.60547 ]\n", + "[2025-10-01 01:30:12,203] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - nifti_affine_transform: [[ -0.7890625 -0. -0. 197.60547 ]\n", "\n", " [ -0. -0.7890625 -0. 398.60547 ]\n", "\n", @@ -2271,57 +1721,67 @@ "\n", " [ 0. 0. 0. 1. ]], type \n", "\n", - "[2025-09-30 06:47:03,268] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyInstanceUID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.822645453932810382886582736291, type \n", + "[2025-10-01 01:30:12,204] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyInstanceUID: 1.3.6.1.4.1.14519.5.2.1.7085.2626.822645453932810382886582736291, type \n", "\n", - "[2025-09-30 06:47:03,268] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyID: , type \n", + "[2025-10-01 01:30:12,204] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyID: , type \n", "\n", - "[2025-09-30 06:47:03,268] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyDate: 20090831, type \n", + "[2025-10-01 01:30:12,204] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyDate: 20090831, type \n", "\n", - "[2025-09-30 06:47:03,268] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyTime: 095948.599, type \n", + "[2025-10-01 01:30:12,204] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyTime: 095948.599, type \n", "\n", - "[2025-09-30 06:47:03,268] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyDescription: CT ABDOMEN W IV CONTRAST, type \n", + "[2025-10-01 01:30:12,204] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - StudyDescription: CT ABDOMEN W IV CONTRAST, type \n", "\n", - "[2025-09-30 06:47:03,268] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - AccessionNumber: 5471978513296937, type \n", + "[2025-10-01 01:30:12,204] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - AccessionNumber: 5471978513296937, type \n", "\n", - "[2025-09-30 06:47:03,268] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - selection_name: CT Series, type \n", + "[2025-10-01 01:30:12,204] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - selection_name: CT Series, type \n", "\n", - "2025-09-30 06:47:04,033 INFO image_writer.py:197 - writing: /var/holoscan/output/saved_images_folder/1.3.6.1.4.1.14519.5.2.1.7085.2626/1.3.6.1.4.1.14519.5.2.1.7085.2626.nii\n", + "[2025-10-01 01:30:12,204] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - space: LPS, type \n", "\n", - "[2025-09-30 06:47:05,849] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Input of shape: torch.Size([1, 1, 270, 270, 106])\n", + "2025-10-01 01:30:12,912 INFO image_writer.py:197 - writing: /var/holoscan/output/saved_images_folder/1.3.6.1.4.1.14519.5.2.1.7085.2626/1.3.6.1.4.1.14519.5.2.1.7085.2626.nii\n", + "\n", + "[2025-10-01 01:30:15,137] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Input of shape: torch.Size([1, 1, 270, 270, 106])\n", + "\n", + "/home/holoscan/.local/lib/python3.12/site-packages/monai/inferers/utils.py:226: UserWarning: Using a non-tuple sequence for multidimensional indexing is deprecated and will be changed in pytorch 2.9; use x[tuple(seq)] instead of x[seq]. In pytorch 2.9 this will be interpreted as tensor index, x[torch.tensor(seq)], which will result either in an error or a different result (Triggered internally at /pytorch/torch/csrc/autograd/python_variable_indexing.cpp:306.)\n", + "\n", + " win_data = torch.cat([inputs[win_slice] for win_slice in unravel_slice]).to(sw_device)\n", + "\n", + "/home/holoscan/.local/lib/python3.12/site-packages/monai/inferers/utils.py:370: UserWarning: Using a non-tuple sequence for multidimensional indexing is deprecated and will be changed in pytorch 2.9; use x[tuple(seq)] instead of x[seq]. In pytorch 2.9 this will be interpreted as tensor index, x[torch.tensor(seq)], which will result either in an error or a different result (Triggered internally at /pytorch/torch/csrc/autograd/python_variable_indexing.cpp:306.)\n", + "\n", + " out[idx_zm] += p\n", "\n", - "2025-09-30 06:47:07,676 INFO image_writer.py:197 - writing: /var/holoscan/output/saved_images_folder/1.3.6.1.4.1.14519.5.2.1.7085.2626/1.3.6.1.4.1.14519.5.2.1.7085.2626_seg.nii\n", + "2025-10-01 01:30:16,851 INFO image_writer.py:197 - writing: /var/holoscan/output/saved_images_folder/1.3.6.1.4.1.14519.5.2.1.7085.2626/1.3.6.1.4.1.14519.5.2.1.7085.2626_seg.nii\n", "\n", - "[2025-09-30 06:47:09,109] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform length/batch size of output: 1\n", + "[2025-10-01 01:30:18,415] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform length/batch size of output: 1\n", "\n", - "[2025-09-30 06:47:09,113] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform pixel spacings for pred: tensor([0.7891, 0.7891, 1.5000], dtype=torch.float64)\n", + "[2025-10-01 01:30:18,418] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform pixel spacings for pred: tensor([0.7891, 0.7891, 1.5000], dtype=torch.float64)\n", "\n", - "[2025-09-30 06:47:09,251] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform pred of shape: (1, 512, 512, 204)\n", + "[2025-10-01 01:30:18,546] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Post transform pred of shape: (1, 512, 512, 204)\n", "\n", - "[2025-09-30 06:47:09,289] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Output Seg image numpy array of type shape: (204, 512, 512)\n", + "[2025-10-01 01:30:18,583] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Output Seg image numpy array of type shape: (204, 512, 512)\n", "\n", - "[2025-09-30 06:47:09,293] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Output Seg image pixel max value: 1\n", + "[2025-10-01 01:30:18,587] [INFO] (monai.deploy.operators.monai_seg_inference_operator.MonaiSegInferenceOperator) - Output Seg image pixel max value: 1\n", "\n", "/home/holoscan/.local/lib/python3.12/site-packages/highdicom/base.py:165: UserWarning: The string \"C3N-00198\" is unlikely to represent the intended person name since it contains only a single component. Construct a person name according to the format in described in https://dicom.nema.org/dicom/2013/output/chtml/part05/sect_6.2.html#sect_6.2.1.2, or, in pydicom 2.2.0 or later, use the pydicom.valuerep.PersonName.from_named_components() method to construct the person name correctly. If a single-component name is really intended, add a trailing caret character to disambiguate the name.\n", "\n", " check_person_name(patient_name)\n", "\n", - "[2025-09-30 06:47:10,455] [INFO] (highdicom.base) - copy Image-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", + "[2025-10-01 01:30:19,670] [INFO] (highdicom.base) - copy Image-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", "\n", - "[2025-09-30 06:47:10,455] [INFO] (highdicom.base) - copy attributes of module \"Specimen\"\n", + "[2025-10-01 01:30:19,670] [INFO] (highdicom.base) - copy attributes of module \"Specimen\"\n", "\n", - "[2025-09-30 06:47:10,455] [INFO] (highdicom.base) - copy Patient-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", + "[2025-10-01 01:30:19,670] [INFO] (highdicom.base) - copy Patient-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", "\n", - "[2025-09-30 06:47:10,455] [INFO] (highdicom.base) - copy attributes of module \"Patient\"\n", + "[2025-10-01 01:30:19,670] [INFO] (highdicom.base) - copy attributes of module \"Patient\"\n", "\n", - "[2025-09-30 06:47:10,456] [INFO] (highdicom.base) - copy attributes of module \"Clinical Trial Subject\"\n", + "[2025-10-01 01:30:19,671] [INFO] (highdicom.base) - copy attributes of module \"Clinical Trial Subject\"\n", "\n", - "[2025-09-30 06:47:10,456] [INFO] (highdicom.base) - copy Study-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", + "[2025-10-01 01:30:19,671] [INFO] (highdicom.base) - copy Study-related attributes from dataset \"1.3.6.1.4.1.14519.5.2.1.7085.2626.936983343951485811186213470191\"\n", "\n", - "[2025-09-30 06:47:10,456] [INFO] (highdicom.base) - copy attributes of module \"General Study\"\n", + "[2025-10-01 01:30:19,671] [INFO] (highdicom.base) - copy attributes of module \"General Study\"\n", "\n", - "[2025-09-30 06:47:10,456] [INFO] (highdicom.base) - copy attributes of module \"Patient Study\"\n", + "[2025-10-01 01:30:19,671] [INFO] (highdicom.base) - copy attributes of module \"Patient Study\"\n", "\n", - "[2025-09-30 06:47:10,456] [INFO] (highdicom.base) - copy attributes of module \"Clinical Trial Study\"\n", + "[2025-10-01 01:30:19,671] [INFO] (highdicom.base) - copy attributes of module \"Clinical Trial Study\"\n", "\n", "[info] [greedy_scheduler.cpp:372] Scheduler stopped: Some entities are waiting for execution, but there are no periodic or async entities to get out of the deadlock.\n", "\n", @@ -2331,13 +1791,13 @@ "\n", "[info] [gxf_executor.cpp:2597] Graph execution finished.\n", "\n", - "[2025-09-30 06:47:10,539] [INFO] (app.AISpleenSegApp) - End run\n", + "[2025-10-01 01:30:19,799] [INFO] (app.AISpleenSegApp) - End run\n", "\n", "[info] [gxf_executor.cpp:379] Destroying context\n", "\n", - "2025-09-30 06:47:11 [INFO] Application exited with 0.\n", + "2025-10-01 01:30:21 [INFO] Application exited with 0.\n", "\n", - "[2025-09-29 23:47:12,577] [INFO] (common) - Container 'bold_kowalevski'(4d77d0dd21f3) exited with code 0.\n" + "[2025-09-30 18:30:22,528] [INFO] (common) - Container 'agitated_fermat'(6f2868245795) exited with code 0.\n" ] } ], @@ -2359,7 +1819,7 @@ "output_type": "stream", "text": [ "output:\n", - "1.2.826.0.1.3680043.10.511.3.2703228368843626345529444779803874.dcm\n", + "1.2.826.0.1.3680043.10.511.3.21261845401654068054816597008318808.dcm\n", "saved_images_folder\n", "\n", "output/saved_images_folder:\n", diff --git a/requirements-dev.txt b/requirements-dev.txt index 629f3962..a5299c98 100644 --- a/requirements-dev.txt +++ b/requirements-dev.txt @@ -22,7 +22,7 @@ pytest==7.4.0 pytest-cov==4.1.0 pytest-lazy-fixture==0.6.3 cucim~=21.06; platform_system == "Linux" -monai<=1.5.0 +monai>=1.3.0 docker>=5.0.0 pydicom>=2.3.0 PyPDF2>=2.11.1 @@ -34,4 +34,4 @@ scikit-image>=0.17.2 nibabel>=3.2.1 numpy-stl>=2.12.0 trimesh>=3.8.11 -torch>=2.0.1 +torch>=2.6.0 diff --git a/requirements-examples.txt b/requirements-examples.txt index d184d397..63523b4e 100644 --- a/requirements-examples.txt +++ b/requirements-examples.txt @@ -8,5 +8,5 @@ Pillow>=8.4.0 nibabel>=3.2.1 numpy-stl>=2.12.0 trimesh>=3.8.11 -torch>=2.0.1 -monai<=1.5.0 \ No newline at end of file +torch>=2.6.0 +monai>=1.3.0 \ No newline at end of file