I try to configure dockerspawner.SwarmSpawner to use nvidia GPU, but it didn’t work. I would like to confirm whether this feature is supported.
Proposed change
Use nvidia Gpus in dockerspawner.SwarmSpawner
Alternative options
Some parameters in the Docker API:
create_service(task_template, name=None, labels=None, mode=None, update_config=None, networks=None, endpoint_config=None, endpoint_spec=None, rollback_config=None)
class TaskTemplate(container_spec, resources=None, restart_policy=None, placement=None, log_driver=None, networks=None, force_update=None)
- resources (Resources) – Resource requirements which apply to each individual container created as part of the service.
class Resources(cpu_limit=None, mem_limit=None, cpu_reservation=None, mem_reservation=None, generic_resources=None)
Configures resource allocation for containers when made part of a ContainerSpec.
Parameters:
- cpu_limit (int) – CPU limit in units of 10^9 CPU shares.
- mem_limit (int) – Memory limit in Bytes.
- cpu_reservation (int) – CPU reservation in units of 10^9 CPU shares.
- mem_reservation (int) – Memory reservation in Bytes.
- generic_resources (dict or list) – Node level generic resources, for example a GPU, using the following format: { resource_name: resource_value }. Alternatively, a list of of resource specifications as defined by the Engine API.
Who would use this feature?
All the people who use gpus in the cluster
(Optional): Suggest a solution
For example, some configuration schemes are given in the tutorial