Skip to content
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

wip: standardising DEMs workflow #135

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
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
102 changes: 102 additions & 0 deletions workflows/elevation/standardising.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: test-elevation-standardising
namespace: argo
spec:
parallelism: 50
nodeSelector:
karpenter.sh/capacity-type: "spot"
entrypoint: main
synchronization:
semaphore:
configMapKeyRef:
name: semaphores
key: standardising
arguments:
parameters:
- name: version-argo-tasks
value: "v2"
- name: version-topo-imagery
value: "v2"
- name: source
value: ""
- name: include
value: ".tiff?$"
- name: group
value: "50"
templateDefaults:
container:
imagePullPolicy: Always
templates:
- name: main
dag:
tasks:
- name: aws-list
template: aws-list
- name: standardise
template: standardise
arguments:
parameters:
- name: file
value: "{{item}}"
depends: "aws-list"
withParam: "{{tasks.aws-list.outputs.parameters.files}}"
- name: aws-list
container:
image: "019359803926.dkr.ecr.ap-southeast-2.amazonaws.com/eks:argo-tasks-{{=sprig.trim(workflow.parameters['version-argo-tasks'])}}"
command: [node, /app/index.js]
env:
- name: AWS_ROLE_CONFIG_PATH
value: s3://linz-bucket-config/config.json
args:
[
"list",
"--verbose",
"--include",
"{{=sprig.trim(workflow.parameters.include)}}",
"--group",
"{{=sprig.trim(workflow.parameters.group)}}",
"--output",
"/tmp/file_list.json",
"{{=sprig.trim(workflow.parameters.source)}}",
]
outputs:
parameters:
- name: files
valueFrom:
path: /tmp/file_list.json
- name: standardise
retryStrategy:
limit: "2"
nodeSelector:
karpenter.sh/capacity-type: "spot"
inputs:
parameters:
- name: file
container:
image: "ghcr.io/paulfouquet/topo-imagery-test:latest"
resources:
requests:
memory: 7.8Gi
cpu: 15000m
ephemeral-storage: 3Gi
volumeMounts:
- name: ephemeral
mountPath: "/tmp"
command:
- python
- "/app/scripts/elevation/standardising.py"
args:
- "--source"
- "{{inputs.parameters.file}}"
outputs:
artifacts:
- name: standardised_tiffs
path: /tmp/
archive:
none: {}
volumes:
- name: ephemeral
emptyDir: {}