Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[shim] Change NVIDIA GPU detection method
* Check for `/dev/nvidiactl`, not `nvidia-smi` binary, to detect NVIDIA GPU. Unlike the binary, the devfs file only exists if some conditions are met (the exact way how `/dev/ndivia*` character device files are created is complicated and setup-specific — involving some of: kernel module, udev, modprobe, nvidia-persistenced, X server, and more — but in general, it should be safe to assume that if NVIDIA GPU is available, then `/dev/nvidiactl` does exist. * Run `nvidia-smi` to get GPU info directly on the host, not inside a container. Using Docker is completely unnecessary, as NVIDIA Container Toolkit mounts libs and executables from the host — dstack-provided Docker image doesn't even contain `nvidia-smi` binary, it's always a bind-mounted file from the host. Fixes: #1942
- Loading branch information