How to use NVIDIA GPUs in Swarm mode (dockerspawner.SwarmSpawner)?
ZhengHui-Z opened this issue · 1 comments
ZhengHui-Z commented
I tried using the schema configuration supported by the Docker API, but it didn't work.
- 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.
I am looking forward a configuration template for using gpus in Docker Swarm mode can be provided. Thank you very much.
ZhengHui-Z commented
An example of a docker-compose.
services:
test:
image: tensorflow/tensorflow:latest-gpu
command: python -c "import tensorflow as tf;tf.test.gpu_device_name()"
deploy:
resources:
reservations:
devices:
- capabilities: [gpu]