Skip to content

Packaging app

KavinKrishnan edited this page Sep 10, 2021 · 29 revisions

MONAI SDK applications can be built into a deployable and structured Docker image using the MONAI Application Packager

Overview on MONAI Application Packager

Utility for building an application developed with MONAI SDK into a deployable MONAI application package. form of a Docker image

Usage

monai-deploy package [Path of MONAI Application Code] -t [Tag for resulting Docker image of MONAI App Package]

Arguments:

Required Arguments

  • <MONAI application path> Path of MONAI Application Code
  • --tag, -t Tag for resulting Docker image of MONAI App Package

Optional Arguments

  • --base Base Application Image (overrides default "nvcr.io/nvidia/pytorch:21.07-py3")
  • --input-dir, -i Directory mounted in container for Application Input (overrides default "input")
  • --models-dir Directory mounted in container for Models Path (overrides default "/opt/monai/models")
  • --model, -m Path to local directory containing all application models (will override utilizing models provided within application SDK code)
  • --output-dir, -o Directory mounted in container for Application Output (overrides default "output")
  • --timeout Timeout (overrides default 0)
  • --version Version of the Application (overrides default "0.0.0")
  • --working-dir, -w Directory mounted in container for Application (overrides default "/var/monai")

Example

$ monai-deploy package ./spleen_segmentation_app -t monaispleen:latest
Building MONAI Application Package...
Successfully built monaispleen:latest