clearml-agent

by ClearML

Helm chartv5.3.3App 1.24Apache-2.0Verified publisher

MLOps platform Task running agent

About this chart

ClearML Kubernetes Agent

MLOps platform Task running agent

Homepage: https://clear.ml

Maintainers

NameEmailUrl
filippo-clearmlhttps://github.com/filippo-clearml

Introduction

The clearml-agent is the Kubernetes agent for for ClearML. It allows you to schedule distributed experiments on a Kubernetes cluster.

Add to local Helm repository

To add this chart to your local Helm repository:

helm repo add clearml https://clearml.github.io/clearml-helm-charts

Upgrading Chart

Upgrades/ Values upgrades

Updating to latest version of this chart can be done in two steps:

helm repo update
helm upgrade clearml-agent clearml/clearml-agent

Changing values on existing installation can be done with:

helm upgrade clearml-agent clearml/clearml-agent --version <CURRENT CHART VERSION> -f custom_values.yaml

Major upgrade from 3.* to 4.*

Before issuing helm upgrade:

  • if using securityContexts check for new value form in values.yaml (podSecurityContext and containerSecurityContext)

Source Code

Requirements

Kubernetes: >= 1.21.0-0

Values

KeyTypeDefaultDescription
agentk8sglueobject{"additionalClusterRoleBindings":[],"additionalRoleBindings":[],"affinity":{},"annotations":{},"apiServerUrlReference":"https://api.clear.ml","basePodTemplate":{"affinity":{},"annotations":{},"containerSecurityContext":{},"env":[],"fileMounts":[],"hostAliases":[],"initContainers":[],"labels":{},"nodeSelector":{},"podSecurityContext":{},"priorityClassName":"","resources":{},"schedulerName":"","tolerations":[],"volumeMounts":[],"volumes":[]},"clearmlcheckCertificate":true,"containerSecurityContext":{},"createQueueIfNotExists":false,"defaultContainerImage":"ubuntu:18.04","extraEnvs":[],"fileMounts":[],"fileServerUrlReference":"https://files.clear.ml","image":{"registry":"","repository":"allegroai/clearml-agent-k8s-base","tag":"1.24-21"},"initContainers":{"resources":{}},"labels":{},"nodeSelector":{},"podSecurityContext":{},"queue":"default","replicaCount":1,"resources":{},"serviceAccountAnnotations":{},"serviceExistingAccountName":"","tolerations":[],"volumeMounts":[],"volumes":[],"webServerUrlReference":"https://app.clear.ml"}This agent will spawn queued experiments in new pods, a good use case is to combine this with GPU autoscaling nodes. https://github.com/clearml/clearml-agent/tree/master/docker/k8s-glue
agentk8sglue.additionalClusterRoleBindingslist[]additional existing ClusterRoleBindings
agentk8sglue.additionalRoleBindingslist[]additional existing RoleBindings
agentk8sglue.affinityobject{}affinity setup for Agent pod (example in values.yaml comments)
agentk8sglue.annotationsobject{}annotations setup for Agent pod (example in values.yaml comments)
agentk8sglue.apiServerUrlReferencestring"https://api.clear.ml"Reference to Api server url
agentk8sglue.basePodTemplateobject{"affinity":{},"annotations":{},"containerSecurityContext":{},"env":[],"fileMounts":[],"hostAliases":[],"initContainers":[],"labels":{},"nodeSelector":{},"podSecurityContext":{},"priorityClassName":"","resources":{},"schedulerName":"","tolerations":[],"volumeMounts":[],"volumes":[]}base template for pods spawned to consume ClearML Task
agentk8sglue.basePodTemplate.affinityobject{}affinity setup for pods spawned to consume ClearML Task
agentk8sglue.basePodTemplate.annotationsobject{}annotations setup for pods spawned to consume ClearML Task (example in values.yaml comments)
agentk8sglue.basePodTemplate.containerSecurityContextobject{}securityContext setup for containers spawned to consume ClearML Task (example in values.yaml comments)
agentk8sglue.basePodTemplate.envlist[]environment variables for pods spawned to consume ClearML Task (example in values.yaml comments)
agentk8sglue.basePodTemplate.fileMountslist[]file definition for pods spawned to consume ClearML Task (example in values.yaml comments)
agentk8sglue.basePodTemplate.hostAliaseslist[]hostAliases setup for pods spawned to consume ClearML Task (example in values.yaml comments)
agentk8sglue.basePodTemplate.initContainerslist[]initContainers definition for pods spawned to consume ClearML Task (example in values.yaml comments)
agentk8sglue.basePodTemplate.labelsobject{}labels setup for pods spawned to consume ClearML Task (example in values.yaml comments)
agentk8sglue.basePodTemplate.nodeSelectorobject{}nodeSelector setup for pods spawned to consume ClearML Task (example in values.yaml comments)
agentk8sglue.basePodTemplate.podSecurityContextobject{}securityContext setup for pods spawned to consume ClearML Task (example in values.yaml comments)
agentk8sglue.basePodTemplate.priorityClassNamestring""priorityClassName setup for pods spawned to consume ClearML Task
agentk8sglue.basePodTemplate.resourcesobject{}resources declaration for pods spawned to consume ClearML Task (example in values.yaml comments)
agentk8sglue.basePodTemplate.schedulerNamestring""schedulerName setup for pods spawned to consume ClearML Task
agentk8sglue.basePodTemplate.tolerationslist[]tolerations setup for pods spawned to consume ClearML Task (example in values.yaml comments)
agentk8sglue.basePodTemplate.volumeMountslist[]volume mounts definition for pods spawned to consume ClearML Task (example in values.yaml comments)
agentk8sglue.basePodTemplate.volumeslist[]volumes definition for pods spawned to consume ClearML Task (example in values.yaml comments)
agentk8sglue.clearmlcheckCertificatebooltrueCheck certificates validity for evefry UrlReference below.
agentk8sglue.containerSecurityContextobject{}container securityContext setup for Agent pod (example in values.yaml comments)
agentk8sglue.createQueueIfNotExistsboolfalseif ClearML queue does not exist, it will be create it if the value is set to true
agentk8sglue.defaultContainerImagestring"ubuntu:18.04"default container image for ClearML Task pod
agentk8sglue.extraEnvslist[]Extra Environment variables for Glue Agent
agentk8sglue.fileMountslist[]file definition for Glue Agent (example in values.yaml comments)
agentk8sglue.fileServerUrlReferencestring"https://files.clear.ml"Reference to File server url
agentk8sglue.imageobject{"registry":"","repository":"allegroai/clearml-agent-k8s-base","tag":"1.24-21"}Glue Agent image configuration
agentk8sglue.initContainersobject{"resources":{}}Glue Agent pod initContainers configs
agentk8sglue.initContainers.resourcesobject{}Glue Agent initcontainers pod resources
agentk8sglue.labelsobject{}labels setup for Agent pod (example in values.yaml comments)
agentk8sglue.nodeSelectorobject{}nodeSelector setup for Agent pod (example in values.yaml comments)
agentk8sglue.podSecurityContextobject{}container securityContext setup for Agent pod (example in values.yaml comments)
agentk8sglue.queuestring"default"ClearML queue this agent will consume. Multiple queues can be specified with the following format: queue1,queue2,queue3
agentk8sglue.replicaCountint1Glue Agent number of pods
agentk8sglue.resourcesobject{}Glue Agent pod resources
agentk8sglue.serviceAccountAnnotationsobject{}Add the provided map to the annotations for the ServiceAccount resource created by this chart
agentk8sglue.serviceExistingAccountNamestring""If set, do not create a serviceAccountName and use the existing one with the provided name
agentk8sglue.tolerationslist[]tolerations setup for Agent pod (example in values.yaml comments)
agentk8sglue.volumeMountslist[]volume mounts definition for Glue Agent (example in values.yaml comments)
agentk8sglue.volumeslist[]volumes definition for Glue Agent (example in values.yaml comments)
agentk8sglue.webServerUrlReferencestring"https://app.clear.ml"Reference to Web server url
clearmlobject{"agentk8sglueKey":"ACCESSKEY","agentk8sglueSecret":"SECRETKEY","clearmlConfig":"sdk {\n}","existingAgentk8sglueSecret":"","existingClearmlConfigSecret":""}ClearMl generic configurations
clearml.agentk8sglueKeystring"ACCESSKEY"Agent k8s Glue basic auth key
clearml.agentk8sglueSecretstring"SECRETKEY"Agent k8s Glue basic auth secret
clearml.clearmlConfigstring"sdk {\n}"ClearML configuration file
clearml.existingAgentk8sglueSecretstring""If this is set, chart will not generate a secret but will use what is defined here
clearml.existingClearmlConfigSecretstring""If this is set, chart will not generate a secret but will use what is defined here
globalobject{"imageRegistry":"docker.io"}Global parameters section
global.imageRegistrystring"docker.io"Images registry
imageCredentialsobject{"email":"[email protected]","enabled":false,"existingSecret":"","password":"pwd","registry":"docker.io","username":"someone"}Private image registry configuration
imageCredentials.emailstring"[email protected]"Email
imageCredentials.enabledboolfalseUse private authentication mode
imageCredentials.existingSecretstring""If this is set, chart will not generate a secret but will use what is defined here
imageCredentials.passwordstring"pwd"Registry password
imageCredentials.registrystring"docker.io"Registry name
imageCredentials.usernamestring"someone"Registry username
sessionsobject{"externalIP":"0.0.0.0","maxServices":20,"portModeEnabled":false,"startingPort":30000,"svcAnnotations":{},"svcType":"NodePort"}Sessions internal service configuration
sessions.externalIPstring"0.0.0.0"External IP sessions clients can connect to
sessions.maxServicesint20maximum number of NodePorts exposed
sessions.portModeEnabledboolfalseEnable/Disable sessions portmode WARNING: only one Agent deployment can have this set to true
sessions.startingPortint30000starting range of exposed NodePorts
sessions.svcAnnotationsobject{}specific annotations for session services
sessions.svcTypestring"NodePort"service type ("NodePort" or "ClusterIP" or "LoadBalancer")

Deploy clearml-agent with OpenTenant

Each tenant gets its own release of this chart, with its own namespace, secrets and domain. The builder below already has clearml-agent on a Hetzner server. Change the host, add apps from the marketplace, then copy the generated files. Providers and prices are samples, and nothing here is sent anywhere.

  1. Pick a serverConnect Hetzner, OVHcloud or AWS. The builder starts on Hetzner, the cheapest sample rate.
  2. Place the chartclearml-agent is pinned at v5.3.3 in opentenant.yaml. Drag more apps from the marketplace onto a rack.
  3. ApplySave opentenant.yaml and main.tf from the console, then run the commands below.
# opentenant.yaml, main.tf and dns.tf come from the builder below
opentenant validate opentenant.yaml
terraform init && terraform apply