Skip to content

Custom type solution for GCP helper machine types #719

Open
@dacbd

Description

@dacbd

Context: #718 (comment)

Culprit:

instanceTypes := make(map[string]map[string]map[string]string)
instanceTypes["m"] = map[string]map[string]string{
"accelerator": {
"count": "0",
"type": "",
},
"machine": {
"type": "e2-custom-8-32768",
},
}
instanceTypes["l"] = map[string]map[string]string{
"accelerator": {
"count": "0",
"type": "",
},
"machine": {
"type": "e2-custom-32-131072",
},
}
instanceTypes["xl"] = map[string]map[string]string{
"accelerator": {
"count": "0",
"type": "",
},
"machine": {
"type": "n2-custom-64-262144",
},
}
instanceTypes["m+k80"] = map[string]map[string]string{
"accelerator": {
"count": "1",
"type": "nvidia-tesla-k80",
},
"machine": {
"type": "custom-8-53248",
},
}
instanceTypes["l+k80"] = map[string]map[string]string{
"accelerator": {
"count": "4",
"type": "nvidia-tesla-k80",
},
"machine": {
"type": "custom-32-131072",
},
}
instanceTypes["xl+k80"] = map[string]map[string]string{
"accelerator": {
"count": "8",
"type": "nvidia-tesla-k80",
},
"machine": {
"type": "custom-64-212992-ext",
},
}
instanceTypes["m+v100"] = map[string]map[string]string{
"accelerator": {
"count": "1",
"type": "nvidia-tesla-v100",
},
"machine": {
"type": "custom-8-65536-ext",
},
}
instanceTypes["l+v100"] = map[string]map[string]string{
"accelerator": {
"count": "4",
"type": "nvidia-tesla-v100",
},
"machine": {
"type": "custom-32-262144-ext",
},
}
instanceTypes["xl+v100"] = map[string]map[string]string{
"accelerator": {
"count": "8",
"type": "nvidia-tesla-v100",
},
"machine": {
"type": "custom-64-524288-ext",
},
}

Ideally the solution is reuseable for parsing machine types for runner and task

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions