Skip to content

Commit

Permalink
Merge pull request #18 from GSTT-CSC/aide-workflows
Browse files Browse the repository at this point in the history
Adds Clinical Workflow and Argo Workflow files for running on AIDE
  • Loading branch information
tomaroberts authored Feb 15, 2023
2 parents 2eb8af3 + 277e68b commit 917b193
Show file tree
Hide file tree
Showing 6 changed files with 347 additions and 0 deletions.
55 changes: 55 additions & 0 deletions app/workflows/totalsegmentator-argo-template-dgx.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
metadata:
name: totalsegmentator-argo-template
generateName: totalsegmentator-argo-template-
namespace: argo
spec:
templates:
- name: totalsegmentator
inputs:
artifacts:
- name: input-dicom
path: /var/monai/input
s3:
accessKeySecret:
name: my-minio-cred
key: accesskey
secretKeySecret:
name: my-minio-cred
key: secretkey
key: argo/inputs/artifacts/input-dicom
outputs:
artifacts:
- name: output
path: /var/monai/output
s3:
bucket: bucket1
accessKeySecret:
name: my-minio-cred
key: accesskey
secretKeySecret:
name: my-minio-cred
key: secretkey
key: /var/monai/output
metadata: {}
container:
name: ''
image: ghcr.io/gstt-csc/totalsegmentator-aide/map:0.1.2
command:
- /bin/bash
- '-c'
args:
- python3 -u /opt/monai/app/app.py
resources:
limits:
cpu: '20'
memory: 128Gi
nvidia.com/gpu: '1'
requests:
cpu: '0'
memory: '0'
nvidia.com/gpu: '1'
imagePullPolicy: IfNotPresent
podSpecPatch: >-
{"initContainers":[{"name":"init","resources":{"limits":{"cpu":"1","memory":"1000Mi"},"requests":{"cpu":"0","memory":"0Mi"}}}],"containers":[{"name":"wait","resources":{"limits":{"cpu":"1","memory":"1000Mi"},"requests":{"cpu":"0","memory":"0Mi"}}}]}
entrypoint: totalsegmentator
arguments: {}
55 changes: 55 additions & 0 deletions app/workflows/totalsegmentator-argo-template-high-resource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
metadata:
name: totalsegmentator-argo-template
generateName: totalsegmentator-argo-template-
namespace: argo
spec:
templates:
- name: totalsegmentator
inputs:
artifacts:
- name: input-dicom
path: /var/monai/input
s3:
accessKeySecret:
name: my-minio-cred
key: accesskey
secretKeySecret:
name: my-minio-cred
key: secretkey
key: argo/inputs/artifacts/input-dicom
outputs:
artifacts:
- name: output
path: /var/monai/output
s3:
bucket: bucket1
accessKeySecret:
name: my-minio-cred
key: accesskey
secretKeySecret:
name: my-minio-cred
key: secretkey
key: /var/monai/output
metadata: {}
container:
name: ''
image: ghcr.io/gstt-csc/totalsegmentator-aide/map:0.1.2
command:
- /bin/bash
- '-c'
args:
- python3 -u /opt/monai/app/app.py
resources:
limits:
cpu: '8'
memory: 64000Mi
nvidia.com/gpu: '1'
requests:
cpu: '0'
memory: '0'
nvidia.com/gpu: '1'
imagePullPolicy: IfNotPresent
podSpecPatch: >-
{"initContainers":[{"name":"init","resources":{"limits":{"cpu":"1","memory":"1000Mi"},"requests":{"cpu":"0","memory":"0Mi"}}}],"containers":[{"name":"wait","resources":{"limits":{"cpu":"1","memory":"1000Mi"},"requests":{"cpu":"0","memory":"0Mi"}}}]}
entrypoint: totalsegmentator
arguments: {}
55 changes: 55 additions & 0 deletions app/workflows/totalsegmentator-argo-template-low-resource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
metadata:
name: totalsegmentator-argo-template
generateName: totalsegmentator-argo-template-
namespace: argo
spec:
templates:
- name: totalsegmentator
inputs:
artifacts:
- name: input-dicom
path: /var/monai/input
s3:
accessKeySecret:
name: my-minio-cred
key: accesskey
secretKeySecret:
name: my-minio-cred
key: secretkey
key: argo/inputs/artifacts/input-dicom
outputs:
artifacts:
- name: output
path: /var/monai/output
s3:
bucket: bucket1
accessKeySecret:
name: my-minio-cred
key: accesskey
secretKeySecret:
name: my-minio-cred
key: secretkey
key: /var/monai/output
metadata: {}
container:
name: ''
image: ghcr.io/gstt-csc/totalsegmentator-aide/map:0.1.2
command:
- /bin/bash
- '-c'
args:
- python3 -u /opt/monai/app/app.py
resources:
limits:
cpu: '1'
memory: 8000Mi
nvidia.com/gpu: '1'
requests:
cpu: '0'
memory: '0'
nvidia.com/gpu: '1'
imagePullPolicy: IfNotPresent
podSpecPatch: >-
{"initContainers":[{"name":"init","resources":{"limits":{"cpu":"1","memory":"1000Mi"},"requests":{"cpu":"0","memory":"0Mi"}}}],"containers":[{"name":"wait","resources":{"limits":{"cpu":"1","memory":"1000Mi"},"requests":{"cpu":"0","memory":"0Mi"}}}]}
entrypoint: totalsegmentator
arguments: {}
55 changes: 55 additions & 0 deletions app/workflows/totalsegmentator-argo-template-med-resource.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
metadata:
name: totalsegmentator-argo-template
generateName: totalsegmentator-argo-template-
namespace: argo
spec:
templates:
- name: totalsegmentator
inputs:
artifacts:
- name: input-dicom
path: /var/monai/input
s3:
accessKeySecret:
name: my-minio-cred
key: accesskey
secretKeySecret:
name: my-minio-cred
key: secretkey
key: argo/inputs/artifacts/input-dicom
outputs:
artifacts:
- name: output
path: /var/monai/output
s3:
bucket: bucket1
accessKeySecret:
name: my-minio-cred
key: accesskey
secretKeySecret:
name: my-minio-cred
key: secretkey
key: /var/monai/output
metadata: {}
container:
name: ''
image: ghcr.io/gstt-csc/totalsegmentator-aide/map:0.1.2
command:
- /bin/bash
- '-c'
args:
- python3 -u /opt/monai/app/app.py
resources:
limits:
cpu: '4'
memory: 16000Mi
nvidia.com/gpu: '1'
requests:
cpu: '0'
memory: '0'
nvidia.com/gpu: '1'
imagePullPolicy: IfNotPresent
podSpecPatch: >-
{"initContainers":[{"name":"init","resources":{"limits":{"cpu":"1","memory":"1000Mi"},"requests":{"cpu":"0","memory":"0Mi"}}}],"containers":[{"name":"wait","resources":{"limits":{"cpu":"1","memory":"1000Mi"},"requests":{"cpu":"0","memory":"0Mi"}}}]}
entrypoint: totalsegmentator
arguments: {}
55 changes: 55 additions & 0 deletions app/workflows/totalsegmentator-argo-template.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
metadata:
name: totalsegmentator-argo-template
generateName: totalsegmentator-argo-template-
namespace: argo
spec:
templates:
- name: totalsegmentator
inputs:
artifacts:
- name: input-dicom
path: /var/monai/input
s3:
accessKeySecret:
name: my-minio-cred
key: accesskey
secretKeySecret:
name: my-minio-cred
key: secretkey
key: argo/inputs/artifacts/input-dicom
outputs:
artifacts:
- name: output
path: /var/monai/output
s3:
bucket: bucket1
accessKeySecret:
name: my-minio-cred
key: accesskey
secretKeySecret:
name: my-minio-cred
key: secretkey
key: /var/monai/output
metadata: {}
container:
name: ''
image: ghcr.io/gstt-csc/totalsegmentator-aide/map:0.1.2
command:
- /bin/bash
- '-c'
args:
- python3 -u /opt/monai/app/app.py
resources:
limits:
cpu: '20'
memory: 128Gi
nvidia.com/gpu: '1'
requests:
cpu: '0'
memory: '0'
nvidia.com/gpu: '1'
imagePullPolicy: IfNotPresent
podSpecPatch: >-
{"initContainers":[{"name":"init","resources":{"limits":{"cpu":"1","memory":"1000Mi"},"requests":{"cpu":"0","memory":"0Mi"}}}],"containers":[{"name":"wait","resources":{"limits":{"cpu":"1","memory":"1000Mi"},"requests":{"cpu":"0","memory":"0Mi"}}}]}
entrypoint: totalsegmentator
arguments: {}
72 changes: 72 additions & 0 deletions app/workflows/totalsegmentator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{
"name": "TotalSegmentator",
"version": "0.1.2",
"description": "Clinical Workflow for TotalSegmentator",
"informatics_gateway": {
"ae_title": "MONAI",
"data_origins": [],
"export_destinations": [
"PACS"
]
},
"tasks": [
{
"id": "totalsegmentator-task",
"description": "TotalSegmentator automatic CT segmentation",
"type": "argo",
"args": {
"workflow_template_name": "totalsegmentator-argo-template",
"server_url": "http://argo-argo-workflows-server.argo:2746",
"namespace": "argo",
"allow_insecure": "true"
},
"task_destinations": [
{
"name": "export-rt-struct",
"conditions": []
}
],
"export_destinations": [],
"artifacts": {
"input": [
{
"name": "input-dicom",
"value": "{{ context.input.dicom }}",
"mandatory": true
}
],
"output": [
{
"name": "output",
"value": "",
"mandatory": true
}
]
},
"timeout_minutes": -1
},
{
"id": "export-rt-struct",
"description": "Export TotalSegmentator output RT Struct DICOMs",
"type": "export",
"args": {},
"task_destinations": [],
"export_destinations": [
{
"name": "PACS"
}
],
"artifacts": {
"input": [
{
"name": "output",
"value": "{{ context.executions.totalsegmentator-task.artifacts.output }}",
"mandatory": true
}
],
"output": []
},
"timeout_minutes": -1
}
]
}

0 comments on commit 917b193

Please sign in to comment.