I have a container service in a docker-compose system that runs on a single GPU. Since I have multiple GPUs, I would like to create replicas by adding
replicas: ${GPU_COUNT}
To the docker-compose config. The issue is doing this causes all replicas to use the same GPU. Currently I work around this by duplicating the service specification multiple times in the docker-compose config, manually assigning each replica to a different GPU.
Is there a good way to automatically assign replicas to different GPUs?
I have a container service in a docker-compose system that runs on a single GPU. Since I have multiple GPUs, I would like to create replicas by adding
To the docker-compose config. The issue is doing this causes all replicas to use the same GPU. Currently I work around this by duplicating the service specification multiple times in the docker-compose config, manually assigning each replica to a different GPU.
Is there a good way to automatically assign replicas to different GPUs?