Skip to content

Prepared changes for releasing v3 #538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 23, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.8
- name: Set up Python 3.9
uses: actions/setup-python@v2
with:
python-version: "3.8"
python-version: "3.9"
- name: Setup Dev Environment
run: |
pip install virtualenv
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.8"
python: "3.9"
# You can also specify other tool versions:
# nodejs: "20"
# rust: "1.70"
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ MONAI Deploy App SDK's code coverage report is available at [CodeCov](https://co
#### Building the documentation

:::{note}
Please note that the documentation builds successfully in Python 3.8 environment, but fails with Python 3.10.
Please note that the documentation builds successfully in Python 3.9 environment, but fails with Python 3.10.
:::

MONAI's documentation is located at `docs/`.
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ MONAI Deploy App SDK offers a framework and associated tools to design, develop
- Build medical imaging inference applications using a flexible, extensible & usable Pythonic API
- Easy management of inference applications via programmable Directed Acyclic Graphs (DAGs)
- Built-in operators to load DICOM data to be ingested in an inference app
- Out-of-the-box support for in-proc PyTorch based inference
- Out-of-the-box support for in-proc PyTorch based inference, as well as remote inference via Triton Inference Server
- Easy incorporation of MONAI based pre and post transformations in the inference application
- Package inference application with a single command into a portable MONAI Application Package
- Locally run and debug your inference application using App Runner
Expand All @@ -33,7 +33,7 @@ If you have used MONAI in your research, please cite us! The citation can be exp
To install [the current release](https://pypi.org/project/monai-deploy-app-sdk/), you can simply run:

```bash
pip install monai-deploy-app-sdk # '--pre' to install a pre-release version.
pip install monai-deploy-app-sdk
```

### Prerequisites
Expand All @@ -48,7 +48,7 @@ pip install monai-deploy-app-sdk # '--pre' to install a pre-release version.
Getting started guide is available at [here](https://docs.monai.io/projects/monai-deploy-app-sdk/en/stable/getting_started/index.html).

```bash
pip install monai-deploy-app-sdk # '--pre' to install a pre-release version.
pip install monai-deploy-app-sdk

# Clone monai-deploy-app-sdk repository for accessing examples.
git clone https://github.com/Project-MONAI/monai-deploy-app-sdk.git
Expand All @@ -62,7 +62,7 @@ python examples/apps/simple_imaging_app/app.py -i examples/apps/simple_imaging_a

# Package app (creating MAP Docker image), using `-l DEBUG` option to see progress.
# Also please note that postfix will be added to user supplied tag for identifying CPU architecture and GPU type etc.
monai-deploy package examples/apps/simple_imaging_app -c examples/apps/simple_imaging_app/app.yaml -t simple_app:latest --platform x64-workstation -l DEBUG
monai-deploy package examples/apps/simple_imaging_app -c examples/apps/simple_imaging_app/app.yaml -t simple_app:latest --platform x86_64 -l DEBUG

# Run the app with docker image and an input file locally
## Copy a test input file to 'input' folder
Expand All @@ -86,7 +86,7 @@ YouTube Video (to be updated with the new version):

### [3) Creating a Segmentation app](https://docs.monai.io/projects/monai-deploy-app-sdk/en/stable/getting_started/tutorials/segmentation_app.html)

YouTube Video (to be updated with the new version):
YouTube Video (demonstrating the previous version of the App SDK):

- [Spleen Organ Segmentation - Jupyter Notebook Tutorial](https://www.youtube.com/watch?v=cqDVxzYt9lY)
- [Spleen Organ Segmentation - Deep Dive](https://www.youtube.com/watch?v=nivgfD4pwWE)
Expand All @@ -97,14 +97,16 @@ YouTube Video (to be updated with the new version):

### [Examples](https://docs.monai.io/projects/monai-deploy-app-sdk/en/stable/getting_started/examples.html)

<https://github.com/Project-MONAI/monai-deploy-app-sdk/tree/main/examples/apps> has example apps that you can see.
<https://github.com/Project-MONAI/monai-deploy-app-sdk/tree/main/examples/apps> has example apps that you can see, to name but a few

- simple_imaging_app
- ai_livertumor_seg_app
- ai_spleen_seg_app
- ai_unetr_seg_app
- dicom_series_to_image_app
- mednist_classifier_monaideploy
- simple_imaging_app
- ai_remote_infer_app


## Contributing

Expand Down
2 changes: 1 addition & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Sphinx==4.1.2
sphinx-autobuild==2021.3.14
myst-nb==0.17.2 # this version is fine in python 3.8 and avoids pulling in multiple nbformat packages
myst-nb==0.17.2 # this version is fine in python 3.9 and avoids pulling in multiple nbformat packages
myst-parser==0.18.0
lxml_html_clean # needed by myst-nb
linkify-it-py==1.0.1 # https://myst-parser.readthedocs.io/en/latest/syntax/optional.html?highlight=linkify#linkify
Expand Down
8 changes: 4 additions & 4 deletions docs/source/developing_with_sdk/packaging_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ It is required that the application configuration yaml file as well as the depen
### Basic Usage of MONAI Application Packager

```bash
monai-deploy package <APP_PATH> --config <CONFIG> --tag <TAG> --platform <x64-workstation> [--models <MODEL_PATH>] [--log-level <LEVEL>] [-h]
monai-deploy package <APP_PATH> --config <CONFIG> --tag <TAG> --platform <x86_64> [--models <MODEL_PATH>] [--log-level <LEVEL>] [-h]
```

#### Required Arguments

* `<APP_PATH>`: A path to MONAI Deploy Application folder or main code.
* `--config, -c <CONFIG>`: Path to the application configuration file.
* `--tag, -t <TAG>`: A MAP name and optionally a tag in the 'name:tag' format.
* `--platform <PLATFORM>`: Platform type of the container image, must be `x64-workstation` for x86-64 system.
* `--platform <PLATFORM>`: Platform type of the container image, must be `x86_64` for x86-64 system.

:::{note}
If `<APP_PATH>` refers to a python code (such as `./my_app.py`), the whole parent folder of the file would be packaged into the MAP container image, effectively the same as specifying the application folder path which includes `__main__.py` file. In both cases, the image's environment variable, `HOLOSCAN_APPLICATION` will be set with the path of the application folder in the image, i.e. `HOLOSCAN_APPLICATION=/opt/holoscan/app`. So, it is essential to provide the `__main__.py` file in the application folder, which usually would look like below:
Expand Down Expand Up @@ -54,7 +54,7 @@ The following lists a few most likely used [optional arguments](https://docs.nvi
Given an example MONAI Deploy App SDK application with its code residing in a directory `./my_app`, packaging this application with the Packager to create a Docker image tagged `my_app:latest` would look like this:

```bash
$ monai-deploy package ./my_app -c --config ./my_app/app.yaml -t my_app:latest --models ./model.ts --platform x64-workstation
$ monai-deploy package ./my_app -c --config ./my_app/app.yaml -t my_app:latest --models ./model.ts --platform x86_64

Building MONAI Application Package...
Successfully built my_app:latest
Expand All @@ -65,7 +65,7 @@ The MAP image name will be postfixed with the platform info to become `my_app-x6
:::{note}
* The current implementation of the Packager **ONLY** supports a set of [platform](https://docs.nvidia.com/holoscan/sdk-user-guide/cli/package.html#platform-platform) specific base images from `nvcr.io` as base images for the MAP.

* To package a MAP to run on ARMv8 AArch64 on Linux with discrete GPU, replace the commandline option `--platform x64-workstation` with `--platform igx-orin-devkit --platform-config dgpu`. It has been tested on [NVIDIA IGX Orin](https://www.nvidia.com/en-us/edge-computing/products/igx/).
* To package a MAP to run on ARMv8 AArch64 on Linux with discrete GPU, replace the commandline option `--platform x86_64` with `--platform igx-dgpu`. It has been tested on [NVIDIA IGX Orin](https://www.nvidia.com/en-us/edge-computing/products/igx/).
:::

## Next Step
Expand Down
6 changes: 3 additions & 3 deletions docs/source/getting_started/tutorials/mednist_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ This tutorial demos the process of packaging up a trained model using MONAI Depl
## Setup

```bash
# Create a virtual environment with Python 3.8.
# Create a virtual environment with Python 3.9.
# Skip if you are already in a virtual environment.
conda create -n mednist python=3.8 pytorch jupyterlab cudatoolkit=12.2 -c pytorch -c conda-forge
conda create -n mednist python=3.9 pytorch jupyterlab cudatoolkit=12.2 -c pytorch -c conda-forge
conda activate mednist

# Launch JupyterLab if you want to work on Jupyter Notebook
Expand Down Expand Up @@ -98,7 +98,7 @@ monai-deploy package examples/apps/mednist_classifier_monaideploy/mednist_classi
--config examples/apps/mednist_classifier_monaideploy/app.yaml \
--tag mednist_app:latest \
--models mednist_model/classifier.zip \
--platform x64-workstation \
--platform x86_64 \
-l DEBUG

# Note: for AMD GPUs, nvidia-docker is not required, but the dependency of the App SDK, namely Holoscan SDK
Expand Down
8 changes: 4 additions & 4 deletions docs/source/getting_started/tutorials/monai_bundle_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ This tutorial shows how to create an organ segmentation application for a PyTorc
## Setup

```bash
# Create a virtual environment with Python 3.8.
# Create a virtual environment with Python 3.9.
# Skip if you are already in a virtual environment.
conda create -n monai python=3.8 pytorch torchvision jupyterlab cudatoolkit=12.2 -c pytorch -c conda-forge
conda create -n monai python=3.9 pytorch torchvision jupyterlab cudatoolkit=12.2 -c pytorch -c conda-forge
conda activate monai

# Launch JupyterLab if you want to work on Jupyter Notebook
Expand Down Expand Up @@ -38,7 +38,7 @@ jupyter-lab

```{raw} html
<p style="text-align: center;">
<a class="sphinx-bs btn text-wrap btn-outline-primary col-md-6 reference external" href="../../_static/notebooks/tutorials/05_monai_bundle_app.ipynb">
<a class="sphinx-bs btn text-wrap btn-outline-primary col-md-6 reference external" href="../../_static/notebooks/tutorials/04_monai_bundle_app.ipynb">
<span>Download 04_monai_bundle_app.ipynb</span>
</a>
</p>
Expand Down Expand Up @@ -86,7 +86,7 @@ monai-deploy package examples/apps/ai_spleen_seg_app \
--config examples/apps/ai_spleen_seg_app/app.yaml \
--tag seg_app:latest \
--models spleen_model/model.ts \
--platform x64-workstation \
--platform x86_64 \
-l DEBUG

# Note: for AMD GPUs, nvidia-docker is not required, but the dependency of the App SDK, namely Holoscan SDK
Expand Down
6 changes: 3 additions & 3 deletions docs/source/getting_started/tutorials/multi_model_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ The models used in this example are trained with MONAI, and are packaged in the
## Setup

```bash
# Create a virtual environment with Python 3.8.
# Create a virtual environment with Python 3.9.
# Skip if you are already in a virtual environment.
conda create -n monai python=3.8 pytorch torchvision jupyterlab cudatoolkit=12.2 -c pytorch -c conda-forge
conda create -n monai python=3.9 pytorch torchvision jupyterlab cudatoolkit=12.2 -c pytorch -c conda-forge
conda activate monai

# Launch JupyterLab if you want to work on Jupyter Notebook
Expand Down Expand Up @@ -70,7 +70,7 @@ monai-deploy package examples/apps/ai_multi_ai_app \
--tag multi_model_app:latest \
--config examples/apps/ai_multi_ai_app/app.yaml \
--models multi_models \
--platform x64-workstation \
--platform x86_64 \
-l DEBUG

# Note: for AMD GPUs, nvidia-docker is not required, but the dependency of the App SDK, namely Holoscan SDK
Expand Down
6 changes: 3 additions & 3 deletions docs/source/getting_started/tutorials/segmentation_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ Please note that the following steps are for demonstration purpose. The code pul
## Setup

```bash
# Create a virtual environment with Python 3.8.
# Create a virtual environment with Python 3.9.
# Skip if you are already in a virtual environment.
conda create -n monai python=3.8 pytorch torchvision jupyterlab cudatoolkit=12.2 -c pytorch -c conda-forge
conda create -n monai python=3.9 pytorch torchvision jupyterlab cudatoolkit=12.2 -c pytorch -c conda-forge
conda activate monai

# Launch JupyterLab if you want to work on Jupyter Notebook
Expand Down Expand Up @@ -72,7 +72,7 @@ monai-deploy package examples/apps/ai_spleen_seg_app \
--config examples/apps/ai_spleen_seg_app/app.yaml \
--tag seg_app:latest \
--models spleen_model/model.ts \
--platform x64-workstation \
--platform x86_64 \
-l DEBUG

# Note: for AMD GPUs, nvidia-docker is not required, but the dependency of the App SDK, namely Holoscan SDK
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ This tutorial shows how to create an organ segmentation application for a PyTorc
## Setup

```bash
# Create a virtual environment with Python 3.8.
# Create a virtual environment with Python 3.9.
# Skip if you are already in a virtual environment.
conda create -n monai python=3.8 pytorch torchvision jupyterlab cudatoolkit=12.2 -c pytorch -c conda-forge
conda create -n monai python=3.9 pytorch torchvision jupyterlab cudatoolkit=12.2 -c pytorch -c conda-forge
conda activate monai

# Launch JupyterLab if you want to work on Jupyter Notebook
Expand Down
6 changes: 3 additions & 3 deletions docs/source/getting_started/tutorials/simple_app.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ This tutorial shows how a simple image processing application can be created wit
## Setup

```bash
# Create a virtual environment with Python 3.8.
# Create a virtual environment with Python 3.9.
# Skip if you are already in a virtual environment.
conda create -n monai python=3.8 pytorch torchvision jupyterlab cudatoolkit=12.2 -c pytorch -c conda-forge
conda create -n monai python=3.9 pytorch torchvision jupyterlab cudatoolkit=12.2 -c pytorch -c conda-forge
conda activate monai

# Launch JupyterLab if you want to work on Jupyter Notebook
Expand Down Expand Up @@ -69,7 +69,7 @@ ls output
# This assumes that nvidia docker is installed in the local machine.
# Please see https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/install-guide.html#docker to install nvidia-docker2.

monai-deploy package examples/apps/simple_imaging_app -c examples/apps/simple_imaging_app/app.yaml -t simple_app:latest --platform x64-workstation -l DEBUG
monai-deploy package examples/apps/simple_imaging_app -c examples/apps/simple_imaging_app/app.yaml -t simple_app:latest --platform x86_64 -l DEBUG

# Show the application and package manifest files of the MONAI Application Package

Expand Down
7 changes: 7 additions & 0 deletions docs/source/release_notes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@
:hidden:
:maxdepth: 2

```
## Version 3.0

```{toctree}
:maxdepth: 1

v3.0.0
```
## Version 2.0

Expand Down
29 changes: 29 additions & 0 deletions docs/source/release_notes/v3.0.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Version 2.0.0 (April 24th, 2024)

## What's new in 3.0.0

- This version of the App SDK is based on the newly released [Holoscan SDK v3](https://pypi.org/project/holoscan/), and is expected to be so with future minor releases of Holoscan SDK v3.

- Starting with version 3.0.0, [Holoscan SDK](https://pypi.org/project/holoscan/) and [Holoscan CLI](https://pypi.org/project/holoscan-cli/) are released in separate packages, and as such, this version of the MONAI Deploy App SDK has both as dependencies. As of now, version 3 of both packages are compatible.

- Remote inference on [Triton Inference Server](https://github.com/triton-inference-server) is now supported. Effort was made to make it user-friendly so existing example applications can be easily converted to use this feature by simply providing the network location of the server as well as the [Triton model configuration file](https://github.com/triton-inference-server/server/blob/main/docs/user_guide/model_configuration.md) sans the actual model files. [An example application](https://github.com/Project-MONAI/monai-deploy-app-sdk/tree/main/examples/apps/ai_remote_infer_app) has been provided to demonstrate such use case.

### Key changes

- [Cincinnati Children's Hospital Medical Cente](https://www.cincinnatichildrens.org/) researchers, @[Bryan](https://github.com/bluna301) @[Will](https://github.com/WillButAgain) and Elan, contributed numerous enhancements from experience developing and deploying MONAI based AI applications in clinical environments, to name but a few

- Enhanced the DICOM data loader to handle multi-phase DICOM series where multiple acquisitions exist and some DICOM SOP instances have the same image pospositiontion patient.

- Enahnced the DICOM series to volume operator to better handle the data types of the converted volume image for improved efficiency and memory usage.

- Enhanced the DICOM Segmentation operator to populate DICOM tags with AI model information which are consistent with other DICOM writers in the SDK.


Please also see the <a href="https://github.com/Project-MONAI/monai-deploy-app-sdk/issues?q=is%3Aissue+is%3Aclosed">closed issues on Github</a> and the <a href="https://github.com/Project-MONAI/monai-deploy-app-sdk/pulls?q=is%3Apr+is%3Aclosed">closed pull requests on Github</a>.

## Additional information
Please visit [GETTING STARTED](/getting_started/index) guide and follow the tutorials.

You can learn more about SDK usage through [DEVELOPING WITH SDK](/developing_with_sdk/index).

Please let us know how you like it and what could be improved by [submitting an issue](https://github.com/Project-MONAI/monai-deploy-app-sdk/issues/new/choose) or [asking questions](https://github.com/Project-MONAI/monai-deploy-app-sdk/discussions)
737 changes: 253 additions & 484 deletions notebooks/tutorials/01_simple_app.ipynb

Large diffs are not rendered by default.

Loading