Skip to content

Commit

Permalink
feat: add commented translate code for when required
Browse files Browse the repository at this point in the history
  • Loading branch information
MDavidson17 committed Aug 9, 2023
1 parent 04675a8 commit 2fed161
Showing 1 changed file with 47 additions and 4 deletions.
51 changes: 47 additions & 4 deletions workflows/imagery/standardising.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
apiVersion: argoproj.io/v1alpha1
kind: WorkflowTemplate
metadata:
name: imagery-standardising
name: imagery-standarding
namespace: argo
spec:
parallelism: 50
Expand Down Expand Up @@ -212,6 +212,17 @@ spec:
tasks:
- name: generate-ulid
template: generate-ulid

# uncomment when needing to translate ascii files
# - name: convert-asc-files
# template: convert-asc-files
# arguments:
# parameters:
# - name: source
# value: "{{=sprig.trim(workflow.parameters.source)}}"
# - name: target
# value: "{{tasks.get-location.outputs.parameters.location}}translated-asc-files/"
# depends: "get-location"
- name: tile-index-validate
templateRef:
name: tpl-at-tile-index-validate
Expand All @@ -224,6 +235,8 @@ spec:
value: "{{workflow.parameters.include}}"
- name: source
value: "{{=sprig.trim(workflow.parameters.source)}}"
# switch to when needing to translate ascii files
# value: "{{tasks.get-location.outputs.parameters.location}}translated-asc-files/"
- name: source_epsg
value: "{{=sprig.trim(workflow.parameters['source-epsg'])}}"
- name: validate
Expand All @@ -232,6 +245,8 @@ spec:
value: "{{= workflow.parameters.retile}}"
- name: version
value: "{{= workflow.parameters['version-argo-tasks']}}"
# uncomment when needing to translate ascii files
# depends: "convert-asc-files"

- name: group
templateRef:
Expand Down Expand Up @@ -316,7 +331,7 @@ spec:

- name: generate-ulid
script:
image: "019359803926.dkr.ecr.ap-southeast-2.amazonaws.com/eks:topo-imagery-{{=sprig.trim(workflow.parameters['version-topo-imagery'])}}"
image: "ghcr.io/mdavidson17/topo-imagery:latest"
command: [python]
source: |
import ulid
Expand All @@ -328,6 +343,34 @@ spec:
valueFrom:
path: "/tmp/ulid"

- name: convert-asc-files
retryStrategy:
limit: "2"
nodeSelector:
karpenter.sh/capacity-type: "spot"
inputs:
parameters:
- name: source
- name: target
container:
image: "ghcr.io/mdavidson17/topo-imagery:latest"
resources:
requests:
memory: 7.8Gi
cpu: 15000m
ephemeral-storage: 3Gi
volumeMounts:
- name: ephemeral
mountPath: "/tmp"
command:
- python
- "/app/scripts/translate_ascii.py"
args:
- "--source"
- "{{inputs.parameters.source}}"
- "--target"
- "{{inputs.parameters.target}}"

- name: standardise-validate
retryStrategy:
limit: "2"
Expand All @@ -342,7 +385,7 @@ spec:
- name: group_data
path: /tmp/input/
container:
image: "019359803926.dkr.ecr.ap-southeast-2.amazonaws.com/eks:topo-imagery-{{=sprig.trim(workflow.parameters['version-topo-imagery'])}}"
image: "ghcr.io/mdavidson17/topo-imagery:latest"
resources:
requests:
memory: 7.8Gi
Expand Down Expand Up @@ -384,7 +427,7 @@ spec:
- name: collection-id
- name: location
container:
image: "019359803926.dkr.ecr.ap-southeast-2.amazonaws.com/eks:topo-imagery-{{=sprig.trim(workflow.parameters['version-topo-imagery'])}}"
image: "ghcr.io/mdavidson17/topo-imagery:latest"
resources:
requests:
memory: 7.8Gi
Expand Down

0 comments on commit 2fed161

Please sign in to comment.