"...git@developer.sourcefind.cn:chenpangpang/open-webui.git" did not exist on "2c030218f8f2e2872cbdaf2e1d70d1dee0bedd53"
Unverified Commit 2cb41121 authored by Samuel GIFFARD's avatar Samuel GIFFARD Committed by GitHub
Browse files

Enhance GPU detection logic to support WSL2 environments

This commit updates the GPU detection logic in the setup script to accommodate environments where NVIDIA GPUs might not be directly listed by `lspci`, such as in Windows Subsystem for Linux 2 (WSL2). The revised logic now attempts to identify NVIDIA GPUs using both `lspci` and `nvidia-smi`, ensuring broader compatibility and recognizing GPUs that are accessible in WSL2. This change allows the script to correctly detect NVIDIA GPUs in a wider range of setups, improving user experience and script robustness in diverse environments.
parent 0ab33bd5
...@@ -11,8 +11,8 @@ TICK='\u2713' ...@@ -11,8 +11,8 @@ TICK='\u2713'
# Detect GPU driver # Detect GPU driver
get_gpu_driver() { get_gpu_driver() {
# Detect NVIDIA GPUs # Detect NVIDIA GPUs using lspci or nvidia-smi
if lspci | grep -i nvidia >/dev/null; then if lspci | grep -i nvidia >/dev/null || nvidia-smi >/dev/null 2>&1; then
echo "nvidia" echo "nvidia"
return return
fi fi
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment