Apologies if this is a noob question.
I have a docker for GoMLX, a machine learning framework for Go that includes support for NVidia GPUs (through CUDA), if it is present.
How does one detect if the docker running has access to a GPU card ?
Notice the docker doesn’t include nvidia-smi
binary, only the CUDA/CUDnn drivers (by pip installing them)
Currently, what I do is to check the presence of the device files in /dev/nvidia*
. This works in Linux but not in Windows WSL/WSL2.
Many thanks in advance!
Links:
[1] Also check /usr/bin/ path for nvidia cards e.g. in WSL by RJKeevil · Pull Request #18 · gomlx/gopjrt · GitHub
[2] GoMLX GitHub
[3] GoMLX + JupyterLab Docker