I want to have a container inside a pod, that uses some docker runtime (we can specify it using --runtime
flag in pure docker).
In my case, I want to use nvidia-docker2
runtime (https://github.com/NVIDIA/nvidia-docker) for using GPU inside my containers in Kubernetes cluster.
Answer: Specify default runtime in /etc/docker/daemon.json
like that:
"default-runtime": "nvidia",
"runtimes": {
"nvidia": {
...
}
}
You need to use kubernetes device plugin which creates daemonset and allows you to expose the GPU metrics on each node.
You want to use "nvidia-docker
runtime (https://github.com/NVIDIA/nvidia-docker) for using GPU inside your containers in Kubernetes cluster", then take a look into the official docs provided by keubernetes themselves: