Merge pull request #575 from Mulugruntz/sgiffard/nvidia-gpu-on-wsl2

Enhance GPU detection logic to support WSL2 environments
This commit is contained in:
Timothy Jaeryang Baek 2024-01-25 10:40:27 -08:00 committed by GitHub
commit ddd1a437ae
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -11,8 +11,8 @@ TICK='\u2713'
# Detect GPU driver
get_gpu_driver() {
# Detect NVIDIA GPUs
if lspci | grep -i nvidia >/dev/null; then
# Detect NVIDIA GPUs using lspci or nvidia-smi
if lspci | grep -i nvidia >/dev/null || nvidia-smi >/dev/null 2>&1; then
echo "nvidia"
return
fi