For the complete documentation index, see llms.txt. This page is also available as Markdown.

Workload Templates

This set of endpoints manages workload templates used to define reusable workload configurations across various workload types in the NVIDIA Run:ai platform. Templates help standardize workload definitions for consistent submission and resource usage across projects and users.

List templates. [Experimental]

get

Retrieve all available templates.

Authorizations
AuthorizationstringRequired

Bearer authentication

Query parameters
offsetinteger · int32Optional

The offset of the first item returned in the collection.

Example: 100
limitinteger · int32 · min: 1 · max: 500Optional

The maximum number of entries to return.

Default: 50
sortOrderstring · enumOptional

Sort results in descending or ascending order.

Default: ascPossible values:
sortBystring · enumOptional

Sort results by parameter.

Possible values:
filterBystring[] · max: 10Optional

Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contain, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.

Example: ["name!=some-template-name","createdAt>=2021-01-01T00:00:00Z"]
searchstringOptional

Filter results by a free text search.

Example: test project
complyToProjectinteger · int32Optional

Include workload creation compliance information of an asset, for a given project, as part of the response. To check compliance, you need to provide both project id and workload type.

complyToWorkloadTypestring · enumOptional

Include workload creation compliance information of an asset, for a given workload type, as part of the response. To check compliance, you need to provide both project id and workload type.

Possible values:
complyToReplicaTypestring · enumOptional

Include workload creation compliance information of an asset, for a given replica type, as part of the response. To check compliance, you need to provide both project id and workload type. For distributed, replica type should be provided as well.

Possible values:
Responses
200

Executed successfully.

application/json
get/api/v1/workload-templates
GET /api/v1/workload-templates HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "entries": [
    {
      "meta": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "my-template-name",
        "description": "description of my template.",
        "workloadType": "Workspace",
        "scopeType": "system",
        "scopeId": "text",
        "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
        "departmentId": 2,
        "projectId": 1,
        "createdBy": "test@lab.com",
        "createdAt": "2022-01-01T03:49:52.531Z",
        "updatedBy": "test@lab.com",
        "updatedAt": "2022-01-01T03:49:52.531Z"
      }
    },
    {
      "runnable": {
        "isRunnable": false,
        "issue": "mandatory image is not provided"
      },
      "spec": {
        "leader": {
          "annotations": [
            {
              "name": "billing",
              "value": "my-billing-unit",
              "exclude": false
            }
          ],
          "args": "-x my-script.py",
          "command": "python",
          "compute": {
            "cpuCoreLimit": 2,
            "cpuCoreRequest": 0.5,
            "cpuMemoryLimit": "30M",
            "cpuMemoryRequest": "20M",
            "extendedResources": [
              {
                "resource": "hardware-vendor.example/foo",
                "quantity": 2,
                "exclude": false
              }
            ],
            "gpuDevicesRequest": 1,
            "gpuMemoryLimit": "10M",
            "gpuMemoryRequest": "10M",
            "gpuPortionLimit": 0.5,
            "gpuPortionRequest": 0.5,
            "gpuRequestType": "portion",
            "largeShmRequest": false
          },
          "createHomeDir": true,
          "environmentVariables": [
            {
              "name": "HOME",
              "value": "/home/my-folder",
              "secret": {
                "name": "postgress_secret",
                "key": "POSTGRES_PASSWORD"
              },
              "configMap": {
                "name": "my-config-map",
                "key": "MY_POSTGRES_SCHEMA"
              },
              "podFieldRef": {
                "path": "metadata.name"
              },
              "userCredential": {
                "name": "my_postgres_user_and_password",
                "key": "POSTGRES_PASSWORD"
              },
              "exclude": false,
              "description": "Home directory of the user."
            }
          ],
          "image": "python:3.8",
          "imagePullPolicy": "Always",
          "imagePullSecrets": [
            {
              "name": "text",
              "userCredential": true,
              "exclude": false
            }
          ],
          "labels": [
            {
              "name": "stage",
              "value": "initial-research",
              "exclude": false
            }
          ],
          "nodeAffinityRequired": {
            "nodeSelectorTerms": [
              {
                "matchExpressions": [
                  {
                    "key": "text",
                    "operator": "In",
                    "values": [
                      "text"
                    ]
                  }
                ]
              }
            ]
          },
          "nodeType": "my-node-type",
          "podAffinity": {
            "type": "Required",
            "key": "text"
          },
          "probes": {
            "readiness": {
              "initialDelaySeconds": 1,
              "periodSeconds": 1,
              "timeoutSeconds": 1,
              "successThreshold": 1,
              "failureThreshold": 1,
              "handler": {
                "httpGet": {
                  "path": "/",
                  "port": 1,
                  "host": "example.com",
                  "scheme": "HTTP"
                }
              }
            }
          },
          "security": {
            "capabilities": [
              "CHOWN",
              "KILL"
            ],
            "hostIpc": false,
            "hostNetwork": false,
            "readOnlyRootFilesystem": false,
            "runAsGid": 30,
            "runAsNonRoot": true,
            "runAsUid": 500,
            "seccompProfileType": "RuntimeDefault",
            "supplementalGroups": "2,3,5,8",
            "uidGidSource": "fromTheImage"
          },
          "storage": {
            "configMapVolume": [
              {
                "name": "storage-instance-a",
                "configMap": "text",
                "mountPath": "text",
                "subPath": "text",
                "defaultMode": "0644",
                "exclude": false
              }
            ],
            "emptyDirVolume": [
              {
                "name": "storage-instance-a",
                "path": "/mnt/emptydir",
                "medium": "text",
                "sizeLimit": "1G",
                "exclude": false
              }
            ],
            "pvc": [
              {
                "name": "storage-instance-a",
                "path": "/container/my-claim",
                "existingPvc": false,
                "claimName": "my-claim",
                "readOnly": false,
                "ephemeral": false,
                "claimInfo": {
                  "size": "1G",
                  "storageClass": "my-storage-class",
                  "accessModes": {
                    "readWriteOnce": true,
                    "readOnlyMany": false,
                    "readWriteMany": false
                  },
                  "volumeMode": "Filesystem",
                  "addedAttrValues": [
                    {
                      "key": "dnsname",
                      "value": "my.dns.com"
                    }
                  ]
                },
                "dataSharing": false,
                "exclude": false
              }
            ],
            "secretVolume": [
              {
                "name": "storage-instance-a",
                "mountPath": "text",
                "defaultMode": "0644",
                "secret": "text",
                "exclude": false
              }
            ]
          },
          "tolerations": [
            {
              "name": "text",
              "operator": "Equal",
              "key": "text",
              "value": "text",
              "effect": "NoSchedule",
              "seconds": 1,
              "exclude": false
            }
          ],
          "workingDir": "/home/myfolder"
        },
        "worker": {
          "annotations": [
            {
              "name": "billing",
              "value": "my-billing-unit",
              "exclude": false
            }
          ],
          "args": "-x my-script.py",
          "command": "python",
          "compute": {
            "cpuCoreLimit": 2,
            "cpuCoreRequest": 0.5,
            "cpuMemoryLimit": "30M",
            "cpuMemoryRequest": "20M",
            "extendedResources": [
              {
                "resource": "hardware-vendor.example/foo",
                "quantity": 2,
                "exclude": false
              }
            ],
            "gpuDevicesRequest": 1,
            "gpuMemoryLimit": "10M",
            "gpuMemoryRequest": "10M",
            "gpuPortionLimit": 0.5,
            "gpuPortionRequest": 0.5,
            "gpuRequestType": "portion",
            "largeShmRequest": false
          },
          "createHomeDir": true,
          "environmentVariables": [
            {
              "name": "HOME",
              "value": "/home/my-folder",
              "secret": {
                "name": "postgress_secret",
                "key": "POSTGRES_PASSWORD"
              },
              "configMap": {
                "name": "my-config-map",
                "key": "MY_POSTGRES_SCHEMA"
              },
              "podFieldRef": {
                "path": "metadata.name"
              },
              "userCredential": {
                "name": "my_postgres_user_and_password",
                "key": "POSTGRES_PASSWORD"
              },
              "exclude": false,
              "description": "Home directory of the user."
            }
          ],
          "image": "python:3.8",
          "imagePullPolicy": "Always",
          "imagePullSecrets": [
            {
              "name": "text",
              "userCredential": true,
              "exclude": false
            }
          ],
          "labels": [
            {
              "name": "stage",
              "value": "initial-research",
              "exclude": false
            }
          ],
          "nodeAffinityRequired": {
            "nodeSelectorTerms": [
              {
                "matchExpressions": [
                  {
                    "key": "text",
                    "operator": "In",
                    "values": [
                      "text"
                    ]
                  }
                ]
              }
            ]
          },
          "nodeType": "my-node-type",
          "podAffinity": {
            "type": "Required",
            "key": "text"
          },
          "probes": {
            "readiness": {
              "initialDelaySeconds": 1,
              "periodSeconds": 1,
              "timeoutSeconds": 1,
              "successThreshold": 1,
              "failureThreshold": 1,
              "handler": {
                "httpGet": {
                  "path": "/",
                  "port": 1,
                  "host": "example.com",
                  "scheme": "HTTP"
                }
              }
            }
          },
          "security": {
            "capabilities": [
              "CHOWN",
              "KILL"
            ],
            "hostIpc": false,
            "hostNetwork": false,
            "readOnlyRootFilesystem": false,
            "runAsGid": 30,
            "runAsNonRoot": true,
            "runAsUid": 500,
            "seccompProfileType": "RuntimeDefault",
            "supplementalGroups": "2,3,5,8",
            "uidGidSource": "fromTheImage"
          },
          "storage": {
            "configMapVolume": [
              {
                "name": "storage-instance-a",
                "configMap": "text",
                "mountPath": "text",
                "subPath": "text",
                "defaultMode": "0644",
                "exclude": false
              }
            ],
            "emptyDirVolume": [
              {
                "name": "storage-instance-a",
                "path": "/mnt/emptydir",
                "medium": "text",
                "sizeLimit": "1G",
                "exclude": false
              }
            ],
            "pvc": [
              {
                "name": "storage-instance-a",
                "path": "/container/my-claim",
                "existingPvc": false,
                "claimName": "my-claim",
                "readOnly": false,
                "ephemeral": false,
                "claimInfo": {
                  "size": "1G",
                  "storageClass": "my-storage-class",
                  "accessModes": {
                    "readWriteOnce": true,
                    "readOnlyMany": false,
                    "readWriteMany": false
                  },
                  "volumeMode": "Filesystem",
                  "addedAttrValues": [
                    {
                      "key": "dnsname",
                      "value": "my.dns.com"
                    }
                  ]
                },
                "dataSharing": false,
                "exclude": false
              }
            ],
            "secretVolume": [
              {
                "name": "storage-instance-a",
                "mountPath": "text",
                "defaultMode": "0644",
                "secret": "text",
                "exclude": false
              }
            ]
          },
          "tolerations": [
            {
              "name": "text",
              "operator": "Equal",
              "key": "text",
              "value": "text",
              "effect": "NoSchedule",
              "seconds": 1,
              "exclude": false
            }
          ],
          "workingDir": "/home/myfolder"
        },
        "category": "text",
        "nodePools": [
          "my-node-pool-a",
          "my-node-pool-b"
        ],
        "preemptibility": "preemptible",
        "priorityClass": "text",
        "restartPolicy": "text",
        "servingPort": {
          "port": 1,
          "container": 1,
          "protocol": "text",
          "authorizationType": "text",
          "authorizedUsers": [
            "text"
          ],
          "authorizedGroups": [
            "text"
          ],
          "clusterLocalAccessOnly": true,
          "exposeExternally": true,
          "exposedUrl": "text"
        },
        "startupPolicy": "LeaderCreated",
        "workers": 4,
        "replicas": 2,
        "autoscaling": {
          "metricThresholdPercentage": 1,
          "minReplicas": 1,
          "maxReplicas": 1,
          "initialReplicas": 1,
          "activationReplicas": 1,
          "concurrencyHardLimit": 1,
          "scaleToZeroRetentionSeconds": 1,
          "scaleDownDelaySeconds": 1,
          "metric": "http_requests_total",
          "metricThreshold": 1
        },
        "servingConfiguration": {
          "initializationTimeoutSeconds": 1,
          "requestTimeoutSeconds": 1
        },
        "annotations": [
          {
            "name": "billing",
            "value": "my-billing-unit",
            "exclude": false
          }
        ],
        "args": "-x my-script.py",
        "autoDeletionTimeAfterCompletionSeconds": 15,
        "backoffLimit": 3,
        "cleanPodPolicy": "None",
        "command": "python",
        "completions": 1,
        "compute": {
          "cpuCoreLimit": 2,
          "cpuCoreRequest": 0.5,
          "cpuMemoryLimit": "30M",
          "cpuMemoryRequest": "20M",
          "extendedResources": [
            {
              "resource": "hardware-vendor.example/foo",
              "quantity": 2,
              "exclude": false
            }
          ],
          "gpuDevicesRequest": 1,
          "gpuMemoryLimit": "10M",
          "gpuMemoryRequest": "10M",
          "gpuPortionLimit": 0.5,
          "gpuPortionRequest": 0.5,
          "gpuRequestType": "portion",
          "largeShmRequest": false
        },
        "createHomeDir": true,
        "distributedFramework": "MPI",
        "environmentVariables": [
          {
            "name": "HOME",
            "value": "/home/my-folder",
            "secret": {
              "name": "postgress_secret",
              "key": "POSTGRES_PASSWORD"
            },
            "configMap": {
              "name": "my-config-map",
              "key": "MY_POSTGRES_SCHEMA"
            },
            "podFieldRef": {
              "path": "metadata.name"
            },
            "userCredential": {
              "name": "my_postgres_user_and_password",
              "key": "POSTGRES_PASSWORD"
            },
            "exclude": false,
            "description": "Home directory of the user."
          }
        ],
        "exposedUrls": [
          {
            "container": 8080,
            "url": "https://my-url.com",
            "authorizationType": "authenticatedUsers",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "toolType": "jupyter",
            "toolName": "my-pytorch",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "image": "python:3.8",
        "imagePullPolicy": "Always",
        "imagePullSecrets": [
          {
            "name": "text",
            "userCredential": true,
            "exclude": false
          }
        ],
        "labels": [
          {
            "name": "stage",
            "value": "initial-research",
            "exclude": false
          }
        ],
        "maxReplicas": 1,
        "minReplicas": 1,
        "mpiLauncherCreationPolicy": "AtStartup",
        "nodeAffinityRequired": {
          "nodeSelectorTerms": [
            {
              "matchExpressions": [
                {
                  "key": "text",
                  "operator": "In",
                  "values": [
                    "text"
                  ]
                }
              ]
            }
          ]
        },
        "nodeType": "my-node-type",
        "numWorkers": 1,
        "parallelism": 1,
        "podAffinity": {
          "type": "Required",
          "key": "text"
        },
        "ports": [
          {
            "container": 8080,
            "serviceType": "LoadBalancer",
            "external": 30080,
            "toolType": "pytorch",
            "toolName": "my-pytorch",
            "name": "port-instance-a",
            "exclude": false
          }
        ],
        "probes": {
          "readiness": {
            "initialDelaySeconds": 1,
            "periodSeconds": 1,
            "timeoutSeconds": 1,
            "successThreshold": 1,
            "failureThreshold": 1,
            "handler": {
              "httpGet": {
                "path": "/",
                "port": 1,
                "host": "example.com",
                "scheme": "HTTP"
              }
            }
          }
        },
        "relatedUrls": [
          {
            "url": "https://my-url.com",
            "type": "wandb",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "security": {
          "allowPrivilegeEscalation": false,
          "capabilities": [
            "CHOWN",
            "KILL"
          ],
          "hostIpc": false,
          "hostNetwork": false,
          "readOnlyRootFilesystem": false,
          "runAsGid": 30,
          "runAsNonRoot": true,
          "runAsUid": 500,
          "seccompProfileType": "RuntimeDefault",
          "supplementalGroups": "2,3,5,8",
          "uidGidSource": "fromTheImage"
        },
        "slotsPerWorker": 1,
        "sshAuthMountPath": "/root/.ssh",
        "stdin": true,
        "storage": {
          "configMapVolume": [
            {
              "name": "storage-instance-a",
              "configMap": "text",
              "mountPath": "text",
              "subPath": "text",
              "defaultMode": "0644",
              "exclude": false
            }
          ],
          "dataVolume": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "mountPath": "/mnt/data",
              "exclude": false
            }
          ],
          "emptyDirVolume": [
            {
              "name": "storage-instance-a",
              "path": "/mnt/emptydir",
              "medium": "text",
              "sizeLimit": "1G",
              "exclude": false
            }
          ],
          "git": [
            {
              "name": "storage-instance-a",
              "repository": "https://github.com/my-git/my-repo",
              "branch": "main",
              "revision": "text",
              "path": "/container/my-repository",
              "passwordSecret": "my-password-secret",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password",
              "exclude": false,
              "secretRef": {
                "name": "my-password-secret",
                "authenticationMethod": "password",
                "secretKeyOfUser": "User",
                "secretKeyOfPassword": "Password"
              }
            }
          ],
          "hostPath": [
            {
              "name": "storage-instance-a",
              "path": "/container/directory",
              "readOnly": true,
              "mountPath": "/local/directory",
              "mountPropagation": "None",
              "exclude": false
            }
          ],
          "nfs": [
            {
              "name": "storage-instance-a",
              "path": "/container/nfs",
              "readOnly": true,
              "server": "my.nfs.com",
              "mountPath": "/local/nfs",
              "exclude": false
            }
          ],
          "pvc": [
            {
              "name": "storage-instance-a",
              "path": "/container/my-claim",
              "existingPvc": false,
              "claimName": "my-claim",
              "readOnly": false,
              "ephemeral": false,
              "claimInfo": {
                "size": "1G",
                "storageClass": "my-storage-class",
                "accessModes": {
                  "readWriteOnce": true,
                  "readOnlyMany": false,
                  "readWriteMany": false
                },
                "volumeMode": "Filesystem",
                "addedAttrValues": [
                  {
                    "key": "dnsname",
                    "value": "my.dns.com"
                  }
                ]
              },
              "dataSharing": false,
              "exclude": false
            }
          ],
          "s3": [
            {
              "name": "storage-instance-a",
              "bucket": "my-bucket",
              "path": "/container/my-bucket",
              "url": "https://s3.amazonaws.com",
              "accessKeySecret": "my-access-key-secret",
              "secretKeyOfAccessKeyId": "AccessKeyId",
              "secretKeyOfSecretKey": "SecretKey",
              "exclude": false
            }
          ],
          "secretVolume": [
            {
              "name": "storage-instance-a",
              "mountPath": "text",
              "defaultMode": "0644",
              "secret": "text",
              "exclude": false
            }
          ]
        },
        "terminateAfterPreemption": false,
        "terminationGracePeriodSeconds": 20,
        "tolerations": [
          {
            "name": "text",
            "operator": "Equal",
            "key": "text",
            "value": "text",
            "effect": "NoSchedule",
            "seconds": 1,
            "exclude": false
          }
        ],
        "tty": true,
        "workingDir": "/home/myfolder"
      },
      "assets": {},
      "masterSpecSameAsWorker": true,
      "master": {
        "spec": {
          "annotations": [
            {
              "name": "billing",
              "value": "my-billing-unit",
              "exclude": false
            }
          ],
          "args": "-x my-script.py",
          "category": "text",
          "command": "python",
          "compute": {
            "cpuCoreLimit": 2,
            "cpuCoreRequest": 0.5,
            "cpuMemoryLimit": "30M",
            "cpuMemoryRequest": "20M",
            "extendedResources": [
              {
                "resource": "hardware-vendor.example/foo",
                "quantity": 2,
                "exclude": false
              }
            ],
            "gpuDevicesRequest": 1,
            "gpuMemoryLimit": "10M",
            "gpuMemoryRequest": "10M",
            "gpuPortionLimit": 0.5,
            "gpuPortionRequest": 0.5,
            "gpuRequestType": "portion",
            "largeShmRequest": false
          },
          "createHomeDir": true,
          "environmentVariables": [
            {
              "name": "HOME",
              "value": "/home/my-folder",
              "secret": {
                "name": "postgress_secret",
                "key": "POSTGRES_PASSWORD"
              },
              "configMap": {
                "name": "my-config-map",
                "key": "MY_POSTGRES_SCHEMA"
              },
              "podFieldRef": {
                "path": "metadata.name"
              },
              "userCredential": {
                "name": "my_postgres_user_and_password",
                "key": "POSTGRES_PASSWORD"
              },
              "exclude": false,
              "description": "Home directory of the user."
            }
          ],
          "exposedUrls": [
            {
              "container": 8080,
              "url": "https://my-url.com",
              "authorizationType": "authenticatedUsers",
              "authorizedUsers": [
                "user-a",
                "user-b"
              ],
              "authorizedGroups": [
                "group-a",
                "group-b"
              ],
              "toolType": "jupyter",
              "toolName": "my-pytorch",
              "name": "url-instance-a",
              "exclude": false
            }
          ],
          "image": "python:3.8",
          "imagePullPolicy": "Always",
          "labels": [
            {
              "name": "stage",
              "value": "initial-research",
              "exclude": false
            }
          ],
          "nodeAffinityRequired": {
            "nodeSelectorTerms": [
              {
                "matchExpressions": [
                  {
                    "key": "text",
                    "operator": "In",
                    "values": [
                      "text"
                    ]
                  }
                ]
              }
            ]
          },
          "nodePools": [
            "my-node-pool-a",
            "my-node-pool-b"
          ],
          "nodeType": "my-node-type",
          "podAffinity": {
            "type": "Required",
            "key": "text"
          },
          "ports": [
            {
              "container": 8080,
              "serviceType": "LoadBalancer",
              "external": 30080,
              "toolType": "pytorch",
              "toolName": "my-pytorch",
              "name": "port-instance-a",
              "exclude": false
            }
          ],
          "preemptibility": "preemptible",
          "probes": {
            "readiness": {
              "initialDelaySeconds": 1,
              "periodSeconds": 1,
              "timeoutSeconds": 1,
              "successThreshold": 1,
              "failureThreshold": 1,
              "handler": {
                "httpGet": {
                  "path": "/",
                  "port": 1,
                  "host": "example.com",
                  "scheme": "HTTP"
                }
              }
            }
          },
          "relatedUrls": [
            {
              "url": "https://my-url.com",
              "type": "wandb",
              "name": "url-instance-a",
              "exclude": false
            }
          ],
          "restartPolicy": "Always",
          "security": {
            "allowPrivilegeEscalation": false,
            "capabilities": [
              "CHOWN",
              "KILL"
            ],
            "hostIpc": false,
            "hostNetwork": false,
            "readOnlyRootFilesystem": false,
            "runAsGid": 30,
            "runAsNonRoot": true,
            "runAsUid": 500,
            "seccompProfileType": "RuntimeDefault",
            "supplementalGroups": "2,3,5,8",
            "uidGidSource": "fromTheImage"
          },
          "stdin": true,
          "storage": {
            "configMapVolume": [
              {
                "name": "storage-instance-a",
                "configMap": "text",
                "mountPath": "text",
                "subPath": "text",
                "defaultMode": "0644",
                "exclude": false
              }
            ],
            "dataVolume": [
              {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "mountPath": "/mnt/data",
                "exclude": false
              }
            ],
            "emptyDirVolume": [
              {
                "name": "storage-instance-a",
                "path": "/mnt/emptydir",
                "medium": "text",
                "sizeLimit": "1G",
                "exclude": false
              }
            ],
            "git": [
              {
                "name": "storage-instance-a",
                "repository": "https://github.com/my-git/my-repo",
                "branch": "main",
                "revision": "text",
                "path": "/container/my-repository",
                "passwordSecret": "my-password-secret",
                "secretKeyOfUser": "User",
                "secretKeyOfPassword": "Password",
                "exclude": false,
                "secretRef": {
                  "name": "my-password-secret",
                  "authenticationMethod": "password",
                  "secretKeyOfUser": "User",
                  "secretKeyOfPassword": "Password"
                }
              }
            ],
            "hostPath": [
              {
                "name": "storage-instance-a",
                "path": "/container/directory",
                "readOnly": true,
                "mountPath": "/local/directory",
                "mountPropagation": "None",
                "exclude": false
              }
            ],
            "nfs": [
              {
                "name": "storage-instance-a",
                "path": "/container/nfs",
                "readOnly": true,
                "server": "my.nfs.com",
                "mountPath": "/local/nfs",
                "exclude": false
              }
            ],
            "pvc": [
              {
                "name": "storage-instance-a",
                "path": "/container/my-claim",
                "existingPvc": false,
                "claimName": "my-claim",
                "readOnly": false,
                "ephemeral": false,
                "claimInfo": {
                  "size": "1G",
                  "storageClass": "my-storage-class",
                  "accessModes": {
                    "readWriteOnce": true,
                    "readOnlyMany": false,
                    "readWriteMany": false
                  },
                  "volumeMode": "Filesystem",
                  "addedAttrValues": [
                    {
                      "key": "dnsname",
                      "value": "my.dns.com"
                    }
                  ]
                },
                "dataSharing": false,
                "exclude": false
              }
            ],
            "s3": [
              {
                "name": "storage-instance-a",
                "bucket": "my-bucket",
                "path": "/container/my-bucket",
                "url": "https://s3.amazonaws.com",
                "accessKeySecret": "my-access-key-secret",
                "secretKeyOfAccessKeyId": "AccessKeyId",
                "secretKeyOfSecretKey": "SecretKey",
                "exclude": false
              }
            ],
            "secretVolume": [
              {
                "name": "storage-instance-a",
                "mountPath": "text",
                "defaultMode": "0644",
                "secret": "text",
                "exclude": false
              }
            ]
          },
          "terminateAfterPreemption": false,
          "tolerations": [
            {
              "name": "text",
              "operator": "Equal",
              "key": "text",
              "value": "text",
              "effect": "NoSchedule",
              "seconds": 1,
              "exclude": false
            }
          ],
          "tty": true,
          "workingDir": "/home/myfolder"
        },
        "assets": {}
      },
      "combinedSpec": {
        "leader": {
          "annotations": [
            {
              "name": "billing",
              "value": "my-billing-unit",
              "exclude": false
            }
          ],
          "args": "-x my-script.py",
          "command": "python",
          "compute": {
            "cpuCoreLimit": 2,
            "cpuCoreRequest": 0.5,
            "cpuMemoryLimit": "30M",
            "cpuMemoryRequest": "20M",
            "extendedResources": [
              {
                "resource": "hardware-vendor.example/foo",
                "quantity": 2,
                "exclude": false
              }
            ],
            "gpuDevicesRequest": 1,
            "gpuMemoryLimit": "10M",
            "gpuMemoryRequest": "10M",
            "gpuPortionLimit": 0.5,
            "gpuPortionRequest": 0.5,
            "gpuRequestType": "portion",
            "largeShmRequest": false
          },
          "createHomeDir": true,
          "environmentVariables": [
            {
              "name": "HOME",
              "value": "/home/my-folder",
              "secret": {
                "name": "postgress_secret",
                "key": "POSTGRES_PASSWORD"
              },
              "configMap": {
                "name": "my-config-map",
                "key": "MY_POSTGRES_SCHEMA"
              },
              "podFieldRef": {
                "path": "metadata.name"
              },
              "userCredential": {
                "name": "my_postgres_user_and_password",
                "key": "POSTGRES_PASSWORD"
              },
              "exclude": false,
              "description": "Home directory of the user."
            }
          ],
          "image": "python:3.8",
          "imagePullPolicy": "Always",
          "imagePullSecrets": [
            {
              "name": "text",
              "userCredential": true,
              "exclude": false
            }
          ],
          "labels": [
            {
              "name": "stage",
              "value": "initial-research",
              "exclude": false
            }
          ],
          "nodeAffinityRequired": {
            "nodeSelectorTerms": [
              {
                "matchExpressions": [
                  {
                    "key": "text",
                    "operator": "In",
                    "values": [
                      "text"
                    ]
                  }
                ]
              }
            ]
          },
          "nodeType": "my-node-type",
          "podAffinity": {
            "type": "Required",
            "key": "text"
          },
          "probes": {
            "readiness": {
              "initialDelaySeconds": 1,
              "periodSeconds": 1,
              "timeoutSeconds": 1,
              "successThreshold": 1,
              "failureThreshold": 1,
              "handler": {
                "httpGet": {
                  "path": "/",
                  "port": 1,
                  "host": "example.com",
                  "scheme": "HTTP"
                }
              }
            }
          },
          "security": {
            "capabilities": [
              "CHOWN",
              "KILL"
            ],
            "hostIpc": false,
            "hostNetwork": false,
            "readOnlyRootFilesystem": false,
            "runAsGid": 30,
            "runAsNonRoot": true,
            "runAsUid": 500,
            "seccompProfileType": "RuntimeDefault",
            "supplementalGroups": "2,3,5,8",
            "uidGidSource": "fromTheImage"
          },
          "storage": {
            "configMapVolume": [
              {
                "name": "storage-instance-a",
                "configMap": "text",
                "mountPath": "text",
                "subPath": "text",
                "defaultMode": "0644",
                "exclude": false
              }
            ],
            "emptyDirVolume": [
              {
                "name": "storage-instance-a",
                "path": "/mnt/emptydir",
                "medium": "text",
                "sizeLimit": "1G",
                "exclude": false
              }
            ],
            "pvc": [
              {
                "name": "storage-instance-a",
                "path": "/container/my-claim",
                "existingPvc": false,
                "claimName": "my-claim",
                "readOnly": false,
                "ephemeral": false,
                "claimInfo": {
                  "size": "1G",
                  "storageClass": "my-storage-class",
                  "accessModes": {
                    "readWriteOnce": true,
                    "readOnlyMany": false,
                    "readWriteMany": false
                  },
                  "volumeMode": "Filesystem",
                  "addedAttrValues": [
                    {
                      "key": "dnsname",
                      "value": "my.dns.com"
                    }
                  ]
                },
                "dataSharing": false,
                "exclude": false
              }
            ],
            "secretVolume": [
              {
                "name": "storage-instance-a",
                "mountPath": "text",
                "defaultMode": "0644",
                "secret": "text",
                "exclude": false
              }
            ]
          },
          "tolerations": [
            {
              "name": "text",
              "operator": "Equal",
              "key": "text",
              "value": "text",
              "effect": "NoSchedule",
              "seconds": 1,
              "exclude": false
            }
          ],
          "workingDir": "/home/myfolder"
        },
        "worker": {
          "annotations": [
            {
              "name": "billing",
              "value": "my-billing-unit",
              "exclude": false
            }
          ],
          "args": "-x my-script.py",
          "command": "python",
          "compute": {
            "cpuCoreLimit": 2,
            "cpuCoreRequest": 0.5,
            "cpuMemoryLimit": "30M",
            "cpuMemoryRequest": "20M",
            "extendedResources": [
              {
                "resource": "hardware-vendor.example/foo",
                "quantity": 2,
                "exclude": false
              }
            ],
            "gpuDevicesRequest": 1,
            "gpuMemoryLimit": "10M",
            "gpuMemoryRequest": "10M",
            "gpuPortionLimit": 0.5,
            "gpuPortionRequest": 0.5,
            "gpuRequestType": "portion",
            "largeShmRequest": false
          },
          "createHomeDir": true,
          "environmentVariables": [
            {
              "name": "HOME",
              "value": "/home/my-folder",
              "secret": {
                "name": "postgress_secret",
                "key": "POSTGRES_PASSWORD"
              },
              "configMap": {
                "name": "my-config-map",
                "key": "MY_POSTGRES_SCHEMA"
              },
              "podFieldRef": {
                "path": "metadata.name"
              },
              "userCredential": {
                "name": "my_postgres_user_and_password",
                "key": "POSTGRES_PASSWORD"
              },
              "exclude": false,
              "description": "Home directory of the user."
            }
          ],
          "image": "python:3.8",
          "imagePullPolicy": "Always",
          "imagePullSecrets": [
            {
              "name": "text",
              "userCredential": true,
              "exclude": false
            }
          ],
          "labels": [
            {
              "name": "stage",
              "value": "initial-research",
              "exclude": false
            }
          ],
          "nodeAffinityRequired": {
            "nodeSelectorTerms": [
              {
                "matchExpressions": [
                  {
                    "key": "text",
                    "operator": "In",
                    "values": [
                      "text"
                    ]
                  }
                ]
              }
            ]
          },
          "nodeType": "my-node-type",
          "podAffinity": {
            "type": "Required",
            "key": "text"
          },
          "probes": {
            "readiness": {
              "initialDelaySeconds": 1,
              "periodSeconds": 1,
              "timeoutSeconds": 1,
              "successThreshold": 1,
              "failureThreshold": 1,
              "handler": {
                "httpGet": {
                  "path": "/",
                  "port": 1,
                  "host": "example.com",
                  "scheme": "HTTP"
                }
              }
            }
          },
          "security": {
            "capabilities": [
              "CHOWN",
              "KILL"
            ],
            "hostIpc": false,
            "hostNetwork": false,
            "readOnlyRootFilesystem": false,
            "runAsGid": 30,
            "runAsNonRoot": true,
            "runAsUid": 500,
            "seccompProfileType": "RuntimeDefault",
            "supplementalGroups": "2,3,5,8",
            "uidGidSource": "fromTheImage"
          },
          "storage": {
            "configMapVolume": [
              {
                "name": "storage-instance-a",
                "configMap": "text",
                "mountPath": "text",
                "subPath": "text",
                "defaultMode": "0644",
                "exclude": false
              }
            ],
            "emptyDirVolume": [
              {
                "name": "storage-instance-a",
                "path": "/mnt/emptydir",
                "medium": "text",
                "sizeLimit": "1G",
                "exclude": false
              }
            ],
            "pvc": [
              {
                "name": "storage-instance-a",
                "path": "/container/my-claim",
                "existingPvc": false,
                "claimName": "my-claim",
                "readOnly": false,
                "ephemeral": false,
                "claimInfo": {
                  "size": "1G",
                  "storageClass": "my-storage-class",
                  "accessModes": {
                    "readWriteOnce": true,
                    "readOnlyMany": false,
                    "readWriteMany": false
                  },
                  "volumeMode": "Filesystem",
                  "addedAttrValues": [
                    {
                      "key": "dnsname",
                      "value": "my.dns.com"
                    }
                  ]
                },
                "dataSharing": false,
                "exclude": false
              }
            ],
            "secretVolume": [
              {
                "name": "storage-instance-a",
                "mountPath": "text",
                "defaultMode": "0644",
                "secret": "text",
                "exclude": false
              }
            ]
          },
          "tolerations": [
            {
              "name": "text",
              "operator": "Equal",
              "key": "text",
              "value": "text",
              "effect": "NoSchedule",
              "seconds": 1,
              "exclude": false
            }
          ],
          "workingDir": "/home/myfolder"
        },
        "category": "text",
        "nodePools": [
          "my-node-pool-a",
          "my-node-pool-b"
        ],
        "preemptibility": "preemptible",
        "priorityClass": "text",
        "restartPolicy": "text",
        "servingPort": {
          "port": 1,
          "container": 1,
          "protocol": "text",
          "authorizationType": "text",
          "authorizedUsers": [
            "text"
          ],
          "authorizedGroups": [
            "text"
          ],
          "clusterLocalAccessOnly": true,
          "exposeExternally": true,
          "exposedUrl": "text"
        },
        "startupPolicy": "LeaderCreated",
        "workers": 4,
        "replicas": 2,
        "autoscaling": {
          "metricThresholdPercentage": 1,
          "minReplicas": 1,
          "maxReplicas": 1,
          "initialReplicas": 1,
          "activationReplicas": 1,
          "concurrencyHardLimit": 1,
          "scaleToZeroRetentionSeconds": 1,
          "scaleDownDelaySeconds": 1,
          "metric": "http_requests_total",
          "metricThreshold": 1
        },
        "servingConfiguration": {
          "initializationTimeoutSeconds": 1,
          "requestTimeoutSeconds": 1
        },
        "annotations": [
          {
            "name": "billing",
            "value": "my-billing-unit",
            "exclude": false
          }
        ],
        "args": "-x my-script.py",
        "autoDeletionTimeAfterCompletionSeconds": 15,
        "backoffLimit": 3,
        "cleanPodPolicy": "None",
        "command": "python",
        "completions": 1,
        "compute": {
          "cpuCoreLimit": 2,
          "cpuCoreRequest": 0.5,
          "cpuMemoryLimit": "30M",
          "cpuMemoryRequest": "20M",
          "extendedResources": [
            {
              "resource": "hardware-vendor.example/foo",
              "quantity": 2,
              "exclude": false
            }
          ],
          "gpuDevicesRequest": 1,
          "gpuMemoryLimit": "10M",
          "gpuMemoryRequest": "10M",
          "gpuPortionLimit": 0.5,
          "gpuPortionRequest": 0.5,
          "gpuRequestType": "portion",
          "largeShmRequest": false
        },
        "createHomeDir": true,
        "distributedFramework": "MPI",
        "environmentVariables": [
          {
            "name": "HOME",
            "value": "/home/my-folder",
            "secret": {
              "name": "postgress_secret",
              "key": "POSTGRES_PASSWORD"
            },
            "configMap": {
              "name": "my-config-map",
              "key": "MY_POSTGRES_SCHEMA"
            },
            "podFieldRef": {
              "path": "metadata.name"
            },
            "userCredential": {
              "name": "my_postgres_user_and_password",
              "key": "POSTGRES_PASSWORD"
            },
            "exclude": false,
            "description": "Home directory of the user."
          }
        ],
        "exposedUrls": [
          {
            "container": 8080,
            "url": "https://my-url.com",
            "authorizationType": "authenticatedUsers",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "toolType": "jupyter",
            "toolName": "my-pytorch",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "image": "python:3.8",
        "imagePullPolicy": "Always",
        "imagePullSecrets": [
          {
            "name": "text",
            "userCredential": true,
            "exclude": false
          }
        ],
        "labels": [
          {
            "name": "stage",
            "value": "initial-research",
            "exclude": false
          }
        ],
        "maxReplicas": 1,
        "minReplicas": 1,
        "mpiLauncherCreationPolicy": "AtStartup",
        "nodeAffinityRequired": {
          "nodeSelectorTerms": [
            {
              "matchExpressions": [
                {
                  "key": "text",
                  "operator": "In",
                  "values": [
                    "text"
                  ]
                }
              ]
            }
          ]
        },
        "nodeType": "my-node-type",
        "numWorkers": 1,
        "parallelism": 1,
        "podAffinity": {
          "type": "Required",
          "key": "text"
        },
        "ports": [
          {
            "container": 8080,
            "serviceType": "LoadBalancer",
            "external": 30080,
            "toolType": "pytorch",
            "toolName": "my-pytorch",
            "name": "port-instance-a",
            "exclude": false
          }
        ],
        "probes": {
          "readiness": {
            "initialDelaySeconds": 1,
            "periodSeconds": 1,
            "timeoutSeconds": 1,
            "successThreshold": 1,
            "failureThreshold": 1,
            "handler": {
              "httpGet": {
                "path": "/",
                "port": 1,
                "host": "example.com",
                "scheme": "HTTP"
              }
            }
          }
        },
        "relatedUrls": [
          {
            "url": "https://my-url.com",
            "type": "wandb",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "security": {
          "allowPrivilegeEscalation": false,
          "capabilities": [
            "CHOWN",
            "KILL"
          ],
          "hostIpc": false,
          "hostNetwork": false,
          "readOnlyRootFilesystem": false,
          "runAsGid": 30,
          "runAsNonRoot": true,
          "runAsUid": 500,
          "seccompProfileType": "RuntimeDefault",
          "supplementalGroups": "2,3,5,8",
          "uidGidSource": "fromTheImage"
        },
        "slotsPerWorker": 1,
        "sshAuthMountPath": "/root/.ssh",
        "stdin": true,
        "storage": {
          "configMapVolume": [
            {
              "name": "storage-instance-a",
              "configMap": "text",
              "mountPath": "text",
              "subPath": "text",
              "defaultMode": "0644",
              "exclude": false
            }
          ],
          "dataVolume": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "mountPath": "/mnt/data",
              "exclude": false
            }
          ],
          "emptyDirVolume": [
            {
              "name": "storage-instance-a",
              "path": "/mnt/emptydir",
              "medium": "text",
              "sizeLimit": "1G",
              "exclude": false
            }
          ],
          "git": [
            {
              "name": "storage-instance-a",
              "repository": "https://github.com/my-git/my-repo",
              "branch": "main",
              "revision": "text",
              "path": "/container/my-repository",
              "passwordSecret": "my-password-secret",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password",
              "exclude": false,
              "secretRef": {
                "name": "my-password-secret",
                "authenticationMethod": "password",
                "secretKeyOfUser": "User",
                "secretKeyOfPassword": "Password"
              }
            }
          ],
          "hostPath": [
            {
              "name": "storage-instance-a",
              "path": "/container/directory",
              "readOnly": true,
              "mountPath": "/local/directory",
              "mountPropagation": "None",
              "exclude": false
            }
          ],
          "nfs": [
            {
              "name": "storage-instance-a",
              "path": "/container/nfs",
              "readOnly": true,
              "server": "my.nfs.com",
              "mountPath": "/local/nfs",
              "exclude": false
            }
          ],
          "pvc": [
            {
              "name": "storage-instance-a",
              "path": "/container/my-claim",
              "existingPvc": false,
              "claimName": "my-claim",
              "readOnly": false,
              "ephemeral": false,
              "claimInfo": {
                "size": "1G",
                "storageClass": "my-storage-class",
                "accessModes": {
                  "readWriteOnce": true,
                  "readOnlyMany": false,
                  "readWriteMany": false
                },
                "volumeMode": "Filesystem",
                "addedAttrValues": [
                  {
                    "key": "dnsname",
                    "value": "my.dns.com"
                  }
                ]
              },
              "dataSharing": false,
              "exclude": false
            }
          ],
          "s3": [
            {
              "name": "storage-instance-a",
              "bucket": "my-bucket",
              "path": "/container/my-bucket",
              "url": "https://s3.amazonaws.com",
              "accessKeySecret": "my-access-key-secret",
              "secretKeyOfAccessKeyId": "AccessKeyId",
              "secretKeyOfSecretKey": "SecretKey",
              "exclude": false
            }
          ],
          "secretVolume": [
            {
              "name": "storage-instance-a",
              "mountPath": "text",
              "defaultMode": "0644",
              "secret": "text",
              "exclude": false
            }
          ]
        },
        "terminateAfterPreemption": false,
        "terminationGracePeriodSeconds": 20,
        "tolerations": [
          {
            "name": "text",
            "operator": "Equal",
            "key": "text",
            "value": "text",
            "effect": "NoSchedule",
            "seconds": 1,
            "exclude": false
          }
        ],
        "tty": true,
        "workingDir": "/home/myfolder"
      },
      "combinedMasterSpec": {
        "annotations": [
          {
            "name": "billing",
            "value": "my-billing-unit",
            "exclude": false
          }
        ],
        "args": "-x my-script.py",
        "category": "text",
        "command": "python",
        "compute": {
          "cpuCoreLimit": 2,
          "cpuCoreRequest": 0.5,
          "cpuMemoryLimit": "30M",
          "cpuMemoryRequest": "20M",
          "extendedResources": [
            {
              "resource": "hardware-vendor.example/foo",
              "quantity": 2,
              "exclude": false
            }
          ],
          "gpuDevicesRequest": 1,
          "gpuMemoryLimit": "10M",
          "gpuMemoryRequest": "10M",
          "gpuPortionLimit": 0.5,
          "gpuPortionRequest": 0.5,
          "gpuRequestType": "portion",
          "largeShmRequest": false
        },
        "createHomeDir": true,
        "environmentVariables": [
          {
            "name": "HOME",
            "value": "/home/my-folder",
            "secret": {
              "name": "postgress_secret",
              "key": "POSTGRES_PASSWORD"
            },
            "configMap": {
              "name": "my-config-map",
              "key": "MY_POSTGRES_SCHEMA"
            },
            "podFieldRef": {
              "path": "metadata.name"
            },
            "userCredential": {
              "name": "my_postgres_user_and_password",
              "key": "POSTGRES_PASSWORD"
            },
            "exclude": false,
            "description": "Home directory of the user."
          }
        ],
        "exposedUrls": [
          {
            "container": 8080,
            "url": "https://my-url.com",
            "authorizationType": "authenticatedUsers",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "toolType": "jupyter",
            "toolName": "my-pytorch",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "image": "python:3.8",
        "imagePullPolicy": "Always",
        "labels": [
          {
            "name": "stage",
            "value": "initial-research",
            "exclude": false
          }
        ],
        "nodeAffinityRequired": {
          "nodeSelectorTerms": [
            {
              "matchExpressions": [
                {
                  "key": "text",
                  "operator": "In",
                  "values": [
                    "text"
                  ]
                }
              ]
            }
          ]
        },
        "nodePools": [
          "my-node-pool-a",
          "my-node-pool-b"
        ],
        "nodeType": "my-node-type",
        "podAffinity": {
          "type": "Required",
          "key": "text"
        },
        "ports": [
          {
            "container": 8080,
            "serviceType": "LoadBalancer",
            "external": 30080,
            "toolType": "pytorch",
            "toolName": "my-pytorch",
            "name": "port-instance-a",
            "exclude": false
          }
        ],
        "preemptibility": "preemptible",
        "probes": {
          "readiness": {
            "initialDelaySeconds": 1,
            "periodSeconds": 1,
            "timeoutSeconds": 1,
            "successThreshold": 1,
            "failureThreshold": 1,
            "handler": {
              "httpGet": {
                "path": "/",
                "port": 1,
                "host": "example.com",
                "scheme": "HTTP"
              }
            }
          }
        },
        "relatedUrls": [
          {
            "url": "https://my-url.com",
            "type": "wandb",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "restartPolicy": "Always",
        "security": {
          "allowPrivilegeEscalation": false,
          "capabilities": [
            "CHOWN",
            "KILL"
          ],
          "hostIpc": false,
          "hostNetwork": false,
          "readOnlyRootFilesystem": false,
          "runAsGid": 30,
          "runAsNonRoot": true,
          "runAsUid": 500,
          "seccompProfileType": "RuntimeDefault",
          "supplementalGroups": "2,3,5,8",
          "uidGidSource": "fromTheImage"
        },
        "stdin": true,
        "storage": {
          "configMapVolume": [
            {
              "name": "storage-instance-a",
              "configMap": "text",
              "mountPath": "text",
              "subPath": "text",
              "defaultMode": "0644",
              "exclude": false
            }
          ],
          "dataVolume": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "mountPath": "/mnt/data",
              "exclude": false
            }
          ],
          "emptyDirVolume": [
            {
              "name": "storage-instance-a",
              "path": "/mnt/emptydir",
              "medium": "text",
              "sizeLimit": "1G",
              "exclude": false
            }
          ],
          "git": [
            {
              "name": "storage-instance-a",
              "repository": "https://github.com/my-git/my-repo",
              "branch": "main",
              "revision": "text",
              "path": "/container/my-repository",
              "passwordSecret": "my-password-secret",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password",
              "exclude": false,
              "secretRef": {
                "name": "my-password-secret",
                "authenticationMethod": "password",
                "secretKeyOfUser": "User",
                "secretKeyOfPassword": "Password"
              }
            }
          ],
          "hostPath": [
            {
              "name": "storage-instance-a",
              "path": "/container/directory",
              "readOnly": true,
              "mountPath": "/local/directory",
              "mountPropagation": "None",
              "exclude": false
            }
          ],
          "nfs": [
            {
              "name": "storage-instance-a",
              "path": "/container/nfs",
              "readOnly": true,
              "server": "my.nfs.com",
              "mountPath": "/local/nfs",
              "exclude": false
            }
          ],
          "pvc": [
            {
              "name": "storage-instance-a",
              "path": "/container/my-claim",
              "existingPvc": false,
              "claimName": "my-claim",
              "readOnly": false,
              "ephemeral": false,
              "claimInfo": {
                "size": "1G",
                "storageClass": "my-storage-class",
                "accessModes": {
                  "readWriteOnce": true,
                  "readOnlyMany": false,
                  "readWriteMany": false
                },
                "volumeMode": "Filesystem",
                "addedAttrValues": [
                  {
                    "key": "dnsname",
                    "value": "my.dns.com"
                  }
                ]
              },
              "dataSharing": false,
              "exclude": false
            }
          ],
          "s3": [
            {
              "name": "storage-instance-a",
              "bucket": "my-bucket",
              "path": "/container/my-bucket",
              "url": "https://s3.amazonaws.com",
              "accessKeySecret": "my-access-key-secret",
              "secretKeyOfAccessKeyId": "AccessKeyId",
              "secretKeyOfSecretKey": "SecretKey",
              "exclude": false
            }
          ],
          "secretVolume": [
            {
              "name": "storage-instance-a",
              "mountPath": "text",
              "defaultMode": "0644",
              "secret": "text",
              "exclude": false
            }
          ]
        },
        "terminateAfterPreemption": false,
        "tolerations": [
          {
            "name": "text",
            "operator": "Equal",
            "key": "text",
            "value": "text",
            "effect": "NoSchedule",
            "seconds": 1,
            "exclude": false
          }
        ],
        "tty": true,
        "workingDir": "/home/myfolder"
      }
    },
    {
      "complianceIssues": []
    }
  ],
  "pagination": {
    "limit": 1,
    "offset": 1,
    "nextOffset": 1
  }
}

Template name availability

get

Check if a given template name creates naming conflicts under the given scope. Returns conflict (409) in case the name is not available, or 204 (no content) if it is ok.

Authorizations
AuthorizationstringRequired

Bearer authentication

Query parameters
templateNamestring · min: 1Required

The name of the template.

Example: my-template-name
scopeTypestring · enumRequired

The resource scope type to filter by.

Possible values:
scopeIdstringOptional

filter by scope id

Responses
204

The name is available to use

No content

get/api/v1/workload-templates/name-availability
GET /api/v1/workload-templates/name-availability?templateName=my-template-name&scopeType=tenant HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Get a template, any type. [Experimental]

get

Retrieve the details of a template using its id.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
templateIdstring · uuidRequired

The Universally Unique Identifier (UUID) of the template.

Example: 550e8400-e29b-41d4-a716-446655440000
Responses
200

Executed successfully.

application/json
and
get/api/v1/workload-templates/{templateId}
GET /api/v1/workload-templates/{templateId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "description": "description of my template.",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "text",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": 2,
    "projectId": 1,
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "spec": {
    "leader": {
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "command": "python",
      "compute": {
        "cpuCoreLimit": 2,
        "cpuCoreRequest": 0.5,
        "cpuMemoryLimit": "30M",
        "cpuMemoryRequest": "20M",
        "extendedResources": [
          {
            "resource": "hardware-vendor.example/foo",
            "quantity": 2,
            "exclude": false
          }
        ],
        "gpuDevicesRequest": 1,
        "gpuMemoryLimit": "10M",
        "gpuMemoryRequest": "10M",
        "gpuPortionLimit": 0.5,
        "gpuPortionRequest": 0.5,
        "gpuRequestType": "portion",
        "largeShmRequest": false
      },
      "createHomeDir": true,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "secret": {
            "name": "postgress_secret",
            "key": "POSTGRES_PASSWORD"
          },
          "configMap": {
            "name": "my-config-map",
            "key": "MY_POSTGRES_SCHEMA"
          },
          "podFieldRef": {
            "path": "metadata.name"
          },
          "userCredential": {
            "name": "my_postgres_user_and_password",
            "key": "POSTGRES_PASSWORD"
          },
          "exclude": false,
          "description": "Home directory of the user."
        }
      ],
      "image": "python:3.8",
      "imagePullPolicy": "Always",
      "imagePullSecrets": [
        {
          "name": "text",
          "userCredential": true,
          "exclude": false
        }
      ],
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodeType": "my-node-type",
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "probes": {
        "readiness": {
          "initialDelaySeconds": 1,
          "periodSeconds": 1,
          "timeoutSeconds": 1,
          "successThreshold": 1,
          "failureThreshold": 1,
          "handler": {
            "httpGet": {
              "path": "/",
              "port": 1,
              "host": "example.com",
              "scheme": "HTTP"
            }
          }
        }
      },
      "security": {
        "capabilities": [
          "CHOWN",
          "KILL"
        ],
        "hostIpc": false,
        "hostNetwork": false,
        "readOnlyRootFilesystem": false,
        "runAsGid": 30,
        "runAsNonRoot": true,
        "runAsUid": 500,
        "seccompProfileType": "RuntimeDefault",
        "supplementalGroups": "2,3,5,8",
        "uidGidSource": "fromTheImage"
      },
      "storage": {
        "configMapVolume": [
          {
            "name": "storage-instance-a",
            "configMap": "text",
            "mountPath": "text",
            "subPath": "text",
            "defaultMode": "0644",
            "exclude": false
          }
        ],
        "emptyDirVolume": [
          {
            "name": "storage-instance-a",
            "path": "/mnt/emptydir",
            "medium": "text",
            "sizeLimit": "1G",
            "exclude": false
          }
        ],
        "pvc": [
          {
            "name": "storage-instance-a",
            "path": "/container/my-claim",
            "existingPvc": false,
            "claimName": "my-claim",
            "readOnly": false,
            "ephemeral": false,
            "claimInfo": {
              "size": "1G",
              "storageClass": "my-storage-class",
              "accessModes": {
                "readWriteOnce": true,
                "readOnlyMany": false,
                "readWriteMany": false
              },
              "volumeMode": "Filesystem",
              "addedAttrValues": [
                {
                  "key": "dnsname",
                  "value": "my.dns.com"
                }
              ]
            },
            "dataSharing": false,
            "exclude": false
          }
        ],
        "secretVolume": [
          {
            "name": "storage-instance-a",
            "mountPath": "text",
            "defaultMode": "0644",
            "secret": "text",
            "exclude": false
          }
        ]
      },
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "workingDir": "/home/myfolder"
    },
    "worker": {
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "command": "python",
      "compute": {
        "cpuCoreLimit": 2,
        "cpuCoreRequest": 0.5,
        "cpuMemoryLimit": "30M",
        "cpuMemoryRequest": "20M",
        "extendedResources": [
          {
            "resource": "hardware-vendor.example/foo",
            "quantity": 2,
            "exclude": false
          }
        ],
        "gpuDevicesRequest": 1,
        "gpuMemoryLimit": "10M",
        "gpuMemoryRequest": "10M",
        "gpuPortionLimit": 0.5,
        "gpuPortionRequest": 0.5,
        "gpuRequestType": "portion",
        "largeShmRequest": false
      },
      "createHomeDir": true,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "secret": {
            "name": "postgress_secret",
            "key": "POSTGRES_PASSWORD"
          },
          "configMap": {
            "name": "my-config-map",
            "key": "MY_POSTGRES_SCHEMA"
          },
          "podFieldRef": {
            "path": "metadata.name"
          },
          "userCredential": {
            "name": "my_postgres_user_and_password",
            "key": "POSTGRES_PASSWORD"
          },
          "exclude": false,
          "description": "Home directory of the user."
        }
      ],
      "image": "python:3.8",
      "imagePullPolicy": "Always",
      "imagePullSecrets": [
        {
          "name": "text",
          "userCredential": true,
          "exclude": false
        }
      ],
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodeType": "my-node-type",
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "probes": {
        "readiness": {
          "initialDelaySeconds": 1,
          "periodSeconds": 1,
          "timeoutSeconds": 1,
          "successThreshold": 1,
          "failureThreshold": 1,
          "handler": {
            "httpGet": {
              "path": "/",
              "port": 1,
              "host": "example.com",
              "scheme": "HTTP"
            }
          }
        }
      },
      "security": {
        "capabilities": [
          "CHOWN",
          "KILL"
        ],
        "hostIpc": false,
        "hostNetwork": false,
        "readOnlyRootFilesystem": false,
        "runAsGid": 30,
        "runAsNonRoot": true,
        "runAsUid": 500,
        "seccompProfileType": "RuntimeDefault",
        "supplementalGroups": "2,3,5,8",
        "uidGidSource": "fromTheImage"
      },
      "storage": {
        "configMapVolume": [
          {
            "name": "storage-instance-a",
            "configMap": "text",
            "mountPath": "text",
            "subPath": "text",
            "defaultMode": "0644",
            "exclude": false
          }
        ],
        "emptyDirVolume": [
          {
            "name": "storage-instance-a",
            "path": "/mnt/emptydir",
            "medium": "text",
            "sizeLimit": "1G",
            "exclude": false
          }
        ],
        "pvc": [
          {
            "name": "storage-instance-a",
            "path": "/container/my-claim",
            "existingPvc": false,
            "claimName": "my-claim",
            "readOnly": false,
            "ephemeral": false,
            "claimInfo": {
              "size": "1G",
              "storageClass": "my-storage-class",
              "accessModes": {
                "readWriteOnce": true,
                "readOnlyMany": false,
                "readWriteMany": false
              },
              "volumeMode": "Filesystem",
              "addedAttrValues": [
                {
                  "key": "dnsname",
                  "value": "my.dns.com"
                }
              ]
            },
            "dataSharing": false,
            "exclude": false
          }
        ],
        "secretVolume": [
          {
            "name": "storage-instance-a",
            "mountPath": "text",
            "defaultMode": "0644",
            "secret": "text",
            "exclude": false
          }
        ]
      },
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "workingDir": "/home/myfolder"
    },
    "category": "text",
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "restartPolicy": "text",
    "servingPort": {
      "port": 1,
      "container": 1,
      "protocol": "text",
      "authorizationType": "text",
      "authorizedUsers": [
        "text"
      ],
      "authorizedGroups": [
        "text"
      ],
      "clusterLocalAccessOnly": true,
      "exposeExternally": true,
      "exposedUrl": "text"
    },
    "startupPolicy": "LeaderCreated",
    "workers": 4,
    "replicas": 2,
    "autoscaling": {
      "metricThresholdPercentage": 1,
      "minReplicas": 1,
      "maxReplicas": 1,
      "initialReplicas": 1,
      "activationReplicas": 1,
      "concurrencyHardLimit": 1,
      "scaleToZeroRetentionSeconds": 1,
      "scaleDownDelaySeconds": 1,
      "metric": "http_requests_total",
      "metricThreshold": 1
    },
    "servingConfiguration": {
      "initializationTimeoutSeconds": 1,
      "requestTimeoutSeconds": 1
    },
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "cleanPodPolicy": "None",
    "command": "python",
    "completions": 1,
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "distributedFramework": "MPI",
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "imagePullSecrets": [
      {
        "name": "text",
        "userCredential": true,
        "exclude": false
      }
    ],
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "maxReplicas": 1,
    "minReplicas": 1,
    "mpiLauncherCreationPolicy": "AtStartup",
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodeType": "my-node-type",
    "numWorkers": 1,
    "parallelism": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "slotsPerWorker": 1,
    "sshAuthMountPath": "/root/.ssh",
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "assets": {},
  "masterSpecSameAsWorker": true,
  "master": {
    "spec": {
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "category": "text",
      "command": "python",
      "compute": {
        "cpuCoreLimit": 2,
        "cpuCoreRequest": 0.5,
        "cpuMemoryLimit": "30M",
        "cpuMemoryRequest": "20M",
        "extendedResources": [
          {
            "resource": "hardware-vendor.example/foo",
            "quantity": 2,
            "exclude": false
          }
        ],
        "gpuDevicesRequest": 1,
        "gpuMemoryLimit": "10M",
        "gpuMemoryRequest": "10M",
        "gpuPortionLimit": 0.5,
        "gpuPortionRequest": 0.5,
        "gpuRequestType": "portion",
        "largeShmRequest": false
      },
      "createHomeDir": true,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "secret": {
            "name": "postgress_secret",
            "key": "POSTGRES_PASSWORD"
          },
          "configMap": {
            "name": "my-config-map",
            "key": "MY_POSTGRES_SCHEMA"
          },
          "podFieldRef": {
            "path": "metadata.name"
          },
          "userCredential": {
            "name": "my_postgres_user_and_password",
            "key": "POSTGRES_PASSWORD"
          },
          "exclude": false,
          "description": "Home directory of the user."
        }
      ],
      "exposedUrls": [
        {
          "container": 8080,
          "url": "https://my-url.com",
          "authorizationType": "authenticatedUsers",
          "authorizedUsers": [
            "user-a",
            "user-b"
          ],
          "authorizedGroups": [
            "group-a",
            "group-b"
          ],
          "toolType": "jupyter",
          "toolName": "my-pytorch",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "image": "python:3.8",
      "imagePullPolicy": "Always",
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodePools": [
        "my-node-pool-a",
        "my-node-pool-b"
      ],
      "nodeType": "my-node-type",
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "ports": [
        {
          "container": 8080,
          "serviceType": "LoadBalancer",
          "external": 30080,
          "toolType": "pytorch",
          "toolName": "my-pytorch",
          "name": "port-instance-a",
          "exclude": false
        }
      ],
      "preemptibility": "preemptible",
      "probes": {
        "readiness": {
          "initialDelaySeconds": 1,
          "periodSeconds": 1,
          "timeoutSeconds": 1,
          "successThreshold": 1,
          "failureThreshold": 1,
          "handler": {
            "httpGet": {
              "path": "/",
              "port": 1,
              "host": "example.com",
              "scheme": "HTTP"
            }
          }
        }
      },
      "relatedUrls": [
        {
          "url": "https://my-url.com",
          "type": "wandb",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "restartPolicy": "Always",
      "security": {
        "allowPrivilegeEscalation": false,
        "capabilities": [
          "CHOWN",
          "KILL"
        ],
        "hostIpc": false,
        "hostNetwork": false,
        "readOnlyRootFilesystem": false,
        "runAsGid": 30,
        "runAsNonRoot": true,
        "runAsUid": 500,
        "seccompProfileType": "RuntimeDefault",
        "supplementalGroups": "2,3,5,8",
        "uidGidSource": "fromTheImage"
      },
      "stdin": true,
      "storage": {
        "configMapVolume": [
          {
            "name": "storage-instance-a",
            "configMap": "text",
            "mountPath": "text",
            "subPath": "text",
            "defaultMode": "0644",
            "exclude": false
          }
        ],
        "dataVolume": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "mountPath": "/mnt/data",
            "exclude": false
          }
        ],
        "emptyDirVolume": [
          {
            "name": "storage-instance-a",
            "path": "/mnt/emptydir",
            "medium": "text",
            "sizeLimit": "1G",
            "exclude": false
          }
        ],
        "git": [
          {
            "name": "storage-instance-a",
            "repository": "https://github.com/my-git/my-repo",
            "branch": "main",
            "revision": "text",
            "path": "/container/my-repository",
            "passwordSecret": "my-password-secret",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password",
            "exclude": false,
            "secretRef": {
              "name": "my-password-secret",
              "authenticationMethod": "password",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password"
            }
          }
        ],
        "hostPath": [
          {
            "name": "storage-instance-a",
            "path": "/container/directory",
            "readOnly": true,
            "mountPath": "/local/directory",
            "mountPropagation": "None",
            "exclude": false
          }
        ],
        "nfs": [
          {
            "name": "storage-instance-a",
            "path": "/container/nfs",
            "readOnly": true,
            "server": "my.nfs.com",
            "mountPath": "/local/nfs",
            "exclude": false
          }
        ],
        "pvc": [
          {
            "name": "storage-instance-a",
            "path": "/container/my-claim",
            "existingPvc": false,
            "claimName": "my-claim",
            "readOnly": false,
            "ephemeral": false,
            "claimInfo": {
              "size": "1G",
              "storageClass": "my-storage-class",
              "accessModes": {
                "readWriteOnce": true,
                "readOnlyMany": false,
                "readWriteMany": false
              },
              "volumeMode": "Filesystem",
              "addedAttrValues": [
                {
                  "key": "dnsname",
                  "value": "my.dns.com"
                }
              ]
            },
            "dataSharing": false,
            "exclude": false
          }
        ],
        "s3": [
          {
            "name": "storage-instance-a",
            "bucket": "my-bucket",
            "path": "/container/my-bucket",
            "url": "https://s3.amazonaws.com",
            "accessKeySecret": "my-access-key-secret",
            "secretKeyOfAccessKeyId": "AccessKeyId",
            "secretKeyOfSecretKey": "SecretKey",
            "exclude": false
          }
        ],
        "secretVolume": [
          {
            "name": "storage-instance-a",
            "mountPath": "text",
            "defaultMode": "0644",
            "secret": "text",
            "exclude": false
          }
        ]
      },
      "terminateAfterPreemption": false,
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "tty": true,
      "workingDir": "/home/myfolder"
    },
    "assets": {}
  },
  "combinedSpec": {
    "leader": {
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "command": "python",
      "compute": {
        "cpuCoreLimit": 2,
        "cpuCoreRequest": 0.5,
        "cpuMemoryLimit": "30M",
        "cpuMemoryRequest": "20M",
        "extendedResources": [
          {
            "resource": "hardware-vendor.example/foo",
            "quantity": 2,
            "exclude": false
          }
        ],
        "gpuDevicesRequest": 1,
        "gpuMemoryLimit": "10M",
        "gpuMemoryRequest": "10M",
        "gpuPortionLimit": 0.5,
        "gpuPortionRequest": 0.5,
        "gpuRequestType": "portion",
        "largeShmRequest": false
      },
      "createHomeDir": true,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "secret": {
            "name": "postgress_secret",
            "key": "POSTGRES_PASSWORD"
          },
          "configMap": {
            "name": "my-config-map",
            "key": "MY_POSTGRES_SCHEMA"
          },
          "podFieldRef": {
            "path": "metadata.name"
          },
          "userCredential": {
            "name": "my_postgres_user_and_password",
            "key": "POSTGRES_PASSWORD"
          },
          "exclude": false,
          "description": "Home directory of the user."
        }
      ],
      "image": "python:3.8",
      "imagePullPolicy": "Always",
      "imagePullSecrets": [
        {
          "name": "text",
          "userCredential": true,
          "exclude": false
        }
      ],
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodeType": "my-node-type",
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "probes": {
        "readiness": {
          "initialDelaySeconds": 1,
          "periodSeconds": 1,
          "timeoutSeconds": 1,
          "successThreshold": 1,
          "failureThreshold": 1,
          "handler": {
            "httpGet": {
              "path": "/",
              "port": 1,
              "host": "example.com",
              "scheme": "HTTP"
            }
          }
        }
      },
      "security": {
        "capabilities": [
          "CHOWN",
          "KILL"
        ],
        "hostIpc": false,
        "hostNetwork": false,
        "readOnlyRootFilesystem": false,
        "runAsGid": 30,
        "runAsNonRoot": true,
        "runAsUid": 500,
        "seccompProfileType": "RuntimeDefault",
        "supplementalGroups": "2,3,5,8",
        "uidGidSource": "fromTheImage"
      },
      "storage": {
        "configMapVolume": [
          {
            "name": "storage-instance-a",
            "configMap": "text",
            "mountPath": "text",
            "subPath": "text",
            "defaultMode": "0644",
            "exclude": false
          }
        ],
        "emptyDirVolume": [
          {
            "name": "storage-instance-a",
            "path": "/mnt/emptydir",
            "medium": "text",
            "sizeLimit": "1G",
            "exclude": false
          }
        ],
        "pvc": [
          {
            "name": "storage-instance-a",
            "path": "/container/my-claim",
            "existingPvc": false,
            "claimName": "my-claim",
            "readOnly": false,
            "ephemeral": false,
            "claimInfo": {
              "size": "1G",
              "storageClass": "my-storage-class",
              "accessModes": {
                "readWriteOnce": true,
                "readOnlyMany": false,
                "readWriteMany": false
              },
              "volumeMode": "Filesystem",
              "addedAttrValues": [
                {
                  "key": "dnsname",
                  "value": "my.dns.com"
                }
              ]
            },
            "dataSharing": false,
            "exclude": false
          }
        ],
        "secretVolume": [
          {
            "name": "storage-instance-a",
            "mountPath": "text",
            "defaultMode": "0644",
            "secret": "text",
            "exclude": false
          }
        ]
      },
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "workingDir": "/home/myfolder"
    },
    "worker": {
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "command": "python",
      "compute": {
        "cpuCoreLimit": 2,
        "cpuCoreRequest": 0.5,
        "cpuMemoryLimit": "30M",
        "cpuMemoryRequest": "20M",
        "extendedResources": [
          {
            "resource": "hardware-vendor.example/foo",
            "quantity": 2,
            "exclude": false
          }
        ],
        "gpuDevicesRequest": 1,
        "gpuMemoryLimit": "10M",
        "gpuMemoryRequest": "10M",
        "gpuPortionLimit": 0.5,
        "gpuPortionRequest": 0.5,
        "gpuRequestType": "portion",
        "largeShmRequest": false
      },
      "createHomeDir": true,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "secret": {
            "name": "postgress_secret",
            "key": "POSTGRES_PASSWORD"
          },
          "configMap": {
            "name": "my-config-map",
            "key": "MY_POSTGRES_SCHEMA"
          },
          "podFieldRef": {
            "path": "metadata.name"
          },
          "userCredential": {
            "name": "my_postgres_user_and_password",
            "key": "POSTGRES_PASSWORD"
          },
          "exclude": false,
          "description": "Home directory of the user."
        }
      ],
      "image": "python:3.8",
      "imagePullPolicy": "Always",
      "imagePullSecrets": [
        {
          "name": "text",
          "userCredential": true,
          "exclude": false
        }
      ],
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodeType": "my-node-type",
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "probes": {
        "readiness": {
          "initialDelaySeconds": 1,
          "periodSeconds": 1,
          "timeoutSeconds": 1,
          "successThreshold": 1,
          "failureThreshold": 1,
          "handler": {
            "httpGet": {
              "path": "/",
              "port": 1,
              "host": "example.com",
              "scheme": "HTTP"
            }
          }
        }
      },
      "security": {
        "capabilities": [
          "CHOWN",
          "KILL"
        ],
        "hostIpc": false,
        "hostNetwork": false,
        "readOnlyRootFilesystem": false,
        "runAsGid": 30,
        "runAsNonRoot": true,
        "runAsUid": 500,
        "seccompProfileType": "RuntimeDefault",
        "supplementalGroups": "2,3,5,8",
        "uidGidSource": "fromTheImage"
      },
      "storage": {
        "configMapVolume": [
          {
            "name": "storage-instance-a",
            "configMap": "text",
            "mountPath": "text",
            "subPath": "text",
            "defaultMode": "0644",
            "exclude": false
          }
        ],
        "emptyDirVolume": [
          {
            "name": "storage-instance-a",
            "path": "/mnt/emptydir",
            "medium": "text",
            "sizeLimit": "1G",
            "exclude": false
          }
        ],
        "pvc": [
          {
            "name": "storage-instance-a",
            "path": "/container/my-claim",
            "existingPvc": false,
            "claimName": "my-claim",
            "readOnly": false,
            "ephemeral": false,
            "claimInfo": {
              "size": "1G",
              "storageClass": "my-storage-class",
              "accessModes": {
                "readWriteOnce": true,
                "readOnlyMany": false,
                "readWriteMany": false
              },
              "volumeMode": "Filesystem",
              "addedAttrValues": [
                {
                  "key": "dnsname",
                  "value": "my.dns.com"
                }
              ]
            },
            "dataSharing": false,
            "exclude": false
          }
        ],
        "secretVolume": [
          {
            "name": "storage-instance-a",
            "mountPath": "text",
            "defaultMode": "0644",
            "secret": "text",
            "exclude": false
          }
        ]
      },
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "workingDir": "/home/myfolder"
    },
    "category": "text",
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "restartPolicy": "text",
    "servingPort": {
      "port": 1,
      "container": 1,
      "protocol": "text",
      "authorizationType": "text",
      "authorizedUsers": [
        "text"
      ],
      "authorizedGroups": [
        "text"
      ],
      "clusterLocalAccessOnly": true,
      "exposeExternally": true,
      "exposedUrl": "text"
    },
    "startupPolicy": "LeaderCreated",
    "workers": 4,
    "replicas": 2,
    "autoscaling": {
      "metricThresholdPercentage": 1,
      "minReplicas": 1,
      "maxReplicas": 1,
      "initialReplicas": 1,
      "activationReplicas": 1,
      "concurrencyHardLimit": 1,
      "scaleToZeroRetentionSeconds": 1,
      "scaleDownDelaySeconds": 1,
      "metric": "http_requests_total",
      "metricThreshold": 1
    },
    "servingConfiguration": {
      "initializationTimeoutSeconds": 1,
      "requestTimeoutSeconds": 1
    },
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "cleanPodPolicy": "None",
    "command": "python",
    "completions": 1,
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "distributedFramework": "MPI",
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "imagePullSecrets": [
      {
        "name": "text",
        "userCredential": true,
        "exclude": false
      }
    ],
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "maxReplicas": 1,
    "minReplicas": 1,
    "mpiLauncherCreationPolicy": "AtStartup",
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodeType": "my-node-type",
    "numWorkers": 1,
    "parallelism": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "slotsPerWorker": 1,
    "sshAuthMountPath": "/root/.ssh",
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "combinedMasterSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "complianceIssues": []
}

Count templates. [Experimental]

get

Get the total number of templates.

Authorizations
AuthorizationstringRequired

Bearer authentication

Query parameters
filterBystring[] · max: 10Optional

Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contain, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.

Example: ["name!=some-template-name","createdAt>=2021-01-01T00:00:00Z"]
searchstringOptional

Filter results by a free text search.

Example: test project
Responses
200

Executed successfully.

application/json
countinteger · int64RequiredExample: 1
get/api/v1/workload-templates/count
GET /api/v1/workload-templates/count HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "count": 1
}

List all workspace templates. [Experimental]

get

List all workspace templates.

Authorizations
AuthorizationstringRequired

Bearer authentication

Query parameters
offsetinteger · int32Optional

The offset of the first item returned in the collection.

Example: 100
limitinteger · int32 · min: 1 · max: 500Optional

The maximum number of entries to return.

Default: 50
sortOrderstring · enumOptional

Sort results in descending or ascending order.

Default: ascPossible values:
sortBystring · enumOptional

Sort results by parameter.

Possible values:
filterBystring[] · max: 10Optional

Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contain, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.

Example: ["name!=some-template-name","createdAt>=2021-01-01T00:00:00Z"]
searchstringOptional

Filter results by a free text search.

Example: test project
complyToProjectinteger · int32Optional

Include workload creation compliance information of an asset, for a given project, as part of the response. To check compliance, you need to provide both project id and workload type.

Responses
200

Executed successfully.

application/json
get/api/v1/workload-templates/workspaces
GET /api/v1/workload-templates/workspaces HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "entries": [
    {
      "meta": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "my-template-name",
        "description": "description of my template.",
        "workloadType": "Workspace",
        "scopeType": "system",
        "scopeId": "text",
        "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
        "departmentId": 2,
        "projectId": 1,
        "createdBy": "test@lab.com",
        "createdAt": "2022-01-01T03:49:52.531Z",
        "updatedBy": "test@lab.com",
        "updatedAt": "2022-01-01T03:49:52.531Z"
      },
      "spec": {
        "annotations": [
          {
            "name": "billing",
            "value": "my-billing-unit",
            "exclude": false
          }
        ],
        "args": "-x my-script.py",
        "autoDeletionTimeAfterCompletionSeconds": 15,
        "backoffLimit": 3,
        "category": "text",
        "command": "python",
        "compute": {
          "cpuCoreLimit": 2,
          "cpuCoreRequest": 0.5,
          "cpuMemoryLimit": "30M",
          "cpuMemoryRequest": "20M",
          "extendedResources": [
            {
              "resource": "hardware-vendor.example/foo",
              "quantity": 2,
              "exclude": false
            }
          ],
          "gpuDevicesRequest": 1,
          "gpuMemoryLimit": "10M",
          "gpuMemoryRequest": "10M",
          "gpuPortionLimit": 0.5,
          "gpuPortionRequest": 0.5,
          "gpuRequestType": "portion",
          "largeShmRequest": false
        },
        "createHomeDir": true,
        "environmentVariables": [
          {
            "name": "HOME",
            "value": "/home/my-folder",
            "secret": {
              "name": "postgress_secret",
              "key": "POSTGRES_PASSWORD"
            },
            "configMap": {
              "name": "my-config-map",
              "key": "MY_POSTGRES_SCHEMA"
            },
            "podFieldRef": {
              "path": "metadata.name"
            },
            "userCredential": {
              "name": "my_postgres_user_and_password",
              "key": "POSTGRES_PASSWORD"
            },
            "exclude": false,
            "description": "Home directory of the user."
          }
        ],
        "exposedUrls": [
          {
            "container": 8080,
            "url": "https://my-url.com",
            "authorizationType": "authenticatedUsers",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "toolType": "jupyter",
            "toolName": "my-pytorch",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "image": "python:3.8",
        "imagePullPolicy": "Always",
        "labels": [
          {
            "name": "stage",
            "value": "initial-research",
            "exclude": false
          }
        ],
        "nodeAffinityRequired": {
          "nodeSelectorTerms": [
            {
              "matchExpressions": [
                {
                  "key": "text",
                  "operator": "In",
                  "values": [
                    "text"
                  ]
                }
              ]
            }
          ]
        },
        "nodePools": [
          "my-node-pool-a",
          "my-node-pool-b"
        ],
        "nodeType": "my-node-type",
        "podAffinity": {
          "type": "Required",
          "key": "text"
        },
        "ports": [
          {
            "container": 8080,
            "serviceType": "LoadBalancer",
            "external": 30080,
            "toolType": "pytorch",
            "toolName": "my-pytorch",
            "name": "port-instance-a",
            "exclude": false
          }
        ],
        "preemptibility": "preemptible",
        "priorityClass": "text",
        "probes": {
          "readiness": {
            "initialDelaySeconds": 1,
            "periodSeconds": 1,
            "timeoutSeconds": 1,
            "successThreshold": 1,
            "failureThreshold": 1,
            "handler": {
              "httpGet": {
                "path": "/",
                "port": 1,
                "host": "example.com",
                "scheme": "HTTP"
              }
            }
          }
        },
        "relatedUrls": [
          {
            "url": "https://my-url.com",
            "type": "wandb",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "restartPolicy": "Always",
        "security": {
          "allowPrivilegeEscalation": false,
          "capabilities": [
            "CHOWN",
            "KILL"
          ],
          "hostIpc": false,
          "hostNetwork": false,
          "readOnlyRootFilesystem": false,
          "runAsGid": 30,
          "runAsNonRoot": true,
          "runAsUid": 500,
          "seccompProfileType": "RuntimeDefault",
          "supplementalGroups": "2,3,5,8",
          "uidGidSource": "fromTheImage"
        },
        "stdin": true,
        "storage": {
          "configMapVolume": [
            {
              "name": "storage-instance-a",
              "configMap": "text",
              "mountPath": "text",
              "subPath": "text",
              "defaultMode": "0644",
              "exclude": false
            }
          ],
          "dataVolume": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "mountPath": "/mnt/data",
              "exclude": false
            }
          ],
          "emptyDirVolume": [
            {
              "name": "storage-instance-a",
              "path": "/mnt/emptydir",
              "medium": "text",
              "sizeLimit": "1G",
              "exclude": false
            }
          ],
          "git": [
            {
              "name": "storage-instance-a",
              "repository": "https://github.com/my-git/my-repo",
              "branch": "main",
              "revision": "text",
              "path": "/container/my-repository",
              "passwordSecret": "my-password-secret",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password",
              "exclude": false,
              "secretRef": {
                "name": "my-password-secret",
                "authenticationMethod": "password",
                "secretKeyOfUser": "User",
                "secretKeyOfPassword": "Password"
              }
            }
          ],
          "hostPath": [
            {
              "name": "storage-instance-a",
              "path": "/container/directory",
              "readOnly": true,
              "mountPath": "/local/directory",
              "mountPropagation": "None",
              "exclude": false
            }
          ],
          "nfs": [
            {
              "name": "storage-instance-a",
              "path": "/container/nfs",
              "readOnly": true,
              "server": "my.nfs.com",
              "mountPath": "/local/nfs",
              "exclude": false
            }
          ],
          "pvc": [
            {
              "name": "storage-instance-a",
              "path": "/container/my-claim",
              "existingPvc": false,
              "claimName": "my-claim",
              "readOnly": false,
              "ephemeral": false,
              "claimInfo": {
                "size": "1G",
                "storageClass": "my-storage-class",
                "accessModes": {
                  "readWriteOnce": true,
                  "readOnlyMany": false,
                  "readWriteMany": false
                },
                "volumeMode": "Filesystem",
                "addedAttrValues": [
                  {
                    "key": "dnsname",
                    "value": "my.dns.com"
                  }
                ]
              },
              "dataSharing": false,
              "exclude": false
            }
          ],
          "s3": [
            {
              "name": "storage-instance-a",
              "bucket": "my-bucket",
              "path": "/container/my-bucket",
              "url": "https://s3.amazonaws.com",
              "accessKeySecret": "my-access-key-secret",
              "secretKeyOfAccessKeyId": "AccessKeyId",
              "secretKeyOfSecretKey": "SecretKey",
              "exclude": false
            }
          ],
          "secretVolume": [
            {
              "name": "storage-instance-a",
              "mountPath": "text",
              "defaultMode": "0644",
              "secret": "text",
              "exclude": false
            }
          ]
        },
        "terminateAfterPreemption": false,
        "terminationGracePeriodSeconds": 20,
        "tolerations": [
          {
            "name": "text",
            "operator": "Equal",
            "key": "text",
            "value": "text",
            "effect": "NoSchedule",
            "seconds": 1,
            "exclude": false
          }
        ],
        "tty": true,
        "workingDir": "/home/myfolder"
      },
      "runnable": {
        "isRunnable": false,
        "issue": "mandatory image is not provided"
      },
      "combinedSpec": {
        "annotations": [
          {
            "name": "billing",
            "value": "my-billing-unit",
            "exclude": false
          }
        ],
        "args": "-x my-script.py",
        "autoDeletionTimeAfterCompletionSeconds": 15,
        "backoffLimit": 3,
        "category": "text",
        "command": "python",
        "compute": {
          "cpuCoreLimit": 2,
          "cpuCoreRequest": 0.5,
          "cpuMemoryLimit": "30M",
          "cpuMemoryRequest": "20M",
          "extendedResources": [
            {
              "resource": "hardware-vendor.example/foo",
              "quantity": 2,
              "exclude": false
            }
          ],
          "gpuDevicesRequest": 1,
          "gpuMemoryLimit": "10M",
          "gpuMemoryRequest": "10M",
          "gpuPortionLimit": 0.5,
          "gpuPortionRequest": 0.5,
          "gpuRequestType": "portion",
          "largeShmRequest": false
        },
        "createHomeDir": true,
        "environmentVariables": [
          {
            "name": "HOME",
            "value": "/home/my-folder",
            "secret": {
              "name": "postgress_secret",
              "key": "POSTGRES_PASSWORD"
            },
            "configMap": {
              "name": "my-config-map",
              "key": "MY_POSTGRES_SCHEMA"
            },
            "podFieldRef": {
              "path": "metadata.name"
            },
            "userCredential": {
              "name": "my_postgres_user_and_password",
              "key": "POSTGRES_PASSWORD"
            },
            "exclude": false,
            "description": "Home directory of the user."
          }
        ],
        "exposedUrls": [
          {
            "container": 8080,
            "url": "https://my-url.com",
            "authorizationType": "authenticatedUsers",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "toolType": "jupyter",
            "toolName": "my-pytorch",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "image": "python:3.8",
        "imagePullPolicy": "Always",
        "labels": [
          {
            "name": "stage",
            "value": "initial-research",
            "exclude": false
          }
        ],
        "nodeAffinityRequired": {
          "nodeSelectorTerms": [
            {
              "matchExpressions": [
                {
                  "key": "text",
                  "operator": "In",
                  "values": [
                    "text"
                  ]
                }
              ]
            }
          ]
        },
        "nodePools": [
          "my-node-pool-a",
          "my-node-pool-b"
        ],
        "nodeType": "my-node-type",
        "podAffinity": {
          "type": "Required",
          "key": "text"
        },
        "ports": [
          {
            "container": 8080,
            "serviceType": "LoadBalancer",
            "external": 30080,
            "toolType": "pytorch",
            "toolName": "my-pytorch",
            "name": "port-instance-a",
            "exclude": false
          }
        ],
        "preemptibility": "preemptible",
        "priorityClass": "text",
        "probes": {
          "readiness": {
            "initialDelaySeconds": 1,
            "periodSeconds": 1,
            "timeoutSeconds": 1,
            "successThreshold": 1,
            "failureThreshold": 1,
            "handler": {
              "httpGet": {
                "path": "/",
                "port": 1,
                "host": "example.com",
                "scheme": "HTTP"
              }
            }
          }
        },
        "relatedUrls": [
          {
            "url": "https://my-url.com",
            "type": "wandb",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "restartPolicy": "Always",
        "security": {
          "allowPrivilegeEscalation": false,
          "capabilities": [
            "CHOWN",
            "KILL"
          ],
          "hostIpc": false,
          "hostNetwork": false,
          "readOnlyRootFilesystem": false,
          "runAsGid": 30,
          "runAsNonRoot": true,
          "runAsUid": 500,
          "seccompProfileType": "RuntimeDefault",
          "supplementalGroups": "2,3,5,8",
          "uidGidSource": "fromTheImage"
        },
        "stdin": true,
        "storage": {
          "configMapVolume": [
            {
              "name": "storage-instance-a",
              "configMap": "text",
              "mountPath": "text",
              "subPath": "text",
              "defaultMode": "0644",
              "exclude": false
            }
          ],
          "dataVolume": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "mountPath": "/mnt/data",
              "exclude": false
            }
          ],
          "emptyDirVolume": [
            {
              "name": "storage-instance-a",
              "path": "/mnt/emptydir",
              "medium": "text",
              "sizeLimit": "1G",
              "exclude": false
            }
          ],
          "git": [
            {
              "name": "storage-instance-a",
              "repository": "https://github.com/my-git/my-repo",
              "branch": "main",
              "revision": "text",
              "path": "/container/my-repository",
              "passwordSecret": "my-password-secret",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password",
              "exclude": false,
              "secretRef": {
                "name": "my-password-secret",
                "authenticationMethod": "password",
                "secretKeyOfUser": "User",
                "secretKeyOfPassword": "Password"
              }
            }
          ],
          "hostPath": [
            {
              "name": "storage-instance-a",
              "path": "/container/directory",
              "readOnly": true,
              "mountPath": "/local/directory",
              "mountPropagation": "None",
              "exclude": false
            }
          ],
          "nfs": [
            {
              "name": "storage-instance-a",
              "path": "/container/nfs",
              "readOnly": true,
              "server": "my.nfs.com",
              "mountPath": "/local/nfs",
              "exclude": false
            }
          ],
          "pvc": [
            {
              "name": "storage-instance-a",
              "path": "/container/my-claim",
              "existingPvc": false,
              "claimName": "my-claim",
              "readOnly": false,
              "ephemeral": false,
              "claimInfo": {
                "size": "1G",
                "storageClass": "my-storage-class",
                "accessModes": {
                  "readWriteOnce": true,
                  "readOnlyMany": false,
                  "readWriteMany": false
                },
                "volumeMode": "Filesystem",
                "addedAttrValues": [
                  {
                    "key": "dnsname",
                    "value": "my.dns.com"
                  }
                ]
              },
              "dataSharing": false,
              "exclude": false
            }
          ],
          "s3": [
            {
              "name": "storage-instance-a",
              "bucket": "my-bucket",
              "path": "/container/my-bucket",
              "url": "https://s3.amazonaws.com",
              "accessKeySecret": "my-access-key-secret",
              "secretKeyOfAccessKeyId": "AccessKeyId",
              "secretKeyOfSecretKey": "SecretKey",
              "exclude": false
            }
          ],
          "secretVolume": [
            {
              "name": "storage-instance-a",
              "mountPath": "text",
              "defaultMode": "0644",
              "secret": "text",
              "exclude": false
            }
          ]
        },
        "terminateAfterPreemption": false,
        "terminationGracePeriodSeconds": 20,
        "tolerations": [
          {
            "name": "text",
            "operator": "Equal",
            "key": "text",
            "value": "text",
            "effect": "NoSchedule",
            "seconds": 1,
            "exclude": false
          }
        ],
        "tty": true,
        "workingDir": "/home/myfolder"
      }
    },
    {
      "complianceIssues": []
    }
  ],
  "pagination": {
    "limit": 1,
    "offset": 1,
    "nextOffset": 1
  }
}

Create a new workspace template. [Experimental]

post

Create a new workspace template.

Authorizations
AuthorizationstringRequired

Bearer authentication

Body
and
and
anyOptional
Responses
202

Request completed successfully.

application/json
and
and
anyOptional
and
post/api/v1/workload-templates/workspaces
POST /api/v1/workload-templates/workspaces HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 4660

{
  "meta": {
    "name": "my-template-name",
    "description": "description of my template.",
    "scopeType": "system",
    "scopeId": "text"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "description": "description of my template.",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "text",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": 2,
    "projectId": 1,
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "combinedSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}

Retrieve a specific workspace template by ID. [Experimental]

get

Retrieve a specific workspace template by ID.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
templateIdstring · uuidRequired

The Universally Unique Identifier (UUID) of the template.

Example: 550e8400-e29b-41d4-a716-446655440000
Responses
200

Executed successfully.

application/json
and
and
anyOptional
and
get/api/v1/workload-templates/workspaces/{templateId}
GET /api/v1/workload-templates/workspaces/{templateId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "description": "description of my template.",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "text",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": 2,
    "projectId": 1,
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "combinedSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}

Update a workspace template by ID. [Experimental]

put

Update a workspace template by ID.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
templateIdstring · uuidRequired

The Universally Unique Identifier (UUID) of the template.

Example: 550e8400-e29b-41d4-a716-446655440000
Body
and
and
anyOptional
Responses
200

Executed successfully.

application/json
and
and
anyOptional
and
put/api/v1/workload-templates/workspaces/{templateId}
PUT /api/v1/workload-templates/workspaces/{templateId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 4622

{
  "meta": {
    "name": "my-template-name",
    "description": "description of my template."
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "description": "description of my template.",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "text",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": 2,
    "projectId": 1,
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "combinedSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}

Delete a workspace template by ID. [Experimental]

delete

Delete a workspace template by ID.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
templateIdstring · uuidRequired

The Universally Unique Identifier (UUID) of the template.

Example: 550e8400-e29b-41d4-a716-446655440000
Responses
204

No Content.

No content

delete/api/v1/workload-templates/workspaces/{templateId}
DELETE /api/v1/workload-templates/workspaces/{templateId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Patch a workspace template by ID. [Experimental]

patch

Patch a workspace template by ID.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
templateIdstring · uuidRequired

The Universally Unique Identifier (UUID) of the template.

Example: 550e8400-e29b-41d4-a716-446655440000
Body

array of xpath expression with fields that their values should be cleared

fieldsToClearanyOptionalExample: spec.image
Responses
200

Executed successfully.

application/json
and
and
anyOptional
and
patch/api/v1/workload-templates/workspaces/{templateId}
PATCH /api/v1/workload-templates/workspaces/{templateId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 4653

{
  "meta": {
    "name": "my-template-name",
    "description": "description of my template."
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "fieldsToClear": [
    "spec.image"
  ]
}
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "description": "description of my template.",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "text",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": 2,
    "projectId": 1,
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "combinedSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}

List all training templates. [Experimental]

get

List all training templates.

Authorizations
AuthorizationstringRequired

Bearer authentication

Query parameters
offsetinteger · int32Optional

The offset of the first item returned in the collection.

Example: 100
limitinteger · int32 · min: 1 · max: 500Optional

The maximum number of entries to return.

Default: 50
sortOrderstring · enumOptional

Sort results in descending or ascending order.

Default: ascPossible values:
sortBystring · enumOptional

Sort results by parameter.

Possible values:
filterBystring[] · max: 10Optional

Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contain, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.

Example: ["name!=some-template-name","createdAt>=2021-01-01T00:00:00Z"]
searchstringOptional

Filter results by a free text search.

Example: test project
complyToProjectinteger · int32Optional

Include workload creation compliance information of an asset, for a given project, as part of the response. To check compliance, you need to provide both project id and workload type.

Responses
200

Executed successfully.

application/json
get/api/v1/workload-templates/trainings
GET /api/v1/workload-templates/trainings HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "entries": [
    {
      "meta": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "my-template-name",
        "description": "description of my template.",
        "workloadType": "Workspace",
        "scopeType": "system",
        "scopeId": "text",
        "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
        "departmentId": 2,
        "projectId": 1,
        "createdBy": "test@lab.com",
        "createdAt": "2022-01-01T03:49:52.531Z",
        "updatedBy": "test@lab.com",
        "updatedAt": "2022-01-01T03:49:52.531Z"
      },
      "spec": {
        "annotations": [
          {
            "name": "billing",
            "value": "my-billing-unit",
            "exclude": false
          }
        ],
        "args": "-x my-script.py",
        "autoDeletionTimeAfterCompletionSeconds": 15,
        "backoffLimit": 3,
        "category": "text",
        "command": "python",
        "completions": 1,
        "compute": {
          "cpuCoreLimit": 2,
          "cpuCoreRequest": 0.5,
          "cpuMemoryLimit": "30M",
          "cpuMemoryRequest": "20M",
          "extendedResources": [
            {
              "resource": "hardware-vendor.example/foo",
              "quantity": 2,
              "exclude": false
            }
          ],
          "gpuDevicesRequest": 1,
          "gpuMemoryLimit": "10M",
          "gpuMemoryRequest": "10M",
          "gpuPortionLimit": 0.5,
          "gpuPortionRequest": 0.5,
          "gpuRequestType": "portion",
          "largeShmRequest": false
        },
        "createHomeDir": true,
        "environmentVariables": [
          {
            "name": "HOME",
            "value": "/home/my-folder",
            "secret": {
              "name": "postgress_secret",
              "key": "POSTGRES_PASSWORD"
            },
            "configMap": {
              "name": "my-config-map",
              "key": "MY_POSTGRES_SCHEMA"
            },
            "podFieldRef": {
              "path": "metadata.name"
            },
            "userCredential": {
              "name": "my_postgres_user_and_password",
              "key": "POSTGRES_PASSWORD"
            },
            "exclude": false,
            "description": "Home directory of the user."
          }
        ],
        "exposedUrls": [
          {
            "container": 8080,
            "url": "https://my-url.com",
            "authorizationType": "authenticatedUsers",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "toolType": "jupyter",
            "toolName": "my-pytorch",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "image": "python:3.8",
        "imagePullPolicy": "Always",
        "labels": [
          {
            "name": "stage",
            "value": "initial-research",
            "exclude": false
          }
        ],
        "nodeAffinityRequired": {
          "nodeSelectorTerms": [
            {
              "matchExpressions": [
                {
                  "key": "text",
                  "operator": "In",
                  "values": [
                    "text"
                  ]
                }
              ]
            }
          ]
        },
        "nodePools": [
          "my-node-pool-a",
          "my-node-pool-b"
        ],
        "nodeType": "my-node-type",
        "parallelism": 1,
        "podAffinity": {
          "type": "Required",
          "key": "text"
        },
        "ports": [
          {
            "container": 8080,
            "serviceType": "LoadBalancer",
            "external": 30080,
            "toolType": "pytorch",
            "toolName": "my-pytorch",
            "name": "port-instance-a",
            "exclude": false
          }
        ],
        "preemptibility": "preemptible",
        "priorityClass": "text",
        "probes": {
          "readiness": {
            "initialDelaySeconds": 1,
            "periodSeconds": 1,
            "timeoutSeconds": 1,
            "successThreshold": 1,
            "failureThreshold": 1,
            "handler": {
              "httpGet": {
                "path": "/",
                "port": 1,
                "host": "example.com",
                "scheme": "HTTP"
              }
            }
          }
        },
        "relatedUrls": [
          {
            "url": "https://my-url.com",
            "type": "wandb",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "restartPolicy": "Always",
        "security": {
          "allowPrivilegeEscalation": false,
          "capabilities": [
            "CHOWN",
            "KILL"
          ],
          "hostIpc": false,
          "hostNetwork": false,
          "readOnlyRootFilesystem": false,
          "runAsGid": 30,
          "runAsNonRoot": true,
          "runAsUid": 500,
          "seccompProfileType": "RuntimeDefault",
          "supplementalGroups": "2,3,5,8",
          "uidGidSource": "fromTheImage"
        },
        "stdin": true,
        "storage": {
          "configMapVolume": [
            {
              "name": "storage-instance-a",
              "configMap": "text",
              "mountPath": "text",
              "subPath": "text",
              "defaultMode": "0644",
              "exclude": false
            }
          ],
          "dataVolume": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "mountPath": "/mnt/data",
              "exclude": false
            }
          ],
          "emptyDirVolume": [
            {
              "name": "storage-instance-a",
              "path": "/mnt/emptydir",
              "medium": "text",
              "sizeLimit": "1G",
              "exclude": false
            }
          ],
          "git": [
            {
              "name": "storage-instance-a",
              "repository": "https://github.com/my-git/my-repo",
              "branch": "main",
              "revision": "text",
              "path": "/container/my-repository",
              "passwordSecret": "my-password-secret",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password",
              "exclude": false,
              "secretRef": {
                "name": "my-password-secret",
                "authenticationMethod": "password",
                "secretKeyOfUser": "User",
                "secretKeyOfPassword": "Password"
              }
            }
          ],
          "hostPath": [
            {
              "name": "storage-instance-a",
              "path": "/container/directory",
              "readOnly": true,
              "mountPath": "/local/directory",
              "mountPropagation": "None",
              "exclude": false
            }
          ],
          "nfs": [
            {
              "name": "storage-instance-a",
              "path": "/container/nfs",
              "readOnly": true,
              "server": "my.nfs.com",
              "mountPath": "/local/nfs",
              "exclude": false
            }
          ],
          "pvc": [
            {
              "name": "storage-instance-a",
              "path": "/container/my-claim",
              "existingPvc": false,
              "claimName": "my-claim",
              "readOnly": false,
              "ephemeral": false,
              "claimInfo": {
                "size": "1G",
                "storageClass": "my-storage-class",
                "accessModes": {
                  "readWriteOnce": true,
                  "readOnlyMany": false,
                  "readWriteMany": false
                },
                "volumeMode": "Filesystem",
                "addedAttrValues": [
                  {
                    "key": "dnsname",
                    "value": "my.dns.com"
                  }
                ]
              },
              "dataSharing": false,
              "exclude": false
            }
          ],
          "s3": [
            {
              "name": "storage-instance-a",
              "bucket": "my-bucket",
              "path": "/container/my-bucket",
              "url": "https://s3.amazonaws.com",
              "accessKeySecret": "my-access-key-secret",
              "secretKeyOfAccessKeyId": "AccessKeyId",
              "secretKeyOfSecretKey": "SecretKey",
              "exclude": false
            }
          ],
          "secretVolume": [
            {
              "name": "storage-instance-a",
              "mountPath": "text",
              "defaultMode": "0644",
              "secret": "text",
              "exclude": false
            }
          ]
        },
        "terminateAfterPreemption": false,
        "terminationGracePeriodSeconds": 20,
        "tolerations": [
          {
            "name": "text",
            "operator": "Equal",
            "key": "text",
            "value": "text",
            "effect": "NoSchedule",
            "seconds": 1,
            "exclude": false
          }
        ],
        "tty": true,
        "workingDir": "/home/myfolder"
      },
      "runnable": {
        "isRunnable": false,
        "issue": "mandatory image is not provided"
      },
      "combinedSpec": {
        "annotations": [
          {
            "name": "billing",
            "value": "my-billing-unit",
            "exclude": false
          }
        ],
        "args": "-x my-script.py",
        "autoDeletionTimeAfterCompletionSeconds": 15,
        "backoffLimit": 3,
        "category": "text",
        "command": "python",
        "completions": 1,
        "compute": {
          "cpuCoreLimit": 2,
          "cpuCoreRequest": 0.5,
          "cpuMemoryLimit": "30M",
          "cpuMemoryRequest": "20M",
          "extendedResources": [
            {
              "resource": "hardware-vendor.example/foo",
              "quantity": 2,
              "exclude": false
            }
          ],
          "gpuDevicesRequest": 1,
          "gpuMemoryLimit": "10M",
          "gpuMemoryRequest": "10M",
          "gpuPortionLimit": 0.5,
          "gpuPortionRequest": 0.5,
          "gpuRequestType": "portion",
          "largeShmRequest": false
        },
        "createHomeDir": true,
        "environmentVariables": [
          {
            "name": "HOME",
            "value": "/home/my-folder",
            "secret": {
              "name": "postgress_secret",
              "key": "POSTGRES_PASSWORD"
            },
            "configMap": {
              "name": "my-config-map",
              "key": "MY_POSTGRES_SCHEMA"
            },
            "podFieldRef": {
              "path": "metadata.name"
            },
            "userCredential": {
              "name": "my_postgres_user_and_password",
              "key": "POSTGRES_PASSWORD"
            },
            "exclude": false,
            "description": "Home directory of the user."
          }
        ],
        "exposedUrls": [
          {
            "container": 8080,
            "url": "https://my-url.com",
            "authorizationType": "authenticatedUsers",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "toolType": "jupyter",
            "toolName": "my-pytorch",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "image": "python:3.8",
        "imagePullPolicy": "Always",
        "labels": [
          {
            "name": "stage",
            "value": "initial-research",
            "exclude": false
          }
        ],
        "nodeAffinityRequired": {
          "nodeSelectorTerms": [
            {
              "matchExpressions": [
                {
                  "key": "text",
                  "operator": "In",
                  "values": [
                    "text"
                  ]
                }
              ]
            }
          ]
        },
        "nodePools": [
          "my-node-pool-a",
          "my-node-pool-b"
        ],
        "nodeType": "my-node-type",
        "parallelism": 1,
        "podAffinity": {
          "type": "Required",
          "key": "text"
        },
        "ports": [
          {
            "container": 8080,
            "serviceType": "LoadBalancer",
            "external": 30080,
            "toolType": "pytorch",
            "toolName": "my-pytorch",
            "name": "port-instance-a",
            "exclude": false
          }
        ],
        "preemptibility": "preemptible",
        "priorityClass": "text",
        "probes": {
          "readiness": {
            "initialDelaySeconds": 1,
            "periodSeconds": 1,
            "timeoutSeconds": 1,
            "successThreshold": 1,
            "failureThreshold": 1,
            "handler": {
              "httpGet": {
                "path": "/",
                "port": 1,
                "host": "example.com",
                "scheme": "HTTP"
              }
            }
          }
        },
        "relatedUrls": [
          {
            "url": "https://my-url.com",
            "type": "wandb",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "restartPolicy": "Always",
        "security": {
          "allowPrivilegeEscalation": false,
          "capabilities": [
            "CHOWN",
            "KILL"
          ],
          "hostIpc": false,
          "hostNetwork": false,
          "readOnlyRootFilesystem": false,
          "runAsGid": 30,
          "runAsNonRoot": true,
          "runAsUid": 500,
          "seccompProfileType": "RuntimeDefault",
          "supplementalGroups": "2,3,5,8",
          "uidGidSource": "fromTheImage"
        },
        "stdin": true,
        "storage": {
          "configMapVolume": [
            {
              "name": "storage-instance-a",
              "configMap": "text",
              "mountPath": "text",
              "subPath": "text",
              "defaultMode": "0644",
              "exclude": false
            }
          ],
          "dataVolume": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "mountPath": "/mnt/data",
              "exclude": false
            }
          ],
          "emptyDirVolume": [
            {
              "name": "storage-instance-a",
              "path": "/mnt/emptydir",
              "medium": "text",
              "sizeLimit": "1G",
              "exclude": false
            }
          ],
          "git": [
            {
              "name": "storage-instance-a",
              "repository": "https://github.com/my-git/my-repo",
              "branch": "main",
              "revision": "text",
              "path": "/container/my-repository",
              "passwordSecret": "my-password-secret",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password",
              "exclude": false,
              "secretRef": {
                "name": "my-password-secret",
                "authenticationMethod": "password",
                "secretKeyOfUser": "User",
                "secretKeyOfPassword": "Password"
              }
            }
          ],
          "hostPath": [
            {
              "name": "storage-instance-a",
              "path": "/container/directory",
              "readOnly": true,
              "mountPath": "/local/directory",
              "mountPropagation": "None",
              "exclude": false
            }
          ],
          "nfs": [
            {
              "name": "storage-instance-a",
              "path": "/container/nfs",
              "readOnly": true,
              "server": "my.nfs.com",
              "mountPath": "/local/nfs",
              "exclude": false
            }
          ],
          "pvc": [
            {
              "name": "storage-instance-a",
              "path": "/container/my-claim",
              "existingPvc": false,
              "claimName": "my-claim",
              "readOnly": false,
              "ephemeral": false,
              "claimInfo": {
                "size": "1G",
                "storageClass": "my-storage-class",
                "accessModes": {
                  "readWriteOnce": true,
                  "readOnlyMany": false,
                  "readWriteMany": false
                },
                "volumeMode": "Filesystem",
                "addedAttrValues": [
                  {
                    "key": "dnsname",
                    "value": "my.dns.com"
                  }
                ]
              },
              "dataSharing": false,
              "exclude": false
            }
          ],
          "s3": [
            {
              "name": "storage-instance-a",
              "bucket": "my-bucket",
              "path": "/container/my-bucket",
              "url": "https://s3.amazonaws.com",
              "accessKeySecret": "my-access-key-secret",
              "secretKeyOfAccessKeyId": "AccessKeyId",
              "secretKeyOfSecretKey": "SecretKey",
              "exclude": false
            }
          ],
          "secretVolume": [
            {
              "name": "storage-instance-a",
              "mountPath": "text",
              "defaultMode": "0644",
              "secret": "text",
              "exclude": false
            }
          ]
        },
        "terminateAfterPreemption": false,
        "terminationGracePeriodSeconds": 20,
        "tolerations": [
          {
            "name": "text",
            "operator": "Equal",
            "key": "text",
            "value": "text",
            "effect": "NoSchedule",
            "seconds": 1,
            "exclude": false
          }
        ],
        "tty": true,
        "workingDir": "/home/myfolder"
      }
    },
    {
      "complianceIssues": []
    }
  ],
  "pagination": {
    "limit": 1,
    "offset": 1,
    "nextOffset": 1
  }
}

Create a new training template. [Experimental]

post

Create a new training template.

Authorizations
AuthorizationstringRequired

Bearer authentication

Body
and
and
anyOptional
Responses
202

Request completed successfully.

application/json
and
and
anyOptional
and
post/api/v1/workload-templates/trainings
POST /api/v1/workload-templates/trainings HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 4692

{
  "meta": {
    "name": "my-template-name",
    "description": "description of my template.",
    "scopeType": "system",
    "scopeId": "text"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "completions": 1,
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "parallelism": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "description": "description of my template.",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "text",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": 2,
    "projectId": 1,
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "completions": 1,
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "parallelism": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "combinedSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "completions": 1,
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "parallelism": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}

Retrieve a specific training template by ID. [Experimental]

get

Retrieve a specific training template by ID.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
templateIdstring · uuidRequired

The Universally Unique Identifier (UUID) of the template.

Example: 550e8400-e29b-41d4-a716-446655440000
Responses
200

Executed successfully.

application/json
and
and
anyOptional
and
get/api/v1/workload-templates/trainings/{templateId}
GET /api/v1/workload-templates/trainings/{templateId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "description": "description of my template.",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "text",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": 2,
    "projectId": 1,
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "completions": 1,
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "parallelism": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "combinedSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "completions": 1,
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "parallelism": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}

Update a training template by ID. [Experimental]

put

Update a training template by ID.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
templateIdstring · uuidRequired

The Universally Unique Identifier (UUID) of the template.

Example: 550e8400-e29b-41d4-a716-446655440000
Body
and
and
anyOptional
Responses
200

Executed successfully.

application/json
and
and
anyOptional
and
put/api/v1/workload-templates/trainings/{templateId}
PUT /api/v1/workload-templates/trainings/{templateId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 4654

{
  "meta": {
    "name": "my-template-name",
    "description": "description of my template."
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "completions": 1,
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "parallelism": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "description": "description of my template.",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "text",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": 2,
    "projectId": 1,
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "completions": 1,
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "parallelism": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "combinedSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "completions": 1,
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "parallelism": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}

Delete a training template by ID. [Experimental]

delete

Delete a training template by ID.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
templateIdstring · uuidRequired

The Universally Unique Identifier (UUID) of the template.

Example: 550e8400-e29b-41d4-a716-446655440000
Responses
204

No Content.

No content

delete/api/v1/workload-templates/trainings/{templateId}
DELETE /api/v1/workload-templates/trainings/{templateId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Patch a training template by ID. [Experimental]

patch

Patch a training template by ID.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
templateIdstring · uuidRequired

The Universally Unique Identifier (UUID) of the template.

Example: 550e8400-e29b-41d4-a716-446655440000
Body

array of xpath expression with fields that their values should be cleared

fieldsToClearanyOptionalExample: spec.image
Responses
200

Executed successfully.

application/json
and
and
anyOptional
and
patch/api/v1/workload-templates/trainings/{templateId}
PATCH /api/v1/workload-templates/trainings/{templateId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 4685

{
  "meta": {
    "name": "my-template-name",
    "description": "description of my template."
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "completions": 1,
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "parallelism": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "fieldsToClear": [
    "spec.image"
  ]
}
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "description": "description of my template.",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "text",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": 2,
    "projectId": 1,
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "completions": 1,
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "parallelism": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "combinedSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "command": "python",
    "completions": 1,
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "parallelism": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}

List all distributed training templates. [Experimental]

get

List all distributed training templates.

Authorizations
AuthorizationstringRequired

Bearer authentication

Query parameters
offsetinteger · int32Optional

The offset of the first item returned in the collection.

Example: 100
limitinteger · int32 · min: 1 · max: 500Optional

The maximum number of entries to return.

Default: 50
sortOrderstring · enumOptional

Sort results in descending or ascending order.

Default: ascPossible values:
sortBystring · enumOptional

Sort results by parameter.

Possible values:
filterBystring[] · max: 10Optional

Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contain, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.

Example: ["name!=some-template-name","createdAt>=2021-01-01T00:00:00Z"]
searchstringOptional

Filter results by a free text search.

Example: test project
complyToProjectinteger · int32Optional

Include workload creation compliance information of an asset, for a given project, as part of the response. To check compliance, you need to provide both project id and workload type.

complyToReplicaTypestring · enumOptional

Include workload creation compliance information of an asset, for a given replica type, as part of the response. To check compliance, you need to provide both project id and workload type. For distributed, replica type should be provided as well.

Possible values:
Responses
200

Executed successfully.

application/json
get/api/v1/workload-templates/distributed
GET /api/v1/workload-templates/distributed HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "entries": [
    {
      "meta": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "my-template-name",
        "description": "description of my template.",
        "workloadType": "Workspace",
        "scopeType": "system",
        "scopeId": "text",
        "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
        "departmentId": 2,
        "projectId": 1,
        "createdBy": "test@lab.com",
        "createdAt": "2022-01-01T03:49:52.531Z",
        "updatedBy": "test@lab.com",
        "updatedAt": "2022-01-01T03:49:52.531Z"
      },
      "spec": {
        "annotations": [
          {
            "name": "billing",
            "value": "my-billing-unit",
            "exclude": false
          }
        ],
        "args": "-x my-script.py",
        "autoDeletionTimeAfterCompletionSeconds": 15,
        "backoffLimit": 3,
        "category": "text",
        "cleanPodPolicy": "None",
        "command": "python",
        "compute": {
          "cpuCoreLimit": 2,
          "cpuCoreRequest": 0.5,
          "cpuMemoryLimit": "30M",
          "cpuMemoryRequest": "20M",
          "extendedResources": [
            {
              "resource": "hardware-vendor.example/foo",
              "quantity": 2,
              "exclude": false
            }
          ],
          "gpuDevicesRequest": 1,
          "gpuMemoryLimit": "10M",
          "gpuMemoryRequest": "10M",
          "gpuPortionLimit": 0.5,
          "gpuPortionRequest": 0.5,
          "gpuRequestType": "portion",
          "largeShmRequest": false
        },
        "createHomeDir": true,
        "distributedFramework": "MPI",
        "environmentVariables": [
          {
            "name": "HOME",
            "value": "/home/my-folder",
            "secret": {
              "name": "postgress_secret",
              "key": "POSTGRES_PASSWORD"
            },
            "configMap": {
              "name": "my-config-map",
              "key": "MY_POSTGRES_SCHEMA"
            },
            "podFieldRef": {
              "path": "metadata.name"
            },
            "userCredential": {
              "name": "my_postgres_user_and_password",
              "key": "POSTGRES_PASSWORD"
            },
            "exclude": false,
            "description": "Home directory of the user."
          }
        ],
        "exposedUrls": [
          {
            "container": 8080,
            "url": "https://my-url.com",
            "authorizationType": "authenticatedUsers",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "toolType": "jupyter",
            "toolName": "my-pytorch",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "image": "python:3.8",
        "imagePullPolicy": "Always",
        "labels": [
          {
            "name": "stage",
            "value": "initial-research",
            "exclude": false
          }
        ],
        "maxReplicas": 1,
        "minReplicas": 1,
        "mpiLauncherCreationPolicy": "AtStartup",
        "nodeAffinityRequired": {
          "nodeSelectorTerms": [
            {
              "matchExpressions": [
                {
                  "key": "text",
                  "operator": "In",
                  "values": [
                    "text"
                  ]
                }
              ]
            }
          ]
        },
        "nodePools": [
          "my-node-pool-a",
          "my-node-pool-b"
        ],
        "nodeType": "my-node-type",
        "numWorkers": 1,
        "podAffinity": {
          "type": "Required",
          "key": "text"
        },
        "ports": [
          {
            "container": 8080,
            "serviceType": "LoadBalancer",
            "external": 30080,
            "toolType": "pytorch",
            "toolName": "my-pytorch",
            "name": "port-instance-a",
            "exclude": false
          }
        ],
        "preemptibility": "preemptible",
        "priorityClass": "text",
        "probes": {
          "readiness": {
            "initialDelaySeconds": 1,
            "periodSeconds": 1,
            "timeoutSeconds": 1,
            "successThreshold": 1,
            "failureThreshold": 1,
            "handler": {
              "httpGet": {
                "path": "/",
                "port": 1,
                "host": "example.com",
                "scheme": "HTTP"
              }
            }
          }
        },
        "relatedUrls": [
          {
            "url": "https://my-url.com",
            "type": "wandb",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "restartPolicy": "Always",
        "security": {
          "allowPrivilegeEscalation": false,
          "capabilities": [
            "CHOWN",
            "KILL"
          ],
          "hostIpc": false,
          "hostNetwork": false,
          "readOnlyRootFilesystem": false,
          "runAsGid": 30,
          "runAsNonRoot": true,
          "runAsUid": 500,
          "seccompProfileType": "RuntimeDefault",
          "supplementalGroups": "2,3,5,8",
          "uidGidSource": "fromTheImage"
        },
        "slotsPerWorker": 1,
        "sshAuthMountPath": "/root/.ssh",
        "stdin": true,
        "storage": {
          "configMapVolume": [
            {
              "name": "storage-instance-a",
              "configMap": "text",
              "mountPath": "text",
              "subPath": "text",
              "defaultMode": "0644",
              "exclude": false
            }
          ],
          "dataVolume": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "mountPath": "/mnt/data",
              "exclude": false
            }
          ],
          "emptyDirVolume": [
            {
              "name": "storage-instance-a",
              "path": "/mnt/emptydir",
              "medium": "text",
              "sizeLimit": "1G",
              "exclude": false
            }
          ],
          "git": [
            {
              "name": "storage-instance-a",
              "repository": "https://github.com/my-git/my-repo",
              "branch": "main",
              "revision": "text",
              "path": "/container/my-repository",
              "passwordSecret": "my-password-secret",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password",
              "exclude": false,
              "secretRef": {
                "name": "my-password-secret",
                "authenticationMethod": "password",
                "secretKeyOfUser": "User",
                "secretKeyOfPassword": "Password"
              }
            }
          ],
          "hostPath": [
            {
              "name": "storage-instance-a",
              "path": "/container/directory",
              "readOnly": true,
              "mountPath": "/local/directory",
              "mountPropagation": "None",
              "exclude": false
            }
          ],
          "nfs": [
            {
              "name": "storage-instance-a",
              "path": "/container/nfs",
              "readOnly": true,
              "server": "my.nfs.com",
              "mountPath": "/local/nfs",
              "exclude": false
            }
          ],
          "pvc": [
            {
              "name": "storage-instance-a",
              "path": "/container/my-claim",
              "existingPvc": false,
              "claimName": "my-claim",
              "readOnly": false,
              "ephemeral": false,
              "claimInfo": {
                "size": "1G",
                "storageClass": "my-storage-class",
                "accessModes": {
                  "readWriteOnce": true,
                  "readOnlyMany": false,
                  "readWriteMany": false
                },
                "volumeMode": "Filesystem",
                "addedAttrValues": [
                  {
                    "key": "dnsname",
                    "value": "my.dns.com"
                  }
                ]
              },
              "dataSharing": false,
              "exclude": false
            }
          ],
          "s3": [
            {
              "name": "storage-instance-a",
              "bucket": "my-bucket",
              "path": "/container/my-bucket",
              "url": "https://s3.amazonaws.com",
              "accessKeySecret": "my-access-key-secret",
              "secretKeyOfAccessKeyId": "AccessKeyId",
              "secretKeyOfSecretKey": "SecretKey",
              "exclude": false
            }
          ],
          "secretVolume": [
            {
              "name": "storage-instance-a",
              "mountPath": "text",
              "defaultMode": "0644",
              "secret": "text",
              "exclude": false
            }
          ]
        },
        "terminateAfterPreemption": false,
        "terminationGracePeriodSeconds": 20,
        "tolerations": [
          {
            "name": "text",
            "operator": "Equal",
            "key": "text",
            "value": "text",
            "effect": "NoSchedule",
            "seconds": 1,
            "exclude": false
          }
        ],
        "tty": true,
        "workingDir": "/home/myfolder"
      },
      "masterSpecSameAsWorker": true,
      "master": {
        "spec": {
          "annotations": [
            {
              "name": "billing",
              "value": "my-billing-unit",
              "exclude": false
            }
          ],
          "args": "-x my-script.py",
          "category": "text",
          "command": "python",
          "compute": {
            "cpuCoreLimit": 2,
            "cpuCoreRequest": 0.5,
            "cpuMemoryLimit": "30M",
            "cpuMemoryRequest": "20M",
            "extendedResources": [
              {
                "resource": "hardware-vendor.example/foo",
                "quantity": 2,
                "exclude": false
              }
            ],
            "gpuDevicesRequest": 1,
            "gpuMemoryLimit": "10M",
            "gpuMemoryRequest": "10M",
            "gpuPortionLimit": 0.5,
            "gpuPortionRequest": 0.5,
            "gpuRequestType": "portion",
            "largeShmRequest": false
          },
          "createHomeDir": true,
          "environmentVariables": [
            {
              "name": "HOME",
              "value": "/home/my-folder",
              "secret": {
                "name": "postgress_secret",
                "key": "POSTGRES_PASSWORD"
              },
              "configMap": {
                "name": "my-config-map",
                "key": "MY_POSTGRES_SCHEMA"
              },
              "podFieldRef": {
                "path": "metadata.name"
              },
              "userCredential": {
                "name": "my_postgres_user_and_password",
                "key": "POSTGRES_PASSWORD"
              },
              "exclude": false,
              "description": "Home directory of the user."
            }
          ],
          "exposedUrls": [
            {
              "container": 8080,
              "url": "https://my-url.com",
              "authorizationType": "authenticatedUsers",
              "authorizedUsers": [
                "user-a",
                "user-b"
              ],
              "authorizedGroups": [
                "group-a",
                "group-b"
              ],
              "toolType": "jupyter",
              "toolName": "my-pytorch",
              "name": "url-instance-a",
              "exclude": false
            }
          ],
          "image": "python:3.8",
          "imagePullPolicy": "Always",
          "labels": [
            {
              "name": "stage",
              "value": "initial-research",
              "exclude": false
            }
          ],
          "nodeAffinityRequired": {
            "nodeSelectorTerms": [
              {
                "matchExpressions": [
                  {
                    "key": "text",
                    "operator": "In",
                    "values": [
                      "text"
                    ]
                  }
                ]
              }
            ]
          },
          "nodePools": [
            "my-node-pool-a",
            "my-node-pool-b"
          ],
          "nodeType": "my-node-type",
          "podAffinity": {
            "type": "Required",
            "key": "text"
          },
          "ports": [
            {
              "container": 8080,
              "serviceType": "LoadBalancer",
              "external": 30080,
              "toolType": "pytorch",
              "toolName": "my-pytorch",
              "name": "port-instance-a",
              "exclude": false
            }
          ],
          "preemptibility": "preemptible",
          "probes": {
            "readiness": {
              "initialDelaySeconds": 1,
              "periodSeconds": 1,
              "timeoutSeconds": 1,
              "successThreshold": 1,
              "failureThreshold": 1,
              "handler": {
                "httpGet": {
                  "path": "/",
                  "port": 1,
                  "host": "example.com",
                  "scheme": "HTTP"
                }
              }
            }
          },
          "relatedUrls": [
            {
              "url": "https://my-url.com",
              "type": "wandb",
              "name": "url-instance-a",
              "exclude": false
            }
          ],
          "restartPolicy": "Always",
          "security": {
            "allowPrivilegeEscalation": false,
            "capabilities": [
              "CHOWN",
              "KILL"
            ],
            "hostIpc": false,
            "hostNetwork": false,
            "readOnlyRootFilesystem": false,
            "runAsGid": 30,
            "runAsNonRoot": true,
            "runAsUid": 500,
            "seccompProfileType": "RuntimeDefault",
            "supplementalGroups": "2,3,5,8",
            "uidGidSource": "fromTheImage"
          },
          "stdin": true,
          "storage": {
            "configMapVolume": [
              {
                "name": "storage-instance-a",
                "configMap": "text",
                "mountPath": "text",
                "subPath": "text",
                "defaultMode": "0644",
                "exclude": false
              }
            ],
            "dataVolume": [
              {
                "id": "123e4567-e89b-12d3-a456-426614174000",
                "mountPath": "/mnt/data",
                "exclude": false
              }
            ],
            "emptyDirVolume": [
              {
                "name": "storage-instance-a",
                "path": "/mnt/emptydir",
                "medium": "text",
                "sizeLimit": "1G",
                "exclude": false
              }
            ],
            "git": [
              {
                "name": "storage-instance-a",
                "repository": "https://github.com/my-git/my-repo",
                "branch": "main",
                "revision": "text",
                "path": "/container/my-repository",
                "passwordSecret": "my-password-secret",
                "secretKeyOfUser": "User",
                "secretKeyOfPassword": "Password",
                "exclude": false,
                "secretRef": {
                  "name": "my-password-secret",
                  "authenticationMethod": "password",
                  "secretKeyOfUser": "User",
                  "secretKeyOfPassword": "Password"
                }
              }
            ],
            "hostPath": [
              {
                "name": "storage-instance-a",
                "path": "/container/directory",
                "readOnly": true,
                "mountPath": "/local/directory",
                "mountPropagation": "None",
                "exclude": false
              }
            ],
            "nfs": [
              {
                "name": "storage-instance-a",
                "path": "/container/nfs",
                "readOnly": true,
                "server": "my.nfs.com",
                "mountPath": "/local/nfs",
                "exclude": false
              }
            ],
            "pvc": [
              {
                "name": "storage-instance-a",
                "path": "/container/my-claim",
                "existingPvc": false,
                "claimName": "my-claim",
                "readOnly": false,
                "ephemeral": false,
                "claimInfo": {
                  "size": "1G",
                  "storageClass": "my-storage-class",
                  "accessModes": {
                    "readWriteOnce": true,
                    "readOnlyMany": false,
                    "readWriteMany": false
                  },
                  "volumeMode": "Filesystem",
                  "addedAttrValues": [
                    {
                      "key": "dnsname",
                      "value": "my.dns.com"
                    }
                  ]
                },
                "dataSharing": false,
                "exclude": false
              }
            ],
            "s3": [
              {
                "name": "storage-instance-a",
                "bucket": "my-bucket",
                "path": "/container/my-bucket",
                "url": "https://s3.amazonaws.com",
                "accessKeySecret": "my-access-key-secret",
                "secretKeyOfAccessKeyId": "AccessKeyId",
                "secretKeyOfSecretKey": "SecretKey",
                "exclude": false
              }
            ],
            "secretVolume": [
              {
                "name": "storage-instance-a",
                "mountPath": "text",
                "defaultMode": "0644",
                "secret": "text",
                "exclude": false
              }
            ]
          },
          "terminateAfterPreemption": false,
          "tolerations": [
            {
              "name": "text",
              "operator": "Equal",
              "key": "text",
              "value": "text",
              "effect": "NoSchedule",
              "seconds": 1,
              "exclude": false
            }
          ],
          "tty": true,
          "workingDir": "/home/myfolder"
        },
        "assets": {}
      },
      "runnable": {
        "isRunnable": false,
        "issue": "mandatory image is not provided"
      },
      "combinedSpec": {
        "annotations": [
          {
            "name": "billing",
            "value": "my-billing-unit",
            "exclude": false
          }
        ],
        "args": "-x my-script.py",
        "autoDeletionTimeAfterCompletionSeconds": 15,
        "backoffLimit": 3,
        "category": "text",
        "cleanPodPolicy": "None",
        "command": "python",
        "compute": {
          "cpuCoreLimit": 2,
          "cpuCoreRequest": 0.5,
          "cpuMemoryLimit": "30M",
          "cpuMemoryRequest": "20M",
          "extendedResources": [
            {
              "resource": "hardware-vendor.example/foo",
              "quantity": 2,
              "exclude": false
            }
          ],
          "gpuDevicesRequest": 1,
          "gpuMemoryLimit": "10M",
          "gpuMemoryRequest": "10M",
          "gpuPortionLimit": 0.5,
          "gpuPortionRequest": 0.5,
          "gpuRequestType": "portion",
          "largeShmRequest": false
        },
        "createHomeDir": true,
        "distributedFramework": "MPI",
        "environmentVariables": [
          {
            "name": "HOME",
            "value": "/home/my-folder",
            "secret": {
              "name": "postgress_secret",
              "key": "POSTGRES_PASSWORD"
            },
            "configMap": {
              "name": "my-config-map",
              "key": "MY_POSTGRES_SCHEMA"
            },
            "podFieldRef": {
              "path": "metadata.name"
            },
            "userCredential": {
              "name": "my_postgres_user_and_password",
              "key": "POSTGRES_PASSWORD"
            },
            "exclude": false,
            "description": "Home directory of the user."
          }
        ],
        "exposedUrls": [
          {
            "container": 8080,
            "url": "https://my-url.com",
            "authorizationType": "authenticatedUsers",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "toolType": "jupyter",
            "toolName": "my-pytorch",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "image": "python:3.8",
        "imagePullPolicy": "Always",
        "imagePullSecrets": [
          {
            "name": "text",
            "userCredential": true,
            "exclude": false
          }
        ],
        "labels": [
          {
            "name": "stage",
            "value": "initial-research",
            "exclude": false
          }
        ],
        "maxReplicas": 1,
        "minReplicas": 1,
        "mpiLauncherCreationPolicy": "AtStartup",
        "nodeAffinityRequired": {
          "nodeSelectorTerms": [
            {
              "matchExpressions": [
                {
                  "key": "text",
                  "operator": "In",
                  "values": [
                    "text"
                  ]
                }
              ]
            }
          ]
        },
        "nodePools": [
          "my-node-pool-a",
          "my-node-pool-b"
        ],
        "nodeType": "my-node-type",
        "numWorkers": 1,
        "podAffinity": {
          "type": "Required",
          "key": "text"
        },
        "ports": [
          {
            "container": 8080,
            "serviceType": "LoadBalancer",
            "external": 30080,
            "toolType": "pytorch",
            "toolName": "my-pytorch",
            "name": "port-instance-a",
            "exclude": false
          }
        ],
        "preemptibility": "preemptible",
        "priorityClass": "text",
        "probes": {
          "readiness": {
            "initialDelaySeconds": 1,
            "periodSeconds": 1,
            "timeoutSeconds": 1,
            "successThreshold": 1,
            "failureThreshold": 1,
            "handler": {
              "httpGet": {
                "path": "/",
                "port": 1,
                "host": "example.com",
                "scheme": "HTTP"
              }
            }
          }
        },
        "relatedUrls": [
          {
            "url": "https://my-url.com",
            "type": "wandb",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "restartPolicy": "Always",
        "security": {
          "allowPrivilegeEscalation": false,
          "capabilities": [
            "CHOWN",
            "KILL"
          ],
          "hostIpc": false,
          "hostNetwork": false,
          "readOnlyRootFilesystem": false,
          "runAsGid": 30,
          "runAsNonRoot": true,
          "runAsUid": 500,
          "seccompProfileType": "RuntimeDefault",
          "supplementalGroups": "2,3,5,8",
          "uidGidSource": "fromTheImage"
        },
        "slotsPerWorker": 1,
        "sshAuthMountPath": "/root/.ssh",
        "stdin": true,
        "storage": {
          "configMapVolume": [
            {
              "name": "storage-instance-a",
              "configMap": "text",
              "mountPath": "text",
              "subPath": "text",
              "defaultMode": "0644",
              "exclude": false
            }
          ],
          "dataVolume": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "mountPath": "/mnt/data",
              "exclude": false
            }
          ],
          "emptyDirVolume": [
            {
              "name": "storage-instance-a",
              "path": "/mnt/emptydir",
              "medium": "text",
              "sizeLimit": "1G",
              "exclude": false
            }
          ],
          "git": [
            {
              "name": "storage-instance-a",
              "repository": "https://github.com/my-git/my-repo",
              "branch": "main",
              "revision": "text",
              "path": "/container/my-repository",
              "passwordSecret": "my-password-secret",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password",
              "exclude": false,
              "secretRef": {
                "name": "my-password-secret",
                "authenticationMethod": "password",
                "secretKeyOfUser": "User",
                "secretKeyOfPassword": "Password"
              }
            }
          ],
          "hostPath": [
            {
              "name": "storage-instance-a",
              "path": "/container/directory",
              "readOnly": true,
              "mountPath": "/local/directory",
              "mountPropagation": "None",
              "exclude": false
            }
          ],
          "nfs": [
            {
              "name": "storage-instance-a",
              "path": "/container/nfs",
              "readOnly": true,
              "server": "my.nfs.com",
              "mountPath": "/local/nfs",
              "exclude": false
            }
          ],
          "pvc": [
            {
              "name": "storage-instance-a",
              "path": "/container/my-claim",
              "existingPvc": false,
              "claimName": "my-claim",
              "readOnly": false,
              "ephemeral": false,
              "claimInfo": {
                "size": "1G",
                "storageClass": "my-storage-class",
                "accessModes": {
                  "readWriteOnce": true,
                  "readOnlyMany": false,
                  "readWriteMany": false
                },
                "volumeMode": "Filesystem",
                "addedAttrValues": [
                  {
                    "key": "dnsname",
                    "value": "my.dns.com"
                  }
                ]
              },
              "dataSharing": false,
              "exclude": false
            }
          ],
          "s3": [
            {
              "name": "storage-instance-a",
              "bucket": "my-bucket",
              "path": "/container/my-bucket",
              "url": "https://s3.amazonaws.com",
              "accessKeySecret": "my-access-key-secret",
              "secretKeyOfAccessKeyId": "AccessKeyId",
              "secretKeyOfSecretKey": "SecretKey",
              "exclude": false
            }
          ],
          "secretVolume": [
            {
              "name": "storage-instance-a",
              "mountPath": "text",
              "defaultMode": "0644",
              "secret": "text",
              "exclude": false
            }
          ]
        },
        "terminateAfterPreemption": false,
        "terminationGracePeriodSeconds": 20,
        "tolerations": [
          {
            "name": "text",
            "operator": "Equal",
            "key": "text",
            "value": "text",
            "effect": "NoSchedule",
            "seconds": 1,
            "exclude": false
          }
        ],
        "tty": true,
        "workingDir": "/home/myfolder"
      },
      "combinedMasterSpec": {
        "annotations": [
          {
            "name": "billing",
            "value": "my-billing-unit",
            "exclude": false
          }
        ],
        "args": "-x my-script.py",
        "category": "text",
        "command": "python",
        "compute": {
          "cpuCoreLimit": 2,
          "cpuCoreRequest": 0.5,
          "cpuMemoryLimit": "30M",
          "cpuMemoryRequest": "20M",
          "extendedResources": [
            {
              "resource": "hardware-vendor.example/foo",
              "quantity": 2,
              "exclude": false
            }
          ],
          "gpuDevicesRequest": 1,
          "gpuMemoryLimit": "10M",
          "gpuMemoryRequest": "10M",
          "gpuPortionLimit": 0.5,
          "gpuPortionRequest": 0.5,
          "gpuRequestType": "portion",
          "largeShmRequest": false
        },
        "createHomeDir": true,
        "environmentVariables": [
          {
            "name": "HOME",
            "value": "/home/my-folder",
            "secret": {
              "name": "postgress_secret",
              "key": "POSTGRES_PASSWORD"
            },
            "configMap": {
              "name": "my-config-map",
              "key": "MY_POSTGRES_SCHEMA"
            },
            "podFieldRef": {
              "path": "metadata.name"
            },
            "userCredential": {
              "name": "my_postgres_user_and_password",
              "key": "POSTGRES_PASSWORD"
            },
            "exclude": false,
            "description": "Home directory of the user."
          }
        ],
        "exposedUrls": [
          {
            "container": 8080,
            "url": "https://my-url.com",
            "authorizationType": "authenticatedUsers",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "toolType": "jupyter",
            "toolName": "my-pytorch",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "image": "python:3.8",
        "imagePullPolicy": "Always",
        "labels": [
          {
            "name": "stage",
            "value": "initial-research",
            "exclude": false
          }
        ],
        "nodeAffinityRequired": {
          "nodeSelectorTerms": [
            {
              "matchExpressions": [
                {
                  "key": "text",
                  "operator": "In",
                  "values": [
                    "text"
                  ]
                }
              ]
            }
          ]
        },
        "nodePools": [
          "my-node-pool-a",
          "my-node-pool-b"
        ],
        "nodeType": "my-node-type",
        "podAffinity": {
          "type": "Required",
          "key": "text"
        },
        "ports": [
          {
            "container": 8080,
            "serviceType": "LoadBalancer",
            "external": 30080,
            "toolType": "pytorch",
            "toolName": "my-pytorch",
            "name": "port-instance-a",
            "exclude": false
          }
        ],
        "preemptibility": "preemptible",
        "probes": {
          "readiness": {
            "initialDelaySeconds": 1,
            "periodSeconds": 1,
            "timeoutSeconds": 1,
            "successThreshold": 1,
            "failureThreshold": 1,
            "handler": {
              "httpGet": {
                "path": "/",
                "port": 1,
                "host": "example.com",
                "scheme": "HTTP"
              }
            }
          }
        },
        "relatedUrls": [
          {
            "url": "https://my-url.com",
            "type": "wandb",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "restartPolicy": "Always",
        "security": {
          "allowPrivilegeEscalation": false,
          "capabilities": [
            "CHOWN",
            "KILL"
          ],
          "hostIpc": false,
          "hostNetwork": false,
          "readOnlyRootFilesystem": false,
          "runAsGid": 30,
          "runAsNonRoot": true,
          "runAsUid": 500,
          "seccompProfileType": "RuntimeDefault",
          "supplementalGroups": "2,3,5,8",
          "uidGidSource": "fromTheImage"
        },
        "stdin": true,
        "storage": {
          "configMapVolume": [
            {
              "name": "storage-instance-a",
              "configMap": "text",
              "mountPath": "text",
              "subPath": "text",
              "defaultMode": "0644",
              "exclude": false
            }
          ],
          "dataVolume": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "mountPath": "/mnt/data",
              "exclude": false
            }
          ],
          "emptyDirVolume": [
            {
              "name": "storage-instance-a",
              "path": "/mnt/emptydir",
              "medium": "text",
              "sizeLimit": "1G",
              "exclude": false
            }
          ],
          "git": [
            {
              "name": "storage-instance-a",
              "repository": "https://github.com/my-git/my-repo",
              "branch": "main",
              "revision": "text",
              "path": "/container/my-repository",
              "passwordSecret": "my-password-secret",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password",
              "exclude": false,
              "secretRef": {
                "name": "my-password-secret",
                "authenticationMethod": "password",
                "secretKeyOfUser": "User",
                "secretKeyOfPassword": "Password"
              }
            }
          ],
          "hostPath": [
            {
              "name": "storage-instance-a",
              "path": "/container/directory",
              "readOnly": true,
              "mountPath": "/local/directory",
              "mountPropagation": "None",
              "exclude": false
            }
          ],
          "nfs": [
            {
              "name": "storage-instance-a",
              "path": "/container/nfs",
              "readOnly": true,
              "server": "my.nfs.com",
              "mountPath": "/local/nfs",
              "exclude": false
            }
          ],
          "pvc": [
            {
              "name": "storage-instance-a",
              "path": "/container/my-claim",
              "existingPvc": false,
              "claimName": "my-claim",
              "readOnly": false,
              "ephemeral": false,
              "claimInfo": {
                "size": "1G",
                "storageClass": "my-storage-class",
                "accessModes": {
                  "readWriteOnce": true,
                  "readOnlyMany": false,
                  "readWriteMany": false
                },
                "volumeMode": "Filesystem",
                "addedAttrValues": [
                  {
                    "key": "dnsname",
                    "value": "my.dns.com"
                  }
                ]
              },
              "dataSharing": false,
              "exclude": false
            }
          ],
          "s3": [
            {
              "name": "storage-instance-a",
              "bucket": "my-bucket",
              "path": "/container/my-bucket",
              "url": "https://s3.amazonaws.com",
              "accessKeySecret": "my-access-key-secret",
              "secretKeyOfAccessKeyId": "AccessKeyId",
              "secretKeyOfSecretKey": "SecretKey",
              "exclude": false
            }
          ],
          "secretVolume": [
            {
              "name": "storage-instance-a",
              "mountPath": "text",
              "defaultMode": "0644",
              "secret": "text",
              "exclude": false
            }
          ]
        },
        "terminateAfterPreemption": false,
        "tolerations": [
          {
            "name": "text",
            "operator": "Equal",
            "key": "text",
            "value": "text",
            "effect": "NoSchedule",
            "seconds": 1,
            "exclude": false
          }
        ],
        "tty": true,
        "workingDir": "/home/myfolder"
      }
    },
    {
      "complianceIssues": []
    }
  ],
  "pagination": {
    "limit": 1,
    "offset": 1,
    "nextOffset": 1
  }
}

Create a new distributed training template. [Experimental]

post

Create a new distributed training template.

Authorizations
AuthorizationstringRequired

Bearer authentication

Body
and
Responses
202

Request completed successfully.

application/json
and
post/api/v1/workload-templates/distributed
POST /api/v1/workload-templates/distributed HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 9327

{
  "meta": {
    "name": "my-template-name",
    "description": "description of my template.",
    "scopeType": "system",
    "scopeId": "text"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "cleanPodPolicy": "None",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "distributedFramework": "MPI",
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "maxReplicas": 1,
    "minReplicas": 1,
    "mpiLauncherCreationPolicy": "AtStartup",
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "numWorkers": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "slotsPerWorker": 1,
    "sshAuthMountPath": "/root/.ssh",
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "masterSpecSameAsWorker": true,
  "master": {
    "spec": {
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "category": "text",
      "command": "python",
      "compute": {
        "cpuCoreLimit": 2,
        "cpuCoreRequest": 0.5,
        "cpuMemoryLimit": "30M",
        "cpuMemoryRequest": "20M",
        "extendedResources": [
          {
            "resource": "hardware-vendor.example/foo",
            "quantity": 2,
            "exclude": false
          }
        ],
        "gpuDevicesRequest": 1,
        "gpuMemoryLimit": "10M",
        "gpuMemoryRequest": "10M",
        "gpuPortionLimit": 0.5,
        "gpuPortionRequest": 0.5,
        "gpuRequestType": "portion",
        "largeShmRequest": false
      },
      "createHomeDir": true,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "secret": {
            "name": "postgress_secret",
            "key": "POSTGRES_PASSWORD"
          },
          "configMap": {
            "name": "my-config-map",
            "key": "MY_POSTGRES_SCHEMA"
          },
          "podFieldRef": {
            "path": "metadata.name"
          },
          "userCredential": {
            "name": "my_postgres_user_and_password",
            "key": "POSTGRES_PASSWORD"
          },
          "exclude": false,
          "description": "Home directory of the user."
        }
      ],
      "exposedUrls": [
        {
          "container": 8080,
          "url": "https://my-url.com",
          "authorizationType": "authenticatedUsers",
          "authorizedUsers": [
            "user-a",
            "user-b"
          ],
          "authorizedGroups": [
            "group-a",
            "group-b"
          ],
          "toolType": "jupyter",
          "toolName": "my-pytorch",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "image": "python:3.8",
      "imagePullPolicy": "Always",
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodePools": [
        "my-node-pool-a",
        "my-node-pool-b"
      ],
      "nodeType": "my-node-type",
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "ports": [
        {
          "container": 8080,
          "serviceType": "LoadBalancer",
          "external": 30080,
          "toolType": "pytorch",
          "toolName": "my-pytorch",
          "name": "port-instance-a",
          "exclude": false
        }
      ],
      "preemptibility": "preemptible",
      "probes": {
        "readiness": {
          "initialDelaySeconds": 1,
          "periodSeconds": 1,
          "timeoutSeconds": 1,
          "successThreshold": 1,
          "failureThreshold": 1,
          "handler": {
            "httpGet": {
              "path": "/",
              "port": 1,
              "host": "example.com",
              "scheme": "HTTP"
            }
          }
        }
      },
      "relatedUrls": [
        {
          "url": "https://my-url.com",
          "type": "wandb",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "restartPolicy": "Always",
      "security": {
        "allowPrivilegeEscalation": false,
        "capabilities": [
          "CHOWN",
          "KILL"
        ],
        "hostIpc": false,
        "hostNetwork": false,
        "readOnlyRootFilesystem": false,
        "runAsGid": 30,
        "runAsNonRoot": true,
        "runAsUid": 500,
        "seccompProfileType": "RuntimeDefault",
        "supplementalGroups": "2,3,5,8",
        "uidGidSource": "fromTheImage"
      },
      "stdin": true,
      "storage": {
        "configMapVolume": [
          {
            "name": "storage-instance-a",
            "configMap": "text",
            "mountPath": "text",
            "subPath": "text",
            "defaultMode": "0644",
            "exclude": false
          }
        ],
        "dataVolume": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "mountPath": "/mnt/data",
            "exclude": false
          }
        ],
        "emptyDirVolume": [
          {
            "name": "storage-instance-a",
            "path": "/mnt/emptydir",
            "medium": "text",
            "sizeLimit": "1G",
            "exclude": false
          }
        ],
        "git": [
          {
            "name": "storage-instance-a",
            "repository": "https://github.com/my-git/my-repo",
            "branch": "main",
            "revision": "text",
            "path": "/container/my-repository",
            "passwordSecret": "my-password-secret",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password",
            "exclude": false,
            "secretRef": {
              "name": "my-password-secret",
              "authenticationMethod": "password",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password"
            }
          }
        ],
        "hostPath": [
          {
            "name": "storage-instance-a",
            "path": "/container/directory",
            "readOnly": true,
            "mountPath": "/local/directory",
            "mountPropagation": "None",
            "exclude": false
          }
        ],
        "nfs": [
          {
            "name": "storage-instance-a",
            "path": "/container/nfs",
            "readOnly": true,
            "server": "my.nfs.com",
            "mountPath": "/local/nfs",
            "exclude": false
          }
        ],
        "pvc": [
          {
            "name": "storage-instance-a",
            "path": "/container/my-claim",
            "existingPvc": false,
            "claimName": "my-claim",
            "readOnly": false,
            "ephemeral": false,
            "claimInfo": {
              "size": "1G",
              "storageClass": "my-storage-class",
              "accessModes": {
                "readWriteOnce": true,
                "readOnlyMany": false,
                "readWriteMany": false
              },
              "volumeMode": "Filesystem",
              "addedAttrValues": [
                {
                  "key": "dnsname",
                  "value": "my.dns.com"
                }
              ]
            },
            "dataSharing": false,
            "exclude": false
          }
        ],
        "s3": [
          {
            "name": "storage-instance-a",
            "bucket": "my-bucket",
            "path": "/container/my-bucket",
            "url": "https://s3.amazonaws.com",
            "accessKeySecret": "my-access-key-secret",
            "secretKeyOfAccessKeyId": "AccessKeyId",
            "secretKeyOfSecretKey": "SecretKey",
            "exclude": false
          }
        ],
        "secretVolume": [
          {
            "name": "storage-instance-a",
            "mountPath": "text",
            "defaultMode": "0644",
            "secret": "text",
            "exclude": false
          }
        ]
      },
      "terminateAfterPreemption": false,
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "tty": true,
      "workingDir": "/home/myfolder"
    },
    "assets": {}
  }
}
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "description": "description of my template.",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "text",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": 2,
    "projectId": 1,
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "cleanPodPolicy": "None",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "distributedFramework": "MPI",
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "maxReplicas": 1,
    "minReplicas": 1,
    "mpiLauncherCreationPolicy": "AtStartup",
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "numWorkers": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "slotsPerWorker": 1,
    "sshAuthMountPath": "/root/.ssh",
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "masterSpecSameAsWorker": true,
  "master": {
    "spec": {
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "category": "text",
      "command": "python",
      "compute": {
        "cpuCoreLimit": 2,
        "cpuCoreRequest": 0.5,
        "cpuMemoryLimit": "30M",
        "cpuMemoryRequest": "20M",
        "extendedResources": [
          {
            "resource": "hardware-vendor.example/foo",
            "quantity": 2,
            "exclude": false
          }
        ],
        "gpuDevicesRequest": 1,
        "gpuMemoryLimit": "10M",
        "gpuMemoryRequest": "10M",
        "gpuPortionLimit": 0.5,
        "gpuPortionRequest": 0.5,
        "gpuRequestType": "portion",
        "largeShmRequest": false
      },
      "createHomeDir": true,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "secret": {
            "name": "postgress_secret",
            "key": "POSTGRES_PASSWORD"
          },
          "configMap": {
            "name": "my-config-map",
            "key": "MY_POSTGRES_SCHEMA"
          },
          "podFieldRef": {
            "path": "metadata.name"
          },
          "userCredential": {
            "name": "my_postgres_user_and_password",
            "key": "POSTGRES_PASSWORD"
          },
          "exclude": false,
          "description": "Home directory of the user."
        }
      ],
      "exposedUrls": [
        {
          "container": 8080,
          "url": "https://my-url.com",
          "authorizationType": "authenticatedUsers",
          "authorizedUsers": [
            "user-a",
            "user-b"
          ],
          "authorizedGroups": [
            "group-a",
            "group-b"
          ],
          "toolType": "jupyter",
          "toolName": "my-pytorch",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "image": "python:3.8",
      "imagePullPolicy": "Always",
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodePools": [
        "my-node-pool-a",
        "my-node-pool-b"
      ],
      "nodeType": "my-node-type",
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "ports": [
        {
          "container": 8080,
          "serviceType": "LoadBalancer",
          "external": 30080,
          "toolType": "pytorch",
          "toolName": "my-pytorch",
          "name": "port-instance-a",
          "exclude": false
        }
      ],
      "preemptibility": "preemptible",
      "probes": {
        "readiness": {
          "initialDelaySeconds": 1,
          "periodSeconds": 1,
          "timeoutSeconds": 1,
          "successThreshold": 1,
          "failureThreshold": 1,
          "handler": {
            "httpGet": {
              "path": "/",
              "port": 1,
              "host": "example.com",
              "scheme": "HTTP"
            }
          }
        }
      },
      "relatedUrls": [
        {
          "url": "https://my-url.com",
          "type": "wandb",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "restartPolicy": "Always",
      "security": {
        "allowPrivilegeEscalation": false,
        "capabilities": [
          "CHOWN",
          "KILL"
        ],
        "hostIpc": false,
        "hostNetwork": false,
        "readOnlyRootFilesystem": false,
        "runAsGid": 30,
        "runAsNonRoot": true,
        "runAsUid": 500,
        "seccompProfileType": "RuntimeDefault",
        "supplementalGroups": "2,3,5,8",
        "uidGidSource": "fromTheImage"
      },
      "stdin": true,
      "storage": {
        "configMapVolume": [
          {
            "name": "storage-instance-a",
            "configMap": "text",
            "mountPath": "text",
            "subPath": "text",
            "defaultMode": "0644",
            "exclude": false
          }
        ],
        "dataVolume": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "mountPath": "/mnt/data",
            "exclude": false
          }
        ],
        "emptyDirVolume": [
          {
            "name": "storage-instance-a",
            "path": "/mnt/emptydir",
            "medium": "text",
            "sizeLimit": "1G",
            "exclude": false
          }
        ],
        "git": [
          {
            "name": "storage-instance-a",
            "repository": "https://github.com/my-git/my-repo",
            "branch": "main",
            "revision": "text",
            "path": "/container/my-repository",
            "passwordSecret": "my-password-secret",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password",
            "exclude": false,
            "secretRef": {
              "name": "my-password-secret",
              "authenticationMethod": "password",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password"
            }
          }
        ],
        "hostPath": [
          {
            "name": "storage-instance-a",
            "path": "/container/directory",
            "readOnly": true,
            "mountPath": "/local/directory",
            "mountPropagation": "None",
            "exclude": false
          }
        ],
        "nfs": [
          {
            "name": "storage-instance-a",
            "path": "/container/nfs",
            "readOnly": true,
            "server": "my.nfs.com",
            "mountPath": "/local/nfs",
            "exclude": false
          }
        ],
        "pvc": [
          {
            "name": "storage-instance-a",
            "path": "/container/my-claim",
            "existingPvc": false,
            "claimName": "my-claim",
            "readOnly": false,
            "ephemeral": false,
            "claimInfo": {
              "size": "1G",
              "storageClass": "my-storage-class",
              "accessModes": {
                "readWriteOnce": true,
                "readOnlyMany": false,
                "readWriteMany": false
              },
              "volumeMode": "Filesystem",
              "addedAttrValues": [
                {
                  "key": "dnsname",
                  "value": "my.dns.com"
                }
              ]
            },
            "dataSharing": false,
            "exclude": false
          }
        ],
        "s3": [
          {
            "name": "storage-instance-a",
            "bucket": "my-bucket",
            "path": "/container/my-bucket",
            "url": "https://s3.amazonaws.com",
            "accessKeySecret": "my-access-key-secret",
            "secretKeyOfAccessKeyId": "AccessKeyId",
            "secretKeyOfSecretKey": "SecretKey",
            "exclude": false
          }
        ],
        "secretVolume": [
          {
            "name": "storage-instance-a",
            "mountPath": "text",
            "defaultMode": "0644",
            "secret": "text",
            "exclude": false
          }
        ]
      },
      "terminateAfterPreemption": false,
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "tty": true,
      "workingDir": "/home/myfolder"
    },
    "assets": {}
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "combinedSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "cleanPodPolicy": "None",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "distributedFramework": "MPI",
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "imagePullSecrets": [
      {
        "name": "text",
        "userCredential": true,
        "exclude": false
      }
    ],
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "maxReplicas": 1,
    "minReplicas": 1,
    "mpiLauncherCreationPolicy": "AtStartup",
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "numWorkers": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "slotsPerWorker": 1,
    "sshAuthMountPath": "/root/.ssh",
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "combinedMasterSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}

Get a specific distributed training template by ID. [Experimental]

get

Get a specific distributed training template by ID.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
templateIdstring · uuidRequired

The Universally Unique Identifier (UUID) of the template.

Example: 550e8400-e29b-41d4-a716-446655440000
Responses
200

Executed successfully.

application/json
and
get/api/v1/workload-templates/distributed/{templateId}
GET /api/v1/workload-templates/distributed/{templateId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "description": "description of my template.",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "text",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": 2,
    "projectId": 1,
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "cleanPodPolicy": "None",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "distributedFramework": "MPI",
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "maxReplicas": 1,
    "minReplicas": 1,
    "mpiLauncherCreationPolicy": "AtStartup",
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "numWorkers": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "slotsPerWorker": 1,
    "sshAuthMountPath": "/root/.ssh",
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "masterSpecSameAsWorker": true,
  "master": {
    "spec": {
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "category": "text",
      "command": "python",
      "compute": {
        "cpuCoreLimit": 2,
        "cpuCoreRequest": 0.5,
        "cpuMemoryLimit": "30M",
        "cpuMemoryRequest": "20M",
        "extendedResources": [
          {
            "resource": "hardware-vendor.example/foo",
            "quantity": 2,
            "exclude": false
          }
        ],
        "gpuDevicesRequest": 1,
        "gpuMemoryLimit": "10M",
        "gpuMemoryRequest": "10M",
        "gpuPortionLimit": 0.5,
        "gpuPortionRequest": 0.5,
        "gpuRequestType": "portion",
        "largeShmRequest": false
      },
      "createHomeDir": true,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "secret": {
            "name": "postgress_secret",
            "key": "POSTGRES_PASSWORD"
          },
          "configMap": {
            "name": "my-config-map",
            "key": "MY_POSTGRES_SCHEMA"
          },
          "podFieldRef": {
            "path": "metadata.name"
          },
          "userCredential": {
            "name": "my_postgres_user_and_password",
            "key": "POSTGRES_PASSWORD"
          },
          "exclude": false,
          "description": "Home directory of the user."
        }
      ],
      "exposedUrls": [
        {
          "container": 8080,
          "url": "https://my-url.com",
          "authorizationType": "authenticatedUsers",
          "authorizedUsers": [
            "user-a",
            "user-b"
          ],
          "authorizedGroups": [
            "group-a",
            "group-b"
          ],
          "toolType": "jupyter",
          "toolName": "my-pytorch",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "image": "python:3.8",
      "imagePullPolicy": "Always",
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodePools": [
        "my-node-pool-a",
        "my-node-pool-b"
      ],
      "nodeType": "my-node-type",
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "ports": [
        {
          "container": 8080,
          "serviceType": "LoadBalancer",
          "external": 30080,
          "toolType": "pytorch",
          "toolName": "my-pytorch",
          "name": "port-instance-a",
          "exclude": false
        }
      ],
      "preemptibility": "preemptible",
      "probes": {
        "readiness": {
          "initialDelaySeconds": 1,
          "periodSeconds": 1,
          "timeoutSeconds": 1,
          "successThreshold": 1,
          "failureThreshold": 1,
          "handler": {
            "httpGet": {
              "path": "/",
              "port": 1,
              "host": "example.com",
              "scheme": "HTTP"
            }
          }
        }
      },
      "relatedUrls": [
        {
          "url": "https://my-url.com",
          "type": "wandb",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "restartPolicy": "Always",
      "security": {
        "allowPrivilegeEscalation": false,
        "capabilities": [
          "CHOWN",
          "KILL"
        ],
        "hostIpc": false,
        "hostNetwork": false,
        "readOnlyRootFilesystem": false,
        "runAsGid": 30,
        "runAsNonRoot": true,
        "runAsUid": 500,
        "seccompProfileType": "RuntimeDefault",
        "supplementalGroups": "2,3,5,8",
        "uidGidSource": "fromTheImage"
      },
      "stdin": true,
      "storage": {
        "configMapVolume": [
          {
            "name": "storage-instance-a",
            "configMap": "text",
            "mountPath": "text",
            "subPath": "text",
            "defaultMode": "0644",
            "exclude": false
          }
        ],
        "dataVolume": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "mountPath": "/mnt/data",
            "exclude": false
          }
        ],
        "emptyDirVolume": [
          {
            "name": "storage-instance-a",
            "path": "/mnt/emptydir",
            "medium": "text",
            "sizeLimit": "1G",
            "exclude": false
          }
        ],
        "git": [
          {
            "name": "storage-instance-a",
            "repository": "https://github.com/my-git/my-repo",
            "branch": "main",
            "revision": "text",
            "path": "/container/my-repository",
            "passwordSecret": "my-password-secret",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password",
            "exclude": false,
            "secretRef": {
              "name": "my-password-secret",
              "authenticationMethod": "password",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password"
            }
          }
        ],
        "hostPath": [
          {
            "name": "storage-instance-a",
            "path": "/container/directory",
            "readOnly": true,
            "mountPath": "/local/directory",
            "mountPropagation": "None",
            "exclude": false
          }
        ],
        "nfs": [
          {
            "name": "storage-instance-a",
            "path": "/container/nfs",
            "readOnly": true,
            "server": "my.nfs.com",
            "mountPath": "/local/nfs",
            "exclude": false
          }
        ],
        "pvc": [
          {
            "name": "storage-instance-a",
            "path": "/container/my-claim",
            "existingPvc": false,
            "claimName": "my-claim",
            "readOnly": false,
            "ephemeral": false,
            "claimInfo": {
              "size": "1G",
              "storageClass": "my-storage-class",
              "accessModes": {
                "readWriteOnce": true,
                "readOnlyMany": false,
                "readWriteMany": false
              },
              "volumeMode": "Filesystem",
              "addedAttrValues": [
                {
                  "key": "dnsname",
                  "value": "my.dns.com"
                }
              ]
            },
            "dataSharing": false,
            "exclude": false
          }
        ],
        "s3": [
          {
            "name": "storage-instance-a",
            "bucket": "my-bucket",
            "path": "/container/my-bucket",
            "url": "https://s3.amazonaws.com",
            "accessKeySecret": "my-access-key-secret",
            "secretKeyOfAccessKeyId": "AccessKeyId",
            "secretKeyOfSecretKey": "SecretKey",
            "exclude": false
          }
        ],
        "secretVolume": [
          {
            "name": "storage-instance-a",
            "mountPath": "text",
            "defaultMode": "0644",
            "secret": "text",
            "exclude": false
          }
        ]
      },
      "terminateAfterPreemption": false,
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "tty": true,
      "workingDir": "/home/myfolder"
    },
    "assets": {}
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "combinedSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "cleanPodPolicy": "None",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "distributedFramework": "MPI",
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "imagePullSecrets": [
      {
        "name": "text",
        "userCredential": true,
        "exclude": false
      }
    ],
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "maxReplicas": 1,
    "minReplicas": 1,
    "mpiLauncherCreationPolicy": "AtStartup",
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "numWorkers": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "slotsPerWorker": 1,
    "sshAuthMountPath": "/root/.ssh",
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "combinedMasterSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}

Update a distributed training template by ID. [Experimental]

put

Update a distributed training template by ID.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
templateIdstring · uuidRequired

The Universally Unique Identifier (UUID) of the template.

Example: 550e8400-e29b-41d4-a716-446655440000
Body
and
Responses
200

Executed successfully.

application/json
and
put/api/v1/workload-templates/distributed/{templateId}
PUT /api/v1/workload-templates/distributed/{templateId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 9289

{
  "meta": {
    "name": "my-template-name",
    "description": "description of my template."
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "cleanPodPolicy": "None",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "distributedFramework": "MPI",
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "maxReplicas": 1,
    "minReplicas": 1,
    "mpiLauncherCreationPolicy": "AtStartup",
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "numWorkers": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "slotsPerWorker": 1,
    "sshAuthMountPath": "/root/.ssh",
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "masterSpecSameAsWorker": true,
  "master": {
    "spec": {
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "category": "text",
      "command": "python",
      "compute": {
        "cpuCoreLimit": 2,
        "cpuCoreRequest": 0.5,
        "cpuMemoryLimit": "30M",
        "cpuMemoryRequest": "20M",
        "extendedResources": [
          {
            "resource": "hardware-vendor.example/foo",
            "quantity": 2,
            "exclude": false
          }
        ],
        "gpuDevicesRequest": 1,
        "gpuMemoryLimit": "10M",
        "gpuMemoryRequest": "10M",
        "gpuPortionLimit": 0.5,
        "gpuPortionRequest": 0.5,
        "gpuRequestType": "portion",
        "largeShmRequest": false
      },
      "createHomeDir": true,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "secret": {
            "name": "postgress_secret",
            "key": "POSTGRES_PASSWORD"
          },
          "configMap": {
            "name": "my-config-map",
            "key": "MY_POSTGRES_SCHEMA"
          },
          "podFieldRef": {
            "path": "metadata.name"
          },
          "userCredential": {
            "name": "my_postgres_user_and_password",
            "key": "POSTGRES_PASSWORD"
          },
          "exclude": false,
          "description": "Home directory of the user."
        }
      ],
      "exposedUrls": [
        {
          "container": 8080,
          "url": "https://my-url.com",
          "authorizationType": "authenticatedUsers",
          "authorizedUsers": [
            "user-a",
            "user-b"
          ],
          "authorizedGroups": [
            "group-a",
            "group-b"
          ],
          "toolType": "jupyter",
          "toolName": "my-pytorch",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "image": "python:3.8",
      "imagePullPolicy": "Always",
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodePools": [
        "my-node-pool-a",
        "my-node-pool-b"
      ],
      "nodeType": "my-node-type",
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "ports": [
        {
          "container": 8080,
          "serviceType": "LoadBalancer",
          "external": 30080,
          "toolType": "pytorch",
          "toolName": "my-pytorch",
          "name": "port-instance-a",
          "exclude": false
        }
      ],
      "preemptibility": "preemptible",
      "probes": {
        "readiness": {
          "initialDelaySeconds": 1,
          "periodSeconds": 1,
          "timeoutSeconds": 1,
          "successThreshold": 1,
          "failureThreshold": 1,
          "handler": {
            "httpGet": {
              "path": "/",
              "port": 1,
              "host": "example.com",
              "scheme": "HTTP"
            }
          }
        }
      },
      "relatedUrls": [
        {
          "url": "https://my-url.com",
          "type": "wandb",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "restartPolicy": "Always",
      "security": {
        "allowPrivilegeEscalation": false,
        "capabilities": [
          "CHOWN",
          "KILL"
        ],
        "hostIpc": false,
        "hostNetwork": false,
        "readOnlyRootFilesystem": false,
        "runAsGid": 30,
        "runAsNonRoot": true,
        "runAsUid": 500,
        "seccompProfileType": "RuntimeDefault",
        "supplementalGroups": "2,3,5,8",
        "uidGidSource": "fromTheImage"
      },
      "stdin": true,
      "storage": {
        "configMapVolume": [
          {
            "name": "storage-instance-a",
            "configMap": "text",
            "mountPath": "text",
            "subPath": "text",
            "defaultMode": "0644",
            "exclude": false
          }
        ],
        "dataVolume": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "mountPath": "/mnt/data",
            "exclude": false
          }
        ],
        "emptyDirVolume": [
          {
            "name": "storage-instance-a",
            "path": "/mnt/emptydir",
            "medium": "text",
            "sizeLimit": "1G",
            "exclude": false
          }
        ],
        "git": [
          {
            "name": "storage-instance-a",
            "repository": "https://github.com/my-git/my-repo",
            "branch": "main",
            "revision": "text",
            "path": "/container/my-repository",
            "passwordSecret": "my-password-secret",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password",
            "exclude": false,
            "secretRef": {
              "name": "my-password-secret",
              "authenticationMethod": "password",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password"
            }
          }
        ],
        "hostPath": [
          {
            "name": "storage-instance-a",
            "path": "/container/directory",
            "readOnly": true,
            "mountPath": "/local/directory",
            "mountPropagation": "None",
            "exclude": false
          }
        ],
        "nfs": [
          {
            "name": "storage-instance-a",
            "path": "/container/nfs",
            "readOnly": true,
            "server": "my.nfs.com",
            "mountPath": "/local/nfs",
            "exclude": false
          }
        ],
        "pvc": [
          {
            "name": "storage-instance-a",
            "path": "/container/my-claim",
            "existingPvc": false,
            "claimName": "my-claim",
            "readOnly": false,
            "ephemeral": false,
            "claimInfo": {
              "size": "1G",
              "storageClass": "my-storage-class",
              "accessModes": {
                "readWriteOnce": true,
                "readOnlyMany": false,
                "readWriteMany": false
              },
              "volumeMode": "Filesystem",
              "addedAttrValues": [
                {
                  "key": "dnsname",
                  "value": "my.dns.com"
                }
              ]
            },
            "dataSharing": false,
            "exclude": false
          }
        ],
        "s3": [
          {
            "name": "storage-instance-a",
            "bucket": "my-bucket",
            "path": "/container/my-bucket",
            "url": "https://s3.amazonaws.com",
            "accessKeySecret": "my-access-key-secret",
            "secretKeyOfAccessKeyId": "AccessKeyId",
            "secretKeyOfSecretKey": "SecretKey",
            "exclude": false
          }
        ],
        "secretVolume": [
          {
            "name": "storage-instance-a",
            "mountPath": "text",
            "defaultMode": "0644",
            "secret": "text",
            "exclude": false
          }
        ]
      },
      "terminateAfterPreemption": false,
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "tty": true,
      "workingDir": "/home/myfolder"
    },
    "assets": {}
  }
}
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "description": "description of my template.",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "text",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": 2,
    "projectId": 1,
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "cleanPodPolicy": "None",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "distributedFramework": "MPI",
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "maxReplicas": 1,
    "minReplicas": 1,
    "mpiLauncherCreationPolicy": "AtStartup",
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "numWorkers": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "slotsPerWorker": 1,
    "sshAuthMountPath": "/root/.ssh",
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "masterSpecSameAsWorker": true,
  "master": {
    "spec": {
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "category": "text",
      "command": "python",
      "compute": {
        "cpuCoreLimit": 2,
        "cpuCoreRequest": 0.5,
        "cpuMemoryLimit": "30M",
        "cpuMemoryRequest": "20M",
        "extendedResources": [
          {
            "resource": "hardware-vendor.example/foo",
            "quantity": 2,
            "exclude": false
          }
        ],
        "gpuDevicesRequest": 1,
        "gpuMemoryLimit": "10M",
        "gpuMemoryRequest": "10M",
        "gpuPortionLimit": 0.5,
        "gpuPortionRequest": 0.5,
        "gpuRequestType": "portion",
        "largeShmRequest": false
      },
      "createHomeDir": true,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "secret": {
            "name": "postgress_secret",
            "key": "POSTGRES_PASSWORD"
          },
          "configMap": {
            "name": "my-config-map",
            "key": "MY_POSTGRES_SCHEMA"
          },
          "podFieldRef": {
            "path": "metadata.name"
          },
          "userCredential": {
            "name": "my_postgres_user_and_password",
            "key": "POSTGRES_PASSWORD"
          },
          "exclude": false,
          "description": "Home directory of the user."
        }
      ],
      "exposedUrls": [
        {
          "container": 8080,
          "url": "https://my-url.com",
          "authorizationType": "authenticatedUsers",
          "authorizedUsers": [
            "user-a",
            "user-b"
          ],
          "authorizedGroups": [
            "group-a",
            "group-b"
          ],
          "toolType": "jupyter",
          "toolName": "my-pytorch",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "image": "python:3.8",
      "imagePullPolicy": "Always",
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodePools": [
        "my-node-pool-a",
        "my-node-pool-b"
      ],
      "nodeType": "my-node-type",
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "ports": [
        {
          "container": 8080,
          "serviceType": "LoadBalancer",
          "external": 30080,
          "toolType": "pytorch",
          "toolName": "my-pytorch",
          "name": "port-instance-a",
          "exclude": false
        }
      ],
      "preemptibility": "preemptible",
      "probes": {
        "readiness": {
          "initialDelaySeconds": 1,
          "periodSeconds": 1,
          "timeoutSeconds": 1,
          "successThreshold": 1,
          "failureThreshold": 1,
          "handler": {
            "httpGet": {
              "path": "/",
              "port": 1,
              "host": "example.com",
              "scheme": "HTTP"
            }
          }
        }
      },
      "relatedUrls": [
        {
          "url": "https://my-url.com",
          "type": "wandb",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "restartPolicy": "Always",
      "security": {
        "allowPrivilegeEscalation": false,
        "capabilities": [
          "CHOWN",
          "KILL"
        ],
        "hostIpc": false,
        "hostNetwork": false,
        "readOnlyRootFilesystem": false,
        "runAsGid": 30,
        "runAsNonRoot": true,
        "runAsUid": 500,
        "seccompProfileType": "RuntimeDefault",
        "supplementalGroups": "2,3,5,8",
        "uidGidSource": "fromTheImage"
      },
      "stdin": true,
      "storage": {
        "configMapVolume": [
          {
            "name": "storage-instance-a",
            "configMap": "text",
            "mountPath": "text",
            "subPath": "text",
            "defaultMode": "0644",
            "exclude": false
          }
        ],
        "dataVolume": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "mountPath": "/mnt/data",
            "exclude": false
          }
        ],
        "emptyDirVolume": [
          {
            "name": "storage-instance-a",
            "path": "/mnt/emptydir",
            "medium": "text",
            "sizeLimit": "1G",
            "exclude": false
          }
        ],
        "git": [
          {
            "name": "storage-instance-a",
            "repository": "https://github.com/my-git/my-repo",
            "branch": "main",
            "revision": "text",
            "path": "/container/my-repository",
            "passwordSecret": "my-password-secret",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password",
            "exclude": false,
            "secretRef": {
              "name": "my-password-secret",
              "authenticationMethod": "password",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password"
            }
          }
        ],
        "hostPath": [
          {
            "name": "storage-instance-a",
            "path": "/container/directory",
            "readOnly": true,
            "mountPath": "/local/directory",
            "mountPropagation": "None",
            "exclude": false
          }
        ],
        "nfs": [
          {
            "name": "storage-instance-a",
            "path": "/container/nfs",
            "readOnly": true,
            "server": "my.nfs.com",
            "mountPath": "/local/nfs",
            "exclude": false
          }
        ],
        "pvc": [
          {
            "name": "storage-instance-a",
            "path": "/container/my-claim",
            "existingPvc": false,
            "claimName": "my-claim",
            "readOnly": false,
            "ephemeral": false,
            "claimInfo": {
              "size": "1G",
              "storageClass": "my-storage-class",
              "accessModes": {
                "readWriteOnce": true,
                "readOnlyMany": false,
                "readWriteMany": false
              },
              "volumeMode": "Filesystem",
              "addedAttrValues": [
                {
                  "key": "dnsname",
                  "value": "my.dns.com"
                }
              ]
            },
            "dataSharing": false,
            "exclude": false
          }
        ],
        "s3": [
          {
            "name": "storage-instance-a",
            "bucket": "my-bucket",
            "path": "/container/my-bucket",
            "url": "https://s3.amazonaws.com",
            "accessKeySecret": "my-access-key-secret",
            "secretKeyOfAccessKeyId": "AccessKeyId",
            "secretKeyOfSecretKey": "SecretKey",
            "exclude": false
          }
        ],
        "secretVolume": [
          {
            "name": "storage-instance-a",
            "mountPath": "text",
            "defaultMode": "0644",
            "secret": "text",
            "exclude": false
          }
        ]
      },
      "terminateAfterPreemption": false,
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "tty": true,
      "workingDir": "/home/myfolder"
    },
    "assets": {}
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "combinedSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "cleanPodPolicy": "None",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "distributedFramework": "MPI",
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "imagePullSecrets": [
      {
        "name": "text",
        "userCredential": true,
        "exclude": false
      }
    ],
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "maxReplicas": 1,
    "minReplicas": 1,
    "mpiLauncherCreationPolicy": "AtStartup",
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "numWorkers": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "slotsPerWorker": 1,
    "sshAuthMountPath": "/root/.ssh",
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "combinedMasterSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}

Delete a distributed training template by ID. [Experimental]

delete

Delete a distributed training template by ID.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
templateIdstring · uuidRequired

The Universally Unique Identifier (UUID) of the template.

Example: 550e8400-e29b-41d4-a716-446655440000
Responses
204

No Content.

No content

delete/api/v1/workload-templates/distributed/{templateId}
DELETE /api/v1/workload-templates/distributed/{templateId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Patch a distributed training template by ID. [Experimental]

patch

Patch a distributed training template by ID.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
templateIdstring · uuidRequired

The Universally Unique Identifier (UUID) of the template.

Example: 550e8400-e29b-41d4-a716-446655440000
Body

array of xpath expression with fields that their values should be cleared

masterSpecSameAsWorkerboolean · nullableOptional

used for distributed workloads to indicate that the master spec should be the same as the worker spec. in this case, masterSpec should not be specified.

fieldsToClearanyOptionalExample: spec.image
Responses
200

Executed successfully.

application/json
and
patch/api/v1/workload-templates/distributed/{templateId}
PATCH /api/v1/workload-templates/distributed/{templateId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 9320

{
  "meta": {
    "name": "my-template-name",
    "description": "description of my template."
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "cleanPodPolicy": "None",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "distributedFramework": "MPI",
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "maxReplicas": 1,
    "minReplicas": 1,
    "mpiLauncherCreationPolicy": "AtStartup",
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "numWorkers": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "slotsPerWorker": 1,
    "sshAuthMountPath": "/root/.ssh",
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "masterSpecSameAsWorker": true,
  "master": {
    "spec": {
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "category": "text",
      "command": "python",
      "compute": {
        "cpuCoreLimit": 2,
        "cpuCoreRequest": 0.5,
        "cpuMemoryLimit": "30M",
        "cpuMemoryRequest": "20M",
        "extendedResources": [
          {
            "resource": "hardware-vendor.example/foo",
            "quantity": 2,
            "exclude": false
          }
        ],
        "gpuDevicesRequest": 1,
        "gpuMemoryLimit": "10M",
        "gpuMemoryRequest": "10M",
        "gpuPortionLimit": 0.5,
        "gpuPortionRequest": 0.5,
        "gpuRequestType": "portion",
        "largeShmRequest": false
      },
      "createHomeDir": true,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "secret": {
            "name": "postgress_secret",
            "key": "POSTGRES_PASSWORD"
          },
          "configMap": {
            "name": "my-config-map",
            "key": "MY_POSTGRES_SCHEMA"
          },
          "podFieldRef": {
            "path": "metadata.name"
          },
          "userCredential": {
            "name": "my_postgres_user_and_password",
            "key": "POSTGRES_PASSWORD"
          },
          "exclude": false,
          "description": "Home directory of the user."
        }
      ],
      "exposedUrls": [
        {
          "container": 8080,
          "url": "https://my-url.com",
          "authorizationType": "authenticatedUsers",
          "authorizedUsers": [
            "user-a",
            "user-b"
          ],
          "authorizedGroups": [
            "group-a",
            "group-b"
          ],
          "toolType": "jupyter",
          "toolName": "my-pytorch",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "image": "python:3.8",
      "imagePullPolicy": "Always",
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodePools": [
        "my-node-pool-a",
        "my-node-pool-b"
      ],
      "nodeType": "my-node-type",
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "ports": [
        {
          "container": 8080,
          "serviceType": "LoadBalancer",
          "external": 30080,
          "toolType": "pytorch",
          "toolName": "my-pytorch",
          "name": "port-instance-a",
          "exclude": false
        }
      ],
      "preemptibility": "preemptible",
      "probes": {
        "readiness": {
          "initialDelaySeconds": 1,
          "periodSeconds": 1,
          "timeoutSeconds": 1,
          "successThreshold": 1,
          "failureThreshold": 1,
          "handler": {
            "httpGet": {
              "path": "/",
              "port": 1,
              "host": "example.com",
              "scheme": "HTTP"
            }
          }
        }
      },
      "relatedUrls": [
        {
          "url": "https://my-url.com",
          "type": "wandb",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "restartPolicy": "Always",
      "security": {
        "allowPrivilegeEscalation": false,
        "capabilities": [
          "CHOWN",
          "KILL"
        ],
        "hostIpc": false,
        "hostNetwork": false,
        "readOnlyRootFilesystem": false,
        "runAsGid": 30,
        "runAsNonRoot": true,
        "runAsUid": 500,
        "seccompProfileType": "RuntimeDefault",
        "supplementalGroups": "2,3,5,8",
        "uidGidSource": "fromTheImage"
      },
      "stdin": true,
      "storage": {
        "configMapVolume": [
          {
            "name": "storage-instance-a",
            "configMap": "text",
            "mountPath": "text",
            "subPath": "text",
            "defaultMode": "0644",
            "exclude": false
          }
        ],
        "dataVolume": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "mountPath": "/mnt/data",
            "exclude": false
          }
        ],
        "emptyDirVolume": [
          {
            "name": "storage-instance-a",
            "path": "/mnt/emptydir",
            "medium": "text",
            "sizeLimit": "1G",
            "exclude": false
          }
        ],
        "git": [
          {
            "name": "storage-instance-a",
            "repository": "https://github.com/my-git/my-repo",
            "branch": "main",
            "revision": "text",
            "path": "/container/my-repository",
            "passwordSecret": "my-password-secret",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password",
            "exclude": false,
            "secretRef": {
              "name": "my-password-secret",
              "authenticationMethod": "password",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password"
            }
          }
        ],
        "hostPath": [
          {
            "name": "storage-instance-a",
            "path": "/container/directory",
            "readOnly": true,
            "mountPath": "/local/directory",
            "mountPropagation": "None",
            "exclude": false
          }
        ],
        "nfs": [
          {
            "name": "storage-instance-a",
            "path": "/container/nfs",
            "readOnly": true,
            "server": "my.nfs.com",
            "mountPath": "/local/nfs",
            "exclude": false
          }
        ],
        "pvc": [
          {
            "name": "storage-instance-a",
            "path": "/container/my-claim",
            "existingPvc": false,
            "claimName": "my-claim",
            "readOnly": false,
            "ephemeral": false,
            "claimInfo": {
              "size": "1G",
              "storageClass": "my-storage-class",
              "accessModes": {
                "readWriteOnce": true,
                "readOnlyMany": false,
                "readWriteMany": false
              },
              "volumeMode": "Filesystem",
              "addedAttrValues": [
                {
                  "key": "dnsname",
                  "value": "my.dns.com"
                }
              ]
            },
            "dataSharing": false,
            "exclude": false
          }
        ],
        "s3": [
          {
            "name": "storage-instance-a",
            "bucket": "my-bucket",
            "path": "/container/my-bucket",
            "url": "https://s3.amazonaws.com",
            "accessKeySecret": "my-access-key-secret",
            "secretKeyOfAccessKeyId": "AccessKeyId",
            "secretKeyOfSecretKey": "SecretKey",
            "exclude": false
          }
        ],
        "secretVolume": [
          {
            "name": "storage-instance-a",
            "mountPath": "text",
            "defaultMode": "0644",
            "secret": "text",
            "exclude": false
          }
        ]
      },
      "terminateAfterPreemption": false,
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "tty": true,
      "workingDir": "/home/myfolder"
    },
    "assets": {}
  },
  "fieldsToClear": [
    "spec.image"
  ]
}
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "description": "description of my template.",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "text",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": 2,
    "projectId": 1,
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "cleanPodPolicy": "None",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "distributedFramework": "MPI",
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "maxReplicas": 1,
    "minReplicas": 1,
    "mpiLauncherCreationPolicy": "AtStartup",
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "numWorkers": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "slotsPerWorker": 1,
    "sshAuthMountPath": "/root/.ssh",
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "masterSpecSameAsWorker": true,
  "master": {
    "spec": {
      "annotations": [
        {
          "name": "billing",
          "value": "my-billing-unit",
          "exclude": false
        }
      ],
      "args": "-x my-script.py",
      "category": "text",
      "command": "python",
      "compute": {
        "cpuCoreLimit": 2,
        "cpuCoreRequest": 0.5,
        "cpuMemoryLimit": "30M",
        "cpuMemoryRequest": "20M",
        "extendedResources": [
          {
            "resource": "hardware-vendor.example/foo",
            "quantity": 2,
            "exclude": false
          }
        ],
        "gpuDevicesRequest": 1,
        "gpuMemoryLimit": "10M",
        "gpuMemoryRequest": "10M",
        "gpuPortionLimit": 0.5,
        "gpuPortionRequest": 0.5,
        "gpuRequestType": "portion",
        "largeShmRequest": false
      },
      "createHomeDir": true,
      "environmentVariables": [
        {
          "name": "HOME",
          "value": "/home/my-folder",
          "secret": {
            "name": "postgress_secret",
            "key": "POSTGRES_PASSWORD"
          },
          "configMap": {
            "name": "my-config-map",
            "key": "MY_POSTGRES_SCHEMA"
          },
          "podFieldRef": {
            "path": "metadata.name"
          },
          "userCredential": {
            "name": "my_postgres_user_and_password",
            "key": "POSTGRES_PASSWORD"
          },
          "exclude": false,
          "description": "Home directory of the user."
        }
      ],
      "exposedUrls": [
        {
          "container": 8080,
          "url": "https://my-url.com",
          "authorizationType": "authenticatedUsers",
          "authorizedUsers": [
            "user-a",
            "user-b"
          ],
          "authorizedGroups": [
            "group-a",
            "group-b"
          ],
          "toolType": "jupyter",
          "toolName": "my-pytorch",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "image": "python:3.8",
      "imagePullPolicy": "Always",
      "labels": [
        {
          "name": "stage",
          "value": "initial-research",
          "exclude": false
        }
      ],
      "nodeAffinityRequired": {
        "nodeSelectorTerms": [
          {
            "matchExpressions": [
              {
                "key": "text",
                "operator": "In",
                "values": [
                  "text"
                ]
              }
            ]
          }
        ]
      },
      "nodePools": [
        "my-node-pool-a",
        "my-node-pool-b"
      ],
      "nodeType": "my-node-type",
      "podAffinity": {
        "type": "Required",
        "key": "text"
      },
      "ports": [
        {
          "container": 8080,
          "serviceType": "LoadBalancer",
          "external": 30080,
          "toolType": "pytorch",
          "toolName": "my-pytorch",
          "name": "port-instance-a",
          "exclude": false
        }
      ],
      "preemptibility": "preemptible",
      "probes": {
        "readiness": {
          "initialDelaySeconds": 1,
          "periodSeconds": 1,
          "timeoutSeconds": 1,
          "successThreshold": 1,
          "failureThreshold": 1,
          "handler": {
            "httpGet": {
              "path": "/",
              "port": 1,
              "host": "example.com",
              "scheme": "HTTP"
            }
          }
        }
      },
      "relatedUrls": [
        {
          "url": "https://my-url.com",
          "type": "wandb",
          "name": "url-instance-a",
          "exclude": false
        }
      ],
      "restartPolicy": "Always",
      "security": {
        "allowPrivilegeEscalation": false,
        "capabilities": [
          "CHOWN",
          "KILL"
        ],
        "hostIpc": false,
        "hostNetwork": false,
        "readOnlyRootFilesystem": false,
        "runAsGid": 30,
        "runAsNonRoot": true,
        "runAsUid": 500,
        "seccompProfileType": "RuntimeDefault",
        "supplementalGroups": "2,3,5,8",
        "uidGidSource": "fromTheImage"
      },
      "stdin": true,
      "storage": {
        "configMapVolume": [
          {
            "name": "storage-instance-a",
            "configMap": "text",
            "mountPath": "text",
            "subPath": "text",
            "defaultMode": "0644",
            "exclude": false
          }
        ],
        "dataVolume": [
          {
            "id": "123e4567-e89b-12d3-a456-426614174000",
            "mountPath": "/mnt/data",
            "exclude": false
          }
        ],
        "emptyDirVolume": [
          {
            "name": "storage-instance-a",
            "path": "/mnt/emptydir",
            "medium": "text",
            "sizeLimit": "1G",
            "exclude": false
          }
        ],
        "git": [
          {
            "name": "storage-instance-a",
            "repository": "https://github.com/my-git/my-repo",
            "branch": "main",
            "revision": "text",
            "path": "/container/my-repository",
            "passwordSecret": "my-password-secret",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password",
            "exclude": false,
            "secretRef": {
              "name": "my-password-secret",
              "authenticationMethod": "password",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password"
            }
          }
        ],
        "hostPath": [
          {
            "name": "storage-instance-a",
            "path": "/container/directory",
            "readOnly": true,
            "mountPath": "/local/directory",
            "mountPropagation": "None",
            "exclude": false
          }
        ],
        "nfs": [
          {
            "name": "storage-instance-a",
            "path": "/container/nfs",
            "readOnly": true,
            "server": "my.nfs.com",
            "mountPath": "/local/nfs",
            "exclude": false
          }
        ],
        "pvc": [
          {
            "name": "storage-instance-a",
            "path": "/container/my-claim",
            "existingPvc": false,
            "claimName": "my-claim",
            "readOnly": false,
            "ephemeral": false,
            "claimInfo": {
              "size": "1G",
              "storageClass": "my-storage-class",
              "accessModes": {
                "readWriteOnce": true,
                "readOnlyMany": false,
                "readWriteMany": false
              },
              "volumeMode": "Filesystem",
              "addedAttrValues": [
                {
                  "key": "dnsname",
                  "value": "my.dns.com"
                }
              ]
            },
            "dataSharing": false,
            "exclude": false
          }
        ],
        "s3": [
          {
            "name": "storage-instance-a",
            "bucket": "my-bucket",
            "path": "/container/my-bucket",
            "url": "https://s3.amazonaws.com",
            "accessKeySecret": "my-access-key-secret",
            "secretKeyOfAccessKeyId": "AccessKeyId",
            "secretKeyOfSecretKey": "SecretKey",
            "exclude": false
          }
        ],
        "secretVolume": [
          {
            "name": "storage-instance-a",
            "mountPath": "text",
            "defaultMode": "0644",
            "secret": "text",
            "exclude": false
          }
        ]
      },
      "terminateAfterPreemption": false,
      "tolerations": [
        {
          "name": "text",
          "operator": "Equal",
          "key": "text",
          "value": "text",
          "effect": "NoSchedule",
          "seconds": 1,
          "exclude": false
        }
      ],
      "tty": true,
      "workingDir": "/home/myfolder"
    },
    "assets": {}
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "combinedSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "autoDeletionTimeAfterCompletionSeconds": 15,
    "backoffLimit": 3,
    "category": "text",
    "cleanPodPolicy": "None",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "distributedFramework": "MPI",
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "imagePullSecrets": [
      {
        "name": "text",
        "userCredential": true,
        "exclude": false
      }
    ],
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "maxReplicas": 1,
    "minReplicas": 1,
    "mpiLauncherCreationPolicy": "AtStartup",
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "numWorkers": 1,
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "slotsPerWorker": 1,
    "sshAuthMountPath": "/root/.ssh",
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "terminationGracePeriodSeconds": 20,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  },
  "combinedMasterSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "restartPolicy": "Always",
    "security": {
      "allowPrivilegeEscalation": false,
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "stdin": true,
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "s3": [
        {
          "name": "storage-instance-a",
          "bucket": "my-bucket",
          "path": "/container/my-bucket",
          "url": "https://s3.amazonaws.com",
          "accessKeySecret": "my-access-key-secret",
          "secretKeyOfAccessKeyId": "AccessKeyId",
          "secretKeyOfSecretKey": "SecretKey",
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "terminateAfterPreemption": false,
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "tty": true,
    "workingDir": "/home/myfolder"
  }
}

List all inference templates.

get

List all inference templates.

Authorizations
AuthorizationstringRequired

Bearer authentication

Query parameters
offsetinteger · int32Optional

The offset of the first item returned in the collection.

Example: 100
limitinteger · int32 · min: 1 · max: 500Optional

The maximum number of entries to return.

Default: 50
sortOrderstring · enumOptional

Sort results in descending or ascending order.

Default: ascPossible values:
sortBystring · enumOptional

Sort results by parameter.

Possible values:
filterBystring[] · max: 10Optional

Filter results by a parameter. Use the format field-name operator value. Operators are == Equals, != Not equals, <= Less than or equal, >= Greater than or equal, =@ contains, !@ Does not contain, =^ Starts with and =$ Ends with. Dates are in ISO 8601 timestamp format and available for operators ==, !=, <= and >=.

Example: ["name!=some-template-name","createdAt>=2021-01-01T00:00:00Z"]
searchstringOptional

Filter results by a free text search.

Example: test project
complyToProjectinteger · int32Optional

Include workload creation compliance information of an asset, for a given project, as part of the response. To check compliance, you need to provide both project id and workload type.

Responses
200

Executed successfully.

application/json
get/api/v1/workload-templates/inferences
GET /api/v1/workload-templates/inferences HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "entries": [
    {
      "meta": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "name": "my-template-name",
        "description": "description of my template.",
        "workloadType": "Workspace",
        "scopeType": "system",
        "scopeId": "text",
        "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
        "departmentId": 2,
        "projectId": 1,
        "createdBy": "test@lab.com",
        "createdAt": "2022-01-01T03:49:52.531Z",
        "updatedBy": "test@lab.com",
        "updatedAt": "2022-01-01T03:49:52.531Z"
      },
      "spec": {
        "annotations": [
          {
            "name": "billing",
            "value": "my-billing-unit",
            "exclude": false
          }
        ],
        "args": "-x my-script.py",
        "category": "text",
        "command": "python",
        "compute": {
          "cpuCoreLimit": 2,
          "cpuCoreRequest": 0.5,
          "cpuMemoryLimit": "30M",
          "cpuMemoryRequest": "20M",
          "extendedResources": [
            {
              "resource": "hardware-vendor.example/foo",
              "quantity": 2,
              "exclude": false
            }
          ],
          "gpuDevicesRequest": 1,
          "gpuMemoryLimit": "10M",
          "gpuMemoryRequest": "10M",
          "gpuPortionLimit": 0.5,
          "gpuPortionRequest": 0.5,
          "gpuRequestType": "portion",
          "largeShmRequest": false
        },
        "createHomeDir": true,
        "environmentVariables": [
          {
            "name": "HOME",
            "value": "/home/my-folder",
            "secret": {
              "name": "postgress_secret",
              "key": "POSTGRES_PASSWORD"
            },
            "configMap": {
              "name": "my-config-map",
              "key": "MY_POSTGRES_SCHEMA"
            },
            "podFieldRef": {
              "path": "metadata.name"
            },
            "userCredential": {
              "name": "my_postgres_user_and_password",
              "key": "POSTGRES_PASSWORD"
            },
            "exclude": false,
            "description": "Home directory of the user."
          }
        ],
        "exposedUrls": [
          {
            "container": 8080,
            "url": "https://my-url.com",
            "authorizationType": "authenticatedUsers",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "toolType": "jupyter",
            "toolName": "my-pytorch",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "image": "python:3.8",
        "imagePullPolicy": "Always",
        "labels": [
          {
            "name": "stage",
            "value": "initial-research",
            "exclude": false
          }
        ],
        "nodeAffinityRequired": {
          "nodeSelectorTerms": [
            {
              "matchExpressions": [
                {
                  "key": "text",
                  "operator": "In",
                  "values": [
                    "text"
                  ]
                }
              ]
            }
          ]
        },
        "nodePools": [
          "my-node-pool-a",
          "my-node-pool-b"
        ],
        "nodeType": "my-node-type",
        "podAffinity": {
          "type": "Required",
          "key": "text"
        },
        "ports": [
          {
            "container": 8080,
            "serviceType": "LoadBalancer",
            "external": 30080,
            "toolType": "pytorch",
            "toolName": "my-pytorch",
            "name": "port-instance-a",
            "exclude": false
          }
        ],
        "preemptibility": "preemptible",
        "priorityClass": "text",
        "probes": {
          "readiness": {
            "initialDelaySeconds": 1,
            "periodSeconds": 1,
            "timeoutSeconds": 1,
            "successThreshold": 1,
            "failureThreshold": 1,
            "handler": {
              "httpGet": {
                "path": "/",
                "port": 1,
                "host": "example.com",
                "scheme": "HTTP"
              }
            }
          }
        },
        "relatedUrls": [
          {
            "url": "https://my-url.com",
            "type": "wandb",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "security": {
          "capabilities": [
            "CHOWN",
            "KILL"
          ],
          "hostIpc": false,
          "hostNetwork": false,
          "readOnlyRootFilesystem": false,
          "runAsGid": 30,
          "runAsNonRoot": true,
          "runAsUid": 500,
          "seccompProfileType": "RuntimeDefault",
          "supplementalGroups": "2,3,5,8",
          "uidGidSource": "fromTheImage"
        },
        "servingPort": {
          "container": 8080,
          "protocol": "http",
          "authorizationType": "public",
          "authorizedUsers": [
            "user-a",
            "user-b"
          ],
          "authorizedGroups": [
            "group-a",
            "group-b"
          ],
          "clusterLocalAccessOnly": true
        },
        "storage": {
          "configMapVolume": [
            {
              "name": "storage-instance-a",
              "configMap": "text",
              "mountPath": "text",
              "subPath": "text",
              "defaultMode": "0644",
              "exclude": false
            }
          ],
          "dataVolume": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "mountPath": "/mnt/data",
              "exclude": false
            }
          ],
          "emptyDirVolume": [
            {
              "name": "storage-instance-a",
              "path": "/mnt/emptydir",
              "medium": "text",
              "sizeLimit": "1G",
              "exclude": false
            }
          ],
          "git": [
            {
              "name": "storage-instance-a",
              "repository": "https://github.com/my-git/my-repo",
              "branch": "main",
              "revision": "text",
              "path": "/container/my-repository",
              "passwordSecret": "my-password-secret",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password",
              "exclude": false,
              "secretRef": {
                "name": "my-password-secret",
                "authenticationMethod": "password",
                "secretKeyOfUser": "User",
                "secretKeyOfPassword": "Password"
              }
            }
          ],
          "hostPath": [
            {
              "name": "storage-instance-a",
              "path": "/container/directory",
              "readOnly": true,
              "mountPath": "/local/directory",
              "mountPropagation": "None",
              "exclude": false
            }
          ],
          "nfs": [
            {
              "name": "storage-instance-a",
              "path": "/container/nfs",
              "readOnly": true,
              "server": "my.nfs.com",
              "mountPath": "/local/nfs",
              "exclude": false
            }
          ],
          "pvc": [
            {
              "name": "storage-instance-a",
              "path": "/container/my-claim",
              "existingPvc": false,
              "claimName": "my-claim",
              "readOnly": false,
              "ephemeral": false,
              "claimInfo": {
                "size": "1G",
                "storageClass": "my-storage-class",
                "accessModes": {
                  "readWriteOnce": true,
                  "readOnlyMany": false,
                  "readWriteMany": false
                },
                "volumeMode": "Filesystem",
                "addedAttrValues": [
                  {
                    "key": "dnsname",
                    "value": "my.dns.com"
                  }
                ]
              },
              "dataSharing": false,
              "exclude": false
            }
          ],
          "secretVolume": [
            {
              "name": "storage-instance-a",
              "mountPath": "text",
              "defaultMode": "0644",
              "secret": "text",
              "exclude": false
            }
          ]
        },
        "tolerations": [
          {
            "name": "text",
            "operator": "Equal",
            "key": "text",
            "value": "text",
            "effect": "NoSchedule",
            "seconds": 1,
            "exclude": false
          }
        ],
        "workingDir": "/home/myfolder",
        "autoscaling": {
          "metricThresholdPercentage": 1,
          "minReplicas": 1,
          "maxReplicas": 1,
          "initialReplicas": 1,
          "activationReplicas": 1,
          "concurrencyHardLimit": 1,
          "scaleToZeroRetentionSeconds": 1,
          "scaleDownDelaySeconds": 1,
          "metric": "http_requests_total",
          "metricThreshold": 1
        },
        "servingConfiguration": {
          "initializationTimeoutSeconds": 1,
          "requestTimeoutSeconds": 1
        }
      },
      "runnable": {
        "isRunnable": false,
        "issue": "mandatory image is not provided"
      },
      "combinedSpec": {
        "annotations": [
          {
            "name": "billing",
            "value": "my-billing-unit",
            "exclude": false
          }
        ],
        "args": "-x my-script.py",
        "category": "text",
        "command": "python",
        "compute": {
          "cpuCoreLimit": 2,
          "cpuCoreRequest": 0.5,
          "cpuMemoryLimit": "30M",
          "cpuMemoryRequest": "20M",
          "extendedResources": [
            {
              "resource": "hardware-vendor.example/foo",
              "quantity": 2,
              "exclude": false
            }
          ],
          "gpuDevicesRequest": 1,
          "gpuMemoryLimit": "10M",
          "gpuMemoryRequest": "10M",
          "gpuPortionLimit": 0.5,
          "gpuPortionRequest": 0.5,
          "gpuRequestType": "portion",
          "largeShmRequest": false
        },
        "createHomeDir": true,
        "environmentVariables": [
          {
            "name": "HOME",
            "value": "/home/my-folder",
            "secret": {
              "name": "postgress_secret",
              "key": "POSTGRES_PASSWORD"
            },
            "configMap": {
              "name": "my-config-map",
              "key": "MY_POSTGRES_SCHEMA"
            },
            "podFieldRef": {
              "path": "metadata.name"
            },
            "userCredential": {
              "name": "my_postgres_user_and_password",
              "key": "POSTGRES_PASSWORD"
            },
            "exclude": false,
            "description": "Home directory of the user."
          }
        ],
        "exposedUrls": [
          {
            "container": 8080,
            "url": "https://my-url.com",
            "authorizationType": "authenticatedUsers",
            "authorizedUsers": [
              "user-a",
              "user-b"
            ],
            "authorizedGroups": [
              "group-a",
              "group-b"
            ],
            "toolType": "jupyter",
            "toolName": "my-pytorch",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "image": "python:3.8",
        "imagePullPolicy": "Always",
        "labels": [
          {
            "name": "stage",
            "value": "initial-research",
            "exclude": false
          }
        ],
        "nodeAffinityRequired": {
          "nodeSelectorTerms": [
            {
              "matchExpressions": [
                {
                  "key": "text",
                  "operator": "In",
                  "values": [
                    "text"
                  ]
                }
              ]
            }
          ]
        },
        "nodePools": [
          "my-node-pool-a",
          "my-node-pool-b"
        ],
        "nodeType": "my-node-type",
        "podAffinity": {
          "type": "Required",
          "key": "text"
        },
        "ports": [
          {
            "container": 8080,
            "serviceType": "LoadBalancer",
            "external": 30080,
            "toolType": "pytorch",
            "toolName": "my-pytorch",
            "name": "port-instance-a",
            "exclude": false
          }
        ],
        "preemptibility": "preemptible",
        "priorityClass": "text",
        "probes": {
          "readiness": {
            "initialDelaySeconds": 1,
            "periodSeconds": 1,
            "timeoutSeconds": 1,
            "successThreshold": 1,
            "failureThreshold": 1,
            "handler": {
              "httpGet": {
                "path": "/",
                "port": 1,
                "host": "example.com",
                "scheme": "HTTP"
              }
            }
          }
        },
        "relatedUrls": [
          {
            "url": "https://my-url.com",
            "type": "wandb",
            "name": "url-instance-a",
            "exclude": false
          }
        ],
        "security": {
          "capabilities": [
            "CHOWN",
            "KILL"
          ],
          "hostIpc": false,
          "hostNetwork": false,
          "readOnlyRootFilesystem": false,
          "runAsGid": 30,
          "runAsNonRoot": true,
          "runAsUid": 500,
          "seccompProfileType": "RuntimeDefault",
          "supplementalGroups": "2,3,5,8",
          "uidGidSource": "fromTheImage"
        },
        "servingPort": {
          "container": 8080,
          "protocol": "http",
          "authorizationType": "public",
          "authorizedUsers": [
            "user-a",
            "user-b"
          ],
          "authorizedGroups": [
            "group-a",
            "group-b"
          ],
          "clusterLocalAccessOnly": true
        },
        "storage": {
          "configMapVolume": [
            {
              "name": "storage-instance-a",
              "configMap": "text",
              "mountPath": "text",
              "subPath": "text",
              "defaultMode": "0644",
              "exclude": false
            }
          ],
          "dataVolume": [
            {
              "id": "123e4567-e89b-12d3-a456-426614174000",
              "mountPath": "/mnt/data",
              "exclude": false
            }
          ],
          "emptyDirVolume": [
            {
              "name": "storage-instance-a",
              "path": "/mnt/emptydir",
              "medium": "text",
              "sizeLimit": "1G",
              "exclude": false
            }
          ],
          "git": [
            {
              "name": "storage-instance-a",
              "repository": "https://github.com/my-git/my-repo",
              "branch": "main",
              "revision": "text",
              "path": "/container/my-repository",
              "passwordSecret": "my-password-secret",
              "secretKeyOfUser": "User",
              "secretKeyOfPassword": "Password",
              "exclude": false,
              "secretRef": {
                "name": "my-password-secret",
                "authenticationMethod": "password",
                "secretKeyOfUser": "User",
                "secretKeyOfPassword": "Password"
              }
            }
          ],
          "hostPath": [
            {
              "name": "storage-instance-a",
              "path": "/container/directory",
              "readOnly": true,
              "mountPath": "/local/directory",
              "mountPropagation": "None",
              "exclude": false
            }
          ],
          "nfs": [
            {
              "name": "storage-instance-a",
              "path": "/container/nfs",
              "readOnly": true,
              "server": "my.nfs.com",
              "mountPath": "/local/nfs",
              "exclude": false
            }
          ],
          "pvc": [
            {
              "name": "storage-instance-a",
              "path": "/container/my-claim",
              "existingPvc": false,
              "claimName": "my-claim",
              "readOnly": false,
              "ephemeral": false,
              "claimInfo": {
                "size": "1G",
                "storageClass": "my-storage-class",
                "accessModes": {
                  "readWriteOnce": true,
                  "readOnlyMany": false,
                  "readWriteMany": false
                },
                "volumeMode": "Filesystem",
                "addedAttrValues": [
                  {
                    "key": "dnsname",
                    "value": "my.dns.com"
                  }
                ]
              },
              "dataSharing": false,
              "exclude": false
            }
          ],
          "secretVolume": [
            {
              "name": "storage-instance-a",
              "mountPath": "text",
              "defaultMode": "0644",
              "secret": "text",
              "exclude": false
            }
          ]
        },
        "tolerations": [
          {
            "name": "text",
            "operator": "Equal",
            "key": "text",
            "value": "text",
            "effect": "NoSchedule",
            "seconds": 1,
            "exclude": false
          }
        ],
        "workingDir": "/home/myfolder",
        "autoscaling": {
          "metricThresholdPercentage": 1,
          "minReplicas": 1,
          "maxReplicas": 1,
          "initialReplicas": 1,
          "activationReplicas": 1,
          "concurrencyHardLimit": 1,
          "scaleToZeroRetentionSeconds": 1,
          "scaleDownDelaySeconds": 1,
          "metric": "http_requests_total",
          "metricThreshold": 1
        },
        "servingConfiguration": {
          "initializationTimeoutSeconds": 1,
          "requestTimeoutSeconds": 1
        }
      }
    },
    {
      "complianceIssues": []
    }
  ],
  "pagination": {
    "limit": 1,
    "offset": 1,
    "nextOffset": 1
  }
}

Create a new inference template.

post

Create a new inference template.

Authorizations
AuthorizationstringRequired

Bearer authentication

Body
and
Responses
202

Request completed successfully.

application/json
and
post/api/v1/workload-templates/inferences
POST /api/v1/workload-templates/inferences HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 4725

{
  "meta": {
    "name": "my-template-name",
    "description": "description of my template.",
    "scopeType": "system",
    "scopeId": "text"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "security": {
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "servingPort": {
      "container": 8080,
      "protocol": "http",
      "authorizationType": "public",
      "authorizedUsers": [
        "user-a",
        "user-b"
      ],
      "authorizedGroups": [
        "group-a",
        "group-b"
      ],
      "clusterLocalAccessOnly": true
    },
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "workingDir": "/home/myfolder",
    "autoscaling": {
      "metricThresholdPercentage": 1,
      "minReplicas": 1,
      "maxReplicas": 1,
      "initialReplicas": 1,
      "activationReplicas": 1,
      "concurrencyHardLimit": 1,
      "scaleToZeroRetentionSeconds": 1,
      "scaleDownDelaySeconds": 1,
      "metric": "http_requests_total",
      "metricThreshold": 1
    },
    "servingConfiguration": {
      "initializationTimeoutSeconds": 1,
      "requestTimeoutSeconds": 1
    }
  }
}
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "description": "description of my template.",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "text",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": 2,
    "projectId": 1,
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "security": {
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "servingPort": {
      "container": 8080,
      "protocol": "http",
      "authorizationType": "public",
      "authorizedUsers": [
        "user-a",
        "user-b"
      ],
      "authorizedGroups": [
        "group-a",
        "group-b"
      ],
      "clusterLocalAccessOnly": true
    },
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "workingDir": "/home/myfolder",
    "autoscaling": {
      "metricThresholdPercentage": 1,
      "minReplicas": 1,
      "maxReplicas": 1,
      "initialReplicas": 1,
      "activationReplicas": 1,
      "concurrencyHardLimit": 1,
      "scaleToZeroRetentionSeconds": 1,
      "scaleDownDelaySeconds": 1,
      "metric": "http_requests_total",
      "metricThreshold": 1
    },
    "servingConfiguration": {
      "initializationTimeoutSeconds": 1,
      "requestTimeoutSeconds": 1
    }
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "combinedSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "security": {
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "servingPort": {
      "container": 8080,
      "protocol": "http",
      "authorizationType": "public",
      "authorizedUsers": [
        "user-a",
        "user-b"
      ],
      "authorizedGroups": [
        "group-a",
        "group-b"
      ],
      "clusterLocalAccessOnly": true
    },
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "workingDir": "/home/myfolder",
    "autoscaling": {
      "metricThresholdPercentage": 1,
      "minReplicas": 1,
      "maxReplicas": 1,
      "initialReplicas": 1,
      "activationReplicas": 1,
      "concurrencyHardLimit": 1,
      "scaleToZeroRetentionSeconds": 1,
      "scaleDownDelaySeconds": 1,
      "metric": "http_requests_total",
      "metricThreshold": 1
    },
    "servingConfiguration": {
      "initializationTimeoutSeconds": 1,
      "requestTimeoutSeconds": 1
    }
  }
}

Get a specific inference template by ID.

get

Get a specific inference template by ID.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
templateIdstring · uuidRequired

The Universally Unique Identifier (UUID) of the template.

Example: 550e8400-e29b-41d4-a716-446655440000
Responses
200

Executed successfully.

application/json
and
get/api/v1/workload-templates/inferences/{templateId}
GET /api/v1/workload-templates/inferences/{templateId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "meta": {
    "id": "550e8400-e29b-41d4-a716-446655440000",
    "name": "my-template-name",
    "description": "description of my template.",
    "workloadType": "Workspace",
    "scopeType": "system",
    "scopeId": "text",
    "clusterId": "71f69d83-ba66-4822-adf5-55ce55efd210",
    "departmentId": 2,
    "projectId": 1,
    "createdBy": "test@lab.com",
    "createdAt": "2022-01-01T03:49:52.531Z",
    "updatedBy": "test@lab.com",
    "updatedAt": "2022-01-01T03:49:52.531Z"
  },
  "spec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "security": {
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "servingPort": {
      "container": 8080,
      "protocol": "http",
      "authorizationType": "public",
      "authorizedUsers": [
        "user-a",
        "user-b"
      ],
      "authorizedGroups": [
        "group-a",
        "group-b"
      ],
      "clusterLocalAccessOnly": true
    },
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "workingDir": "/home/myfolder",
    "autoscaling": {
      "metricThresholdPercentage": 1,
      "minReplicas": 1,
      "maxReplicas": 1,
      "initialReplicas": 1,
      "activationReplicas": 1,
      "concurrencyHardLimit": 1,
      "scaleToZeroRetentionSeconds": 1,
      "scaleDownDelaySeconds": 1,
      "metric": "http_requests_total",
      "metricThreshold": 1
    },
    "servingConfiguration": {
      "initializationTimeoutSeconds": 1,
      "requestTimeoutSeconds": 1
    }
  },
  "runnable": {
    "isRunnable": false,
    "issue": "mandatory image is not provided"
  },
  "combinedSpec": {
    "annotations": [
      {
        "name": "billing",
        "value": "my-billing-unit",
        "exclude": false
      }
    ],
    "args": "-x my-script.py",
    "category": "text",
    "command": "python",
    "compute": {
      "cpuCoreLimit": 2,
      "cpuCoreRequest": 0.5,
      "cpuMemoryLimit": "30M",
      "cpuMemoryRequest": "20M",
      "extendedResources": [
        {
          "resource": "hardware-vendor.example/foo",
          "quantity": 2,
          "exclude": false
        }
      ],
      "gpuDevicesRequest": 1,
      "gpuMemoryLimit": "10M",
      "gpuMemoryRequest": "10M",
      "gpuPortionLimit": 0.5,
      "gpuPortionRequest": 0.5,
      "gpuRequestType": "portion",
      "largeShmRequest": false
    },
    "createHomeDir": true,
    "environmentVariables": [
      {
        "name": "HOME",
        "value": "/home/my-folder",
        "secret": {
          "name": "postgress_secret",
          "key": "POSTGRES_PASSWORD"
        },
        "configMap": {
          "name": "my-config-map",
          "key": "MY_POSTGRES_SCHEMA"
        },
        "podFieldRef": {
          "path": "metadata.name"
        },
        "userCredential": {
          "name": "my_postgres_user_and_password",
          "key": "POSTGRES_PASSWORD"
        },
        "exclude": false,
        "description": "Home directory of the user."
      }
    ],
    "exposedUrls": [
      {
        "container": 8080,
        "url": "https://my-url.com",
        "authorizationType": "authenticatedUsers",
        "authorizedUsers": [
          "user-a",
          "user-b"
        ],
        "authorizedGroups": [
          "group-a",
          "group-b"
        ],
        "toolType": "jupyter",
        "toolName": "my-pytorch",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "image": "python:3.8",
    "imagePullPolicy": "Always",
    "labels": [
      {
        "name": "stage",
        "value": "initial-research",
        "exclude": false
      }
    ],
    "nodeAffinityRequired": {
      "nodeSelectorTerms": [
        {
          "matchExpressions": [
            {
              "key": "text",
              "operator": "In",
              "values": [
                "text"
              ]
            }
          ]
        }
      ]
    },
    "nodePools": [
      "my-node-pool-a",
      "my-node-pool-b"
    ],
    "nodeType": "my-node-type",
    "podAffinity": {
      "type": "Required",
      "key": "text"
    },
    "ports": [
      {
        "container": 8080,
        "serviceType": "LoadBalancer",
        "external": 30080,
        "toolType": "pytorch",
        "toolName": "my-pytorch",
        "name": "port-instance-a",
        "exclude": false
      }
    ],
    "preemptibility": "preemptible",
    "priorityClass": "text",
    "probes": {
      "readiness": {
        "initialDelaySeconds": 1,
        "periodSeconds": 1,
        "timeoutSeconds": 1,
        "successThreshold": 1,
        "failureThreshold": 1,
        "handler": {
          "httpGet": {
            "path": "/",
            "port": 1,
            "host": "example.com",
            "scheme": "HTTP"
          }
        }
      }
    },
    "relatedUrls": [
      {
        "url": "https://my-url.com",
        "type": "wandb",
        "name": "url-instance-a",
        "exclude": false
      }
    ],
    "security": {
      "capabilities": [
        "CHOWN",
        "KILL"
      ],
      "hostIpc": false,
      "hostNetwork": false,
      "readOnlyRootFilesystem": false,
      "runAsGid": 30,
      "runAsNonRoot": true,
      "runAsUid": 500,
      "seccompProfileType": "RuntimeDefault",
      "supplementalGroups": "2,3,5,8",
      "uidGidSource": "fromTheImage"
    },
    "servingPort": {
      "container": 8080,
      "protocol": "http",
      "authorizationType": "public",
      "authorizedUsers": [
        "user-a",
        "user-b"
      ],
      "authorizedGroups": [
        "group-a",
        "group-b"
      ],
      "clusterLocalAccessOnly": true
    },
    "storage": {
      "configMapVolume": [
        {
          "name": "storage-instance-a",
          "configMap": "text",
          "mountPath": "text",
          "subPath": "text",
          "defaultMode": "0644",
          "exclude": false
        }
      ],
      "dataVolume": [
        {
          "id": "123e4567-e89b-12d3-a456-426614174000",
          "mountPath": "/mnt/data",
          "exclude": false
        }
      ],
      "emptyDirVolume": [
        {
          "name": "storage-instance-a",
          "path": "/mnt/emptydir",
          "medium": "text",
          "sizeLimit": "1G",
          "exclude": false
        }
      ],
      "git": [
        {
          "name": "storage-instance-a",
          "repository": "https://github.com/my-git/my-repo",
          "branch": "main",
          "revision": "text",
          "path": "/container/my-repository",
          "passwordSecret": "my-password-secret",
          "secretKeyOfUser": "User",
          "secretKeyOfPassword": "Password",
          "exclude": false,
          "secretRef": {
            "name": "my-password-secret",
            "authenticationMethod": "password",
            "secretKeyOfUser": "User",
            "secretKeyOfPassword": "Password"
          }
        }
      ],
      "hostPath": [
        {
          "name": "storage-instance-a",
          "path": "/container/directory",
          "readOnly": true,
          "mountPath": "/local/directory",
          "mountPropagation": "None",
          "exclude": false
        }
      ],
      "nfs": [
        {
          "name": "storage-instance-a",
          "path": "/container/nfs",
          "readOnly": true,
          "server": "my.nfs.com",
          "mountPath": "/local/nfs",
          "exclude": false
        }
      ],
      "pvc": [
        {
          "name": "storage-instance-a",
          "path": "/container/my-claim",
          "existingPvc": false,
          "claimName": "my-claim",
          "readOnly": false,
          "ephemeral": false,
          "claimInfo": {
            "size": "1G",
            "storageClass": "my-storage-class",
            "accessModes": {
              "readWriteOnce": true,
              "readOnlyMany": false,
              "readWriteMany": false
            },
            "volumeMode": "Filesystem",
            "addedAttrValues": [
              {
                "key": "dnsname",
                "value": "my.dns.com"
              }
            ]
          },
          "dataSharing": false,
          "exclude": false
        }
      ],
      "secretVolume": [
        {
          "name": "storage-instance-a",
          "mountPath": "text",
          "defaultMode": "0644",
          "secret": "text",
          "exclude": false
        }
      ]
    },
    "tolerations": [
      {
        "name": "text",
        "operator": "Equal",
        "key": "text",
        "value": "text",
        "effect": "NoSchedule",
        "seconds": 1,
        "exclude": false
      }
    ],
    "workingDir": "/home/myfolder",
    "autoscaling": {
      "metricThresholdPercentage": 1,
      "minReplicas": 1,
      "maxReplicas": 1,
      "initialReplicas": 1,
      "activationReplicas": 1,
      "concurrencyHardLimit": 1,
      "scaleToZeroRetentionSeconds": 1,
      "scaleDownDelaySeconds": 1,
      "metric": "http_requests_total",
      "metricThreshold": 1
    },
    "servingConfiguration": {
      "initializationTimeoutSeconds": 1,
      "requestTimeoutSeconds": 1
    }
  }
}

Delete an inference template by ID.

delete

Delete an inference template by ID.

Authorizations
AuthorizationstringRequired

Bearer authentication

Path parameters
templateIdstring · uuidRequired

The Universally Unique Identifier (UUID) of the template.

Example: 550e8400-e29b-41d4-a716-446655440000
Responses
204

No Content.

No content

delete/api/v1/workload-templates/inferences/{templateId}
DELETE /api/v1/workload-templates/inferences/{templateId} HTTP/1.1
Host: app.run.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*

No content

Last updated