-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
tosca_definitions_version: tosca_simple_yaml_1_0 | ||
|
||
imports: | ||
- grycap_custom_types: https://raw.githubusercontent.com/grycap/tosca/main/custom_types.yaml | ||
|
||
description: AI4EOSC Plants species classifier | ||
|
||
metadata: | ||
template_name: AI4EOSC Plants species classifier | ||
template_version: "1.0.0" | ||
template_author: Miguel Caballer | ||
|
||
topology_template: | ||
|
||
inputs: | ||
cpu: | ||
type: float | ||
description: Number of virtual cpus for the container | ||
default: 2.0 | ||
memory: | ||
type: scalar-unit.size | ||
description: Memory size for the container | ||
default: 4 GB | ||
|
||
ai4eosc_model_image: | ||
type: string | ||
description: Docker image of the model to be deployed | ||
default: ai4oshub/plants-classification | ||
required: yes | ||
|
||
endpoint: | ||
type: string | ||
description: DNS name to access the GeoServer instance | ||
default: https://plants-ai4eosc | ||
|
||
node_templates: | ||
|
||
ai4eosc_app: | ||
type: tosca.nodes.Container.Application.Docker | ||
requirements: | ||
- host: ai4eosc_runtime | ||
artifacts: | ||
my_image: | ||
file: { get_input: ai4eosc_model_image } | ||
type: tosca.artifacts.Deployment.Image.Container.Docker | ||
|
||
# The properties of the runtime to host the container | ||
ai4eosc_runtime: | ||
type: tosca.nodes.Container.Runtime.Docker | ||
capabilities: | ||
host: | ||
properties: | ||
num_cpus: { get_input: cpu } | ||
mem_size: { get_input: memory } | ||
publish_ports: | ||
- target: 5000 | ||
source: 32050 | ||
endpoint: { get_input: endpoint } | ||
|
||
outputs: | ||
geoserver_url: | ||
value: { get_attribute: [ ai4eosc_app, endpoints, 0 ] } |