forked from aws-deadline/deadline-cloud-samples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate.yaml
More file actions
117 lines (109 loc) · 3.05 KB
/
Copy pathtemplate.yaml
File metadata and controls
117 lines (109 loc) · 3.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
specificationVersion: 'jobtemplate-2023-09'
name: Satellite Imagery Classification - Grand Canyon
description: |
Classifies Sentinel-2 satellite tiles into 5 land-cover classes
(Water, Vegetation, Bare Soil, Rock, Cloud/Snow) using spectral
index thresholds (NDVI, NDWI, BSI). Each tile is processed as an
independent parallel task, followed by a mosaic assembly step.
parameterDefinitions:
- name: TilesDir
type: PATH
objectType: DIRECTORY
dataFlow: IN
default: sample_tiles
description: "Directory containing input Sentinel-2 GeoTIFF tiles (4-band: Red, Green, Blue, NIR)."
userInterface:
control: CHOOSE_DIRECTORY
label: Input Tiles Directory
groupLabel: Input / Output
- name: OutputDir
type: PATH
objectType: DIRECTORY
dataFlow: OUT
default: output
description: "Directory where classified GeoTIFFs, PNGs, and final mosaic will be written."
userInterface:
control: CHOOSE_DIRECTORY
label: Output Directory
groupLabel: Input / Output
- name: ScriptsDir
type: PATH
objectType: DIRECTORY
dataFlow: IN
default: scripts
description: "Directory containing the bundled Python scripts."
userInterface:
control: HIDDEN
- name: SampleTilesUrl
type: STRING
default: "https://downloads.deadlinecloud.amazonaws.com/samples/satellite-classification-tiles"
description: "Base URL for downloading sample tiles. Only used when TilesDir is the default."
userInterface:
control: HIDDEN
- name: CondaPackages
type: STRING
default: "python numpy rasterio matplotlib"
description: "Packages to install via the queue's Conda environment."
userInterface:
control: LINE_EDIT
label: Conda Packages
groupLabel: Software Environment
- name: CondaChannels
type: STRING
default: "conda-forge"
description: "Conda channels to resolve packages from."
userInterface:
control: LINE_EDIT
label: Conda Channels
groupLabel: Software Environment
steps:
- name: ClassifyTiles
hostRequirements:
amounts:
- name: amount.worker.vcpu
min: 2
- name: amount.worker.memory
min: 4096
attributes:
- name: attr.worker.os.family
anyOf: ["linux"]
parameterSpace:
taskParameterDefinitions:
- name: TileFile
type: STRING
range:
- T12S_GC_North_Rim
- T12S_GC_South_Rim
- T12S_GC_Inner_Canyon
- T12S_GC_Desert_East
- T12S_GC_River_West
script:
actions:
onRun:
command: python
args:
- "{{Param.ScriptsDir}}/run_classify_tile.py"
- "{{Task.Param.TileFile}}"
- "{{Param.SampleTilesUrl}}"
- "{{Param.TilesDir}}"
- "{{Param.OutputDir}}"
- "{{Param.ScriptsDir}}"
- name: MosaicResults
dependencies:
- dependsOn: ClassifyTiles
hostRequirements:
amounts:
- name: amount.worker.vcpu
min: 2
- name: amount.worker.memory
min: 4096
attributes:
- name: attr.worker.os.family
anyOf: ["linux"]
script:
actions:
onRun:
command: python
args:
- "{{Param.ScriptsDir}}/mosaic.py"
- "{{Param.OutputDir}}"