Support reservation when provisioning VM/ accelerators on Google Batch
#4,262 opened on Sep 1, 2023
Repository metrics
- Stars
- (3,382 stars)
- PR merge metrics
- (Avg merge 16d 9h) (54 merged PRs in 30d)
Description
New feature
Google Cloud supports provisioning Compute Engine instances using reservations (e.g. dedicated compute resources CPUs/GPUs/Memory etc). https://cloud.google.com/compute/docs/instances/reservations-consume
This is a configuration available via Google LifeSciences API and Google Batch.
- Google Batch: https://cloud.google.com/batch/docs/reference/rest/v1alpha/projects.locations.jobs#InstancePolicy
| reservation | stringIf specified, VMs will consume only the specified reservation. If not specified (default), VMs will consume any applicable reservation. |
|---|
- Google Lifesciences API: https://cloud.google.com/life-sciences/docs/reference/rest/v2beta/projects.locations.pipelines/run#virtualmachine
| reservation | stringIf specified, the VM will only be allocated inside the matching reservation. It will fail if the VM parameters don't match the reservation. |
|---|
Usage scenario
For example a user may configure a reservation for GPU resources to ensure dedicated resources are available to be provisioned (instead of waiting for GPUs to be available on demand).
Reservations can be made and applied automatically but it can be useful to be able to explicitly specify a reservation in case it's only used by a certain user or for a certain project.
Then the nextflow user would want to be able to configure a particular Nextflow process to use that dedicated reservation when provisioning a task that uses a GPU.
Suggest implementation
Allow for a Nextflow process to specify reservation configuration along with machineType/accelerators etc.
process foo {
accelerator 4, type: 'nvidia-tesla-k80'
reservation: 'userx-gpu-reservation'
script:
"""
your_gpu_enabled --command --line
"""
}