This PRs adds support for the NVIDIA runtime to leverage GPU usage. This implementation as a seperate runtime was prefered over a GPU option in the environment config for the following reasons :
automatically selects the nvidia runtime as it provides the capability but will fails with a 500 error in the Docker API if the runtime is not available, exception which is hard to catch using docker-py.
There is no docker-py API (or even Docker API ?) to know the capabilities of a runtime to prevent such an error.
The GPU opt-in would have to be shown only for compatible runtimes (Kata, for instance, would not support it)
It is actually really more lightweight to implement and not less a generic implementation as only NVIDIA GPUs are currently supported by the Docker --gpus argument.
An additional label is introduced to restrict usage of a Docker image to the nvidia environment type only.
As mentioned in the provided documentation, the nvidia/cuda:x.y.z-base-rockylinux8 works in replacement of rockylinux:8 as base for the ingi/inginious-c-base container. This was not included in this PR yet as it would require some practical usage tests to evaluate how accurate it would be.
This PRs adds support for the NVIDIA runtime to leverage GPU usage. This implementation as a seperate runtime was prefered over a GPU option in the environment config for the following reasons :
--gpus
, or its docker-py equivalentautomatically selects the nvidia runtime as it provides the capability but will fails with a
500
error in the Docker API if the runtime is not available, exception which is hard to catch using docker-py.--gpus
argument.An additional label is introduced to restrict usage of a Docker image to the nvidia environment type only.
As mentioned in the provided documentation, the
nvidia/cuda:x.y.z-base-rockylinux8
works in replacement ofrockylinux:8
as base for theingi/inginious-c-base
container. This was not included in this PR yet as it would require some practical usage tests to evaluate how accurate it would be.