### Install Prerequisites and Tools (Bash) Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/helm-charts/docs/01.installation.md Installs essential packages like apt-transport-https, curl, jq, and Kubernetes tools (kubelet, kubectl, kubeadm). It also installs Helm and the Argo CLI for workflow management. ```bash sudo apt-get update && sudo apt-get install -y apt-transport-https curl jq sudo apt-get install -y -q kubelet kubectl kubeadm sudo apt-mark hold kubelet kubeadm kubectl curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash curl -sLO https://github.com/argoproj/argo-workflows/releases/download/v3.4.11/argo-linux-amd64.gz gunzip argo-linux-amd64.gz chmod +x argo-linux-amd64 sudo mv ./argo-linux-amd64 /usr/local/bin/argo ``` -------------------------------- ### Kibana Log Analysis Setup Source: https://context7.com/project-monai/monai-deploy/llms.txt Commands for setting up and interacting with the ELK stack for centralized logging. Includes initializing Elasticsearch volumes, starting services with the ELK profile, accessing Kibana, importing saved searches, and querying logs. ```bash # Initialize Elasticsearch volume permissions ./init.sh # Start services with ELK profile docker compose --profile elk up -d # Access Kibana UI # Navigate to http://localhost:5601 # Load saved search via API curl -X POST http://localhost:5601/api/saved_objects/_import?createNewCopies=true \ -H 'kbn-xsrf: true' \ --form file=@/usr/share/kibana.ndjson # Query logs via Elasticsearch curl -X GET "http://localhost:9200/monai-deploy-*/_search" \ -H 'Content-Type: application/json' \ -d '{"query": {"match_all": {}}, "size": 10}' ``` -------------------------------- ### Install CUDA Toolkit for WSL Ubuntu Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/monai-deploy-express/README.md Provides a sequence of bash commands to install the CUDA Toolkit on a WSL Ubuntu environment. This includes managing apt keys, downloading the CUDA repository, and installing the cuda package, essential for GPU acceleration within WSL. ```bash sudo apt-key del 7fa2af80 wget https://developer.download.nvidia.com/compute/cuda/repos/wsl-ubuntu/x86_64/cuda-wsl-ubuntu.pin sudo mv cuda-wsl-ubuntu.pin /etc/apt/preferences.d/cuda-repository-pin-600 wget https://developer.download.nvidia.com/compute/cuda/11.7.0/local_installers/cuda-repo-wsl-ubuntu-11-7-local_11.7.0-1_amd64.deb sudo dpkg -i cuda-repo-wsl-ubuntu-11-7-local_11.7.0-1_amd64.deb sudo cp /var/cuda-repo-wsl-ubuntu-11-7-local/*.gpg /usr/share/keyrings/ sudo apt-get update sudo apt-get -y install cuda ``` -------------------------------- ### Install MONAI Deploy Helm Chart (Bash) Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/helm-charts/docs/01.installation.md Installs the MONAI Deploy Helm chart and its dependencies in the default or a specified namespace. This command deploys services like Informatics Gateway, Workflow Manager, MinIO, MongoDB, and others. ```bash # default/current namespace helm upgrade -i monai-deploy . # install in namespace "my-namespace" helm upgrade -i monai-deploy -n my-space . ``` -------------------------------- ### Build Helm Dependencies (Bash) Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/helm-charts/docs/01.installation.md Builds and downloads dependencies for the MONAI Deploy Helm charts. This command ensures all required sub-charts and dependencies are available before installation. ```bash helm dependency build ``` -------------------------------- ### Initialize Kubernetes Cluster (Bash) Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/helm-charts/docs/01.installation.md Initializes a Kubernetes cluster using kubeadm, disables swap, and configures the pod network CIDR. It copies the default Kubernetes configuration and installs Calico for network policy enforcement. Control-plane taint is removed to allow scheduling on the control-plane node. ```bash # Disable swap sudo nano /etc/fstab # Add a # before all the lines that start with /swap and save the file. sudo kubeadm init --pod-network-cidr=192.168.0.0/16 # Copy default configuration mkdir -p $HOME/.kube sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config # Install Calico kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/tigera-operator.yaml kubectl create -f https://raw.githubusercontent.com/projectcalico/calico/v3.26.1/manifests/custom-resources.yaml kubectl taint nodes --all node-role.kubernetes.io/control-plane- ``` -------------------------------- ### Install k3s Kubernetes Distribution (Bash) Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/helm-charts/docs/01.installation.md Installs the k3s Kubernetes distribution, including NVIDIA container runtime and CUDA drivers. It configures Flannel networking and sets the service node port range. The default Kubernetes configuration is copied to the user's home directory. ```bash sudo apt install -y nvidia-container-runtime cuda-drivers-fabricmanager-515 nvidia-headless-515-server curl -sfL https://get.k3s.io | sh -s - --flannel-backend host-gw --service-node-port-range 104-32767 --flannel-external-ip mkdir -p $HOME/.kube sudo cp -i /etc/rancher/k3s/k3s.yaml $HOME/.kube/config sudo chown $(id -u):$(id -g) $HOME/.kube/config ``` -------------------------------- ### Start MONAI Deploy Express Services with Docker Compose Source: https://context7.com/project-monai/monai-deploy/llms.txt This snippet demonstrates how to start and manage the MONAI Deploy Express services using Docker Compose for local development. It covers starting all services, including the ELK stack for logging, viewing logs, and stopping all services. ```bash # Start all MONAI Deploy Express services docker compose up -d # Start with ELK stack for logging (requires init.sh first) ./init.sh docker compose --profile elk up -d # View logs from all containers docker compose logs -t -f # Stop all services docker compose down ``` -------------------------------- ### Install Python Dependencies Source: https://github.com/project-monai/monai-deploy/blob/main/demos/ig-tm-map/README.md Installs the required Python packages listed in the requirements.txt file. This command is essential for setting up the project's environment and ensuring all necessary libraries are available for the demo application to run. ```bash pip install -r requirements.txt ``` -------------------------------- ### Check Kubernetes Node Status (Bash) Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/helm-charts/docs/01.installation.md Demonstrates how to check the status of Kubernetes nodes. The first command shows a connection error during a node restart, while the second shows a healthy node once it's ready. ```bash # The following error denotes that the Kubernetes node is restarting. $ kubectl get nodes The connection to the server 10.20.12.243:6443 was refused - did you specify the right host or port? # And when the node is ready... $ kubectl get nodes NAME STATUS ROLES AGE VERSION my-system Ready control-plane 73s v1.28.1 ``` -------------------------------- ### Define and Register Hello World Workflow Source: https://context7.com/project-monai/monai-deploy/llms.txt A minimal workflow example for MONAI Deploy, demonstrating basic data flow. It includes a JSON definition for the workflow and cURL commands to register it with the MONAI Deploy service. ```json { "name": "hello-world", "version": "1.0.0", "description": "Hello MONAI Deploy!", "informatics_gateway": { "ae_title": "MONAI-DEPLOY", "data_origins": ["ORTHANC"], "export_destinations": ["ORTHANC"] }, "tasks": [ { "id": "print-file-list", "description": "Print files from input directory", "type": "docker", "args": { "container_image": "alpine:latest", "server_url": "unix:///var/run/docker.sock", "entrypoint": "/bin/sh,-c", "command": "/usr/bin/find /var/monai/input -type f", "temp_storage_container_path": "/var/lib/mde/", "MYINPUT": "/var/monai/input/" }, "artifacts": { "input": [{"name": "MYINPUT", "value": "{{ context.input.dicom }}"}] } } ] } ``` ```bash # Register hello world workflow curl --request POST \ --header 'Content-Type: application/json' \ --data "@sample-workflows/hello-world.json" \ http://localhost:5001/workflows # View container output after triggering workflow docker container list -a | grep alpine docker logs ``` -------------------------------- ### Start and Stop MONAI Deploy Express Services with Docker Compose Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/monai-deploy-express/README.md Commands to manage MONAI Deploy Express services using Docker Compose. These commands allow users to start, stop, view logs, and run services in detached mode. Ensure you are in the directory containing the docker-compose.yml file. ```bash docker compose up # start MONAI Deploy Express docker compose up -d # or run detached docker compose logs -t -f # view output from all containers docker compose down # stop all services ``` -------------------------------- ### Deploy MONAI Deploy to Kubernetes with Helm Source: https://context7.com/project-monai/monai-deploy/llms.txt Deploy MONAI Deploy to a Kubernetes cluster for production environments. This involves installing prerequisites like Helm and Argo CLI, building Helm dependencies, and then installing the MONAI Deploy Helm charts. ```bash # Install prerequisites sudo apt-get install -y apt-transport-https curl jq kubelet kubectl kubeadm curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash # Install Argo CLI curl -sLO https://github.com/argoproj/argo-workflows/releases/download/v3.4.11/argo-linux-amd64.gz gunzip argo-linux-amd64.gz && chmod +x argo-linux-amd64 sudo mv ./argo-linux-amd64 /usr/local/bin/argo # Build Helm dependencies helm dependency build # Install MONAI Deploy Helm charts helm upgrade -i monai-deploy . # Install in custom namespace helm upgrade -i monai-deploy -n my-namespace . # Check deployment status kubectl get pods kubectl get services ``` -------------------------------- ### k6 DICOM Benchmark Script Example Source: https://github.com/project-monai/monai-deploy/blob/main/performance-testing/README.md An example JavaScript script for k6 used to send MR study store requests. This script includes a 2-minute sleep between each iteration, simulating a benchmark scenario for DICOM data transfer. ```javascript // dicom_benchmark.js // Sends MR study store requests with a 2 minute sleep between each iteration. export const options = { scenarios: { constant_request_rate: { executor: 'constant-arrival-rate', rate: 1, timeUnit: '1s', duration: '5m', preAllocatedVUs: 10, maxVUs: 50 } } }; export default function () { // Add your MR study store request logic here // For example: // http.post('http://your-orthanc-instance/studies'); sleep(120); // Sleep for 2 minutes } ``` -------------------------------- ### k6 DICOM Peak and Average Load Script Example Source: https://github.com/project-monai/monai-deploy/blob/main/performance-testing/README.md An example JavaScript script for k6 designed to send study store requests for CT, MR, US, and RF modalities. The load is based on a configuration file, allowing for flexible testing of peak and average load scenarios. ```javascript // dicom_peak_avg.js // Sends CT, MR, US and RF study store requests based on the configuration. import http from 'k6/http'; import { sleep } from 'k6'; // Load configuration from a file (e.g., config/peakAvgConfig.json) // const config = JSON.parse(open('./config/peakAvgConfig.json')); export const options = { // Define your load testing options here, e.g., stages for ramp-up/down stages: [ { duration: '1m', target: 20 }, { duration: '3m', target: 20 }, { duration: '1m', target: 0 }, ], }; export default function () { // Example: Send a request for a CT study // http.post('http://your-orthanc-instance/studies', JSON.stringify({ modality: 'CT' })); // sleep(1); // Example: Send a request for an MR study // http.post('http://your-orthanc-instance/studies', JSON.stringify({ modality: 'MR' })); // sleep(1); // Add logic for US and RF studies as well sleep(1); // Short sleep between requests } ``` -------------------------------- ### Start and Stop MONAI Deploy Express with ELK Stack using Docker Compose Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/monai-deploy-express/README.md Commands to launch MONAI Deploy Express along with the ELK (Elasticsearch-Logstash-Kibana) stack. Requires running an initialization script for volume mapping permissions on Linux before starting the services. Services can be run in detached mode, and logs can be viewed. ```bash ./init.sh # required to setup Elastic volume mapping permissions on Linux docker compose --profile elk up # start MONAI Deploy Express & ELK docker compose --profile elk up -d # or run detached docker compose logs -t -f # view output from all containers docker compose --profile elk down # stop all services ``` -------------------------------- ### Create Hello World Argo Template Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/helm-charts/docs/02.RegisterWorkflows.md This command creates the 'Hello World' workflow template using the Argo CLI. It takes the YAML definition file as input and registers it with the Argo workflow system. No specific dependencies are mentioned beyond the Argo CLI being installed and configured. ```bash $ argo template create ./files/sample-workflows/hello-world-argo-template.yml Name: hello-world-template Namespace: default Created: Tue Sep 05 09:47:50 -0700 (now) ``` -------------------------------- ### Uninstall Kubernetes Components (K8s) Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/helm-charts/docs/04.Uninstallation.md Provides instructions for uninstalling standard Kubernetes (K8s) components. This involves deleting the 'local-path' StorageClass, draining nodes, resetting the kubeadm configuration, and cleaning up user kubeconfig files. ```bash kubectl delete StorageClass local-path kubectl drain $(kubectl get node -o name) sudo kubeadm reset sudo rm -rf ~/.kube ``` -------------------------------- ### Clinical Workflow Example Configuration Source: https://github.com/project-monai/monai-deploy/blob/main/performance-testing/README.md A YAML-like configuration defining a clinical workflow for MONAI Deploy. It specifies a router task that directs incoming studies (CT, MR, US, RF) to corresponding Argo workflows (large-model, medium-model, small-model) based on the study type. ```yaml AET: MONAI Tasks [ { name: router type: router task-destinations{ if CT run ct-argo if MR run mr-argo if US run us-argo if RF run rf-argo } }, { name: ct-argo type: argo args{ argo-template: large-model } }, { name: mr-argo type: argo args{ argo-template: medium-model } }, { name: us-argo type: argo args{ argo-template: medium-model } } { name: rf-argo type: argo args{ argo-template: small-model } } ] ``` -------------------------------- ### Uninstall Kubernetes Components (k3s) Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/helm-charts/docs/04.Uninstallation.md This section details the uninstallation of Kubernetes components specifically for k3s. It includes deleting the 'local-path' StorageClass, running the k3s uninstallation script, and removing Kubernetes configuration files. ```bash kubectl delete StorageClass local-path /usr/local/bin/k3s-uninstall.sh sudo rm -rf ~/.kube ``` -------------------------------- ### Remove Local Path Storage Class (Bash) Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/helm-charts/docs/01.installation.md Deletes the default 'local-path' StorageClass, which might be present from previous installations. This is often a necessary step before installing MONAI Deploy to avoid conflicts. ```bash kubectl delete StorageClass local-path ``` -------------------------------- ### Build and Run dotnet-performance-app as Docker Image Source: https://github.com/project-monai/monai-deploy/blob/main/performance-testing/dotnet-performance-app/README.md Steps to build a Docker image for the dotnet-performance-app and run it as a container. This includes building the image and then launching the container with specific environment variables to configure its connection to an Informatics Gateway. ```bash cd performance-testing/dotnet-performance-app docker build -t dotnet-performance-app . docker run -it --rm -p 5000:80 -p 5001:443 -e InformaticsGateway__Host={host} -e InformaticsGateway__Port={port} -e InformaticsGateway__StowPort={stowport} -e InformaticsGateway__StowUser={stowuser} -e InformaticsGateway__StowPassword={stowpassword} -e InformaticsGateway__StowWorkflowId={stowworkflowid} dotnet-performance-app ``` -------------------------------- ### Build dotnet-performance-app Locally Source: https://github.com/project-monai/monai-deploy/blob/main/performance-testing/dotnet-performance-app/README.md Instructions for building the dotnet-performance-app locally using the .NET CLI. This involves navigating to the application directory and executing the 'dotnet build' command. ```bash cd performance-testing/dotnet-performance-app dotnet build ``` -------------------------------- ### Configure Kubernetes API Server Port Range (Bash) Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/helm-charts/docs/01.installation.md Modifies the kube-apiserver manifest to update the service node port range. This is necessary to use non-standard ports like the default DIMSE port 104. ```bash sudo nano /etc/kubernetes/manifests/kube-apiserver.yaml # Insert, --service-node-port-range=104-32767 under spec.containers.command and wait for K8s to restart. ``` -------------------------------- ### Uninstall MONAI Deploy Helm Chart Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/helm-charts/docs/04.Uninstallation.md Removes the MONAI Deploy application deployed via Helm. This command targets the Helm release named 'monai-deploy'. Ensure you have Helm installed and configured to access your cluster. ```bash helm uninstall monai-deploy ``` -------------------------------- ### Hello World Workflow Registration Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/helm-charts/docs/02.RegisterWorkflows.md This section details the steps to register the 'Hello World' sample workflow. It includes creating the Argo template and submitting the workflow definition using a curl command. ```APIDOC ## Hello World Workflow Registration ### Create Argo Template This command creates the Argo template for the 'Hello World' workflow. ```bash argo template create ./files/sample-workflows/hello-world-argo-template.yml ``` ### Submit Workflow Definition This command submits the 'Hello World' workflow definition to the MONAI Workload Manager (MWM) API. Ensure `server_url` and `namespace` in `hello-world.json` are correctly configured. ```bash MWM_API_IP=$(kubectl get services/mwm -o jsonpath="{.spec.clusterIP}") MWM_API_PORT=$(kubectl get -o jsonpath="{.spec.ports[0].port}" services mwm) curl --request POST --header 'Content-Type: application/json' --data "@files/sample-workflows/hello-world.json" http://${MWM_API_IP}:${MWM_API_PORT}/workflows | jq ``` #### Success Response (200) - **workflow_id** (string) - The unique identifier for the submitted workflow. #### Response Example ```json { "workflow_id": "a25a43cb-b586-45b4-9c27-25e53e1570a2" } ``` ``` -------------------------------- ### Submit Hello World Workflow Definition Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/helm-charts/docs/02.RegisterWorkflows.md This command submits the 'Hello World' workflow definition to the MONAI Deploy Workload Manager (MWM) API. It requires kubectl to retrieve the MWM service IP and port, and then uses curl to send a POST request with the workflow JSON data. The output includes a `workflow_id` upon successful submission. ```bash # Submit the workflow definition MWM_API_IP=$(kubectl get services/mwm -o jsonpath="{.spec.clusterIP}") MWM_API_PORT=$(kubectl get -o jsonpath="{.spec.ports[0].port}" services mwm) curl --request POST --header 'Content-Type: application/json' --data "@files/sample-workflows/hello-world.json" http://${MWM_API_IP}:${MWM_API_PORT}/workflows | jq # `workflow_id` printed with a successful API call. { "workflow_id": "a25a43cb-b586-45b4-9c27-25e53e1570a2" } ``` -------------------------------- ### Kubernetes Deployment with Helm Source: https://context7.com/project-monai/monai-deploy/llms.txt Instructions for deploying MONAI Deploy to a Kubernetes cluster using Helm charts. ```APIDOC ## Kubernetes Deployment with Helm Charts ### Description Deploy MONAI Deploy to production environments using Helm charts on Kubernetes. ### Prerequisites **Install Kubernetes prerequisites:** ```bash sudo apt-get install -y apt-transport-https curl jq kubelet kubectl kubeadm ``` **Install Helm:** ```bash curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash ``` ### Install Argo CLI ```bash curl -sLO https://github.com/argoproj/argo-workflows/releases/download/v3.4.11/argo-linux-amd64.gz gunzip argo-linux-amd64.gz && chmod +x argo-linux-amd64 sudo mv ./argo-linux-amd64 /usr/local/bin/argo ``` ### Deploy MONAI Deploy **Build Helm dependencies:** ```bash helm dependency build ``` **Install MONAI Deploy Helm charts:** ```bash helm upgrade -i monai-deploy . ``` **Install in a custom namespace:** ```bash helm upgrade -i monai-deploy -n my-namespace . ``` ### Check Deployment Status **Check Pods:** ```bash kubectl get pods ``` **Check Services:** ```bash kubectl get services ``` ``` -------------------------------- ### Workflow Manager API - Get Workflow Details Source: https://context7.com/project-monai/monai-deploy/llms.txt Retrieve detailed information about a specific registered workflow using its ID. ```APIDOC ## GET /workflows/{workflow_id} ### Description Get specific details of a registered workflow by its ID. ### Method GET ### Endpoint http://localhost:5001/workflows/{workflow_id} ### Parameters #### Path Parameters - **workflow_id** (string) - Required - The unique identifier of the workflow to retrieve. ### Response #### Success Response (200) - **workflow_id** (string) - The unique identifier of the workflow. - **name** (string) - The name of the workflow. - **version** (string) - The version of the workflow. - **description** (string) - A description of the workflow. - **tasks** (array) - An array of task definitions within the workflow. #### Response Example ```json { "workflow_id": "849d4683-006b-410c-aa17-d0474ee26b7b", "name": "AI Liver Segmentation", "version": "1.0.0", "description": "AI Liver Segmentation", "informatics_gateway": { "ae_title": "MONAI-DEPLOY", "data_origins": ["ORTHANC"], "export_destinations": ["ORTHANC"] }, "tasks": [ { "id": "router", "description": "Route based on series description", "type": "router", "task_destinations": [ { "name": "liver", "conditions": ["{{ context.dicom.series.any('0008','103E')}}" == 'CT series for liver tumor from nii 014'] } ] }, { "id": "liver", "description": "Execute Liver Segmentation MAP", "type": "docker", "args": { "container_image": "ghcr.io/mmelqin/monai_ai_livertumor_seg_app:1.0", "server_url": "unix:///var/run/docker.sock", "entrypoint": "/bin/bash,-c", "command": "python3 -u /opt/monai/app/app.py", "task_timeout_minutes": "5", "temp_storage_container_path": "/var/lib/mde/", "env_MONAI_INPUTPATH": "/var/monai/input/", "env_MONAI_OUTPUTPATH": "/var/monai/output/", "env_MONAI_MODELPATH": "/opt/monai/models/", "env_MONAI_WORKDIR": "/var/monai/" }, "artifacts": { "input": [{"name": "env_MONAI_INPUTPATH", "value": "{{ context.input.dicom }}"}], "output": [{"name": "env_MONAI_OUTPUTPATH", "mandatory": true}] }, "task_destinations": [{"name": "export-liver-seg"}] }, { "id": "export-liver-seg", "description": "Export Segmentation Storage Object", "type": "export", "export_destinations": [{"Name": "ORTHANC"}], "artifacts": { "input": [ { "name": "export-dicom", "value": "{{ context.executions.liver.artifacts.env_MONAI_OUTPUTPATH }}", "mandatory": true } ], "output": [] } } ] } ``` ``` -------------------------------- ### Run .NET Performance App as Docker Image Source: https://github.com/project-monai/monai-deploy/blob/main/performance-testing/README.md Builds and runs the dotnet-performance-app as a Docker image. This command first builds the Docker image and then runs it as a container, exposing ports 5000 and 5001 for HTTP and HTTPS traffic respectively. The InformaticsGateway__Host environment variable needs to be set to the host where MIG is running. ```bash docker build -t dotnet-performance-app . docker run -it --rm -p 5000:80 -p 5001:443 -e InformaticsGateway__Host={host} dotnet-performance-app ``` -------------------------------- ### Uninstall Kubernetes Tools (Debian/Ubuntu) Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/helm-charts/docs/04.Uninstallation.md Removes Kubernetes-related packages from Debian/Ubuntu-based systems using apt-get. This command purges packages like kubeadm, kubectl, and kubelet, followed by an autoremove to clean up dependencies. ```bash sudo apt-get purge -y kubeadm kubectl kubelet kubernetes-cni kube* sudo apt-get autoremove -y ``` -------------------------------- ### Register and Manage Workflows with Workflow Manager API Source: https://context7.com/project-monai/monai-deploy/llms.txt This snippet shows how to interact with the Workflow Manager API to register new clinical AI workflows, list existing workflows, and retrieve details of a specific workflow. It uses `curl` commands for POST and GET requests. ```bash # Register a workflow definition curl --request POST \ --header 'Content-Type: application/json' \ --data "@sample-workflows/liver-seg.json" \ http://localhost:5001/workflows # Expected response {"workflow_id":"849d4683-006b-410c-aa17-d0474ee26b7b"} # List all registered workflows curl --request GET http://localhost:5001/workflows # Get specific workflow details curl --request GET http://localhost:5001/workflows/849d4683-006b-410c-aa17-d0474ee26b7b ``` -------------------------------- ### DICOM Upload using storescu Command Source: https://github.com/project-monai/monai-deploy/blob/main/deploy/monai-deploy-express/README.md Demonstrates how to upload DICOM files to an Orthanc server using the 'storescu' command from the dcmtk toolkit. This is an alternative method to the web UI for data ingestion. ```bash storescu -v +r +sd -aec ORTHANC localhost 4242 /path/to/my/unzipped/dicom/files/* ```