Skip to content

Commit

Permalink
Add AI4EOSC OKD app
Browse files Browse the repository at this point in the history
  • Loading branch information
micafer committed Nov 7, 2024
1 parent 9ea14f1 commit 302da67
Showing 1 changed file with 62 additions and 0 deletions.
62 changes: 62 additions & 0 deletions templates/ai4eosc_app.yaml
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 ] }

0 comments on commit 302da67

Please sign in to comment.