-
Hello, In a Docker-compose.yaml file it is necessary to extend the resource section like this: deploy:
resources:
reservations:
devices:
- driver: nvidia
count: 1
capabilities: [gpu] Thanks for any tips. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
I believe the only thing that is needed is you need to use the nvidia runtime, but https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#configuring-cri-o gives some instructions. Also, you need to request the gpus in the pod spec using device plugins |
Beta Was this translation helpful? Give feedback.
-
Hi @haircommander , yes at least it was surprising simple.
And this script will start the operator that is automatically installing the needed drivers. Or if you have already installed an nvidia driver on your worker node you can disable the installation of the driver by the operator:
It may take a while if the operator has updated all nodes. After that the only thing you need to do to use the GPU is setting the resource limits: ...
resources:
limits:
nvidia.com/gpu: 1 |
Beta Was this translation helpful? Give feedback.
Hi @haircommander , yes at least it was surprising simple.
The only thing you need in a running Kubernets cluster is to install the NVIDIA GPU Operator. This can be done with a helm chart:
And this script will start the operator that is automatically installing the needed drivers. Or if you have already installed an nvidia driver on your worker node you can disable the installation of the driver by the operator:
It may take a while if the o…