mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 10:58:17 -05:00
[GH-ISSUE #574] Enhance GPU Detection Logic for WSL2 Compatibility #12127
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @Mulugruntz on GitHub (Jan 25, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/574
Bug Report
Description
Bug Summary:
The setup script fails to detect NVIDIA GPUs in Windows Subsystem for Linux 2 (WSL2) environments due to its reliance on
lspci, which does not list NVIDIA GPUs as it would on a native Linux system.Steps to Reproduce:
nvidia-smi.lspci | grep -i nvidia.Expected Behavior:
The script should correctly identify the presence of an NVIDIA GPU in WSL2 environments, allowing for further GPU-related setup processes to proceed.
Actual Behavior:
The script does not detect the NVIDIA GPU in WSL2, likely skipping any setup steps that depend on GPU presence, due to
lspcinot listing the GPU as expected.Environment
Reproduction Details
Confirmation:
Logs and Screenshots
Browser Console Logs:
N/A
Docker Container Logs:
N/A
Screenshots (if applicable):
N/A
Installation Method
I encountered this issue while running a shell script (
run-compose.sh) designed to set up a Docker environment that requires GPU support. The script attempts to automatically detect the presence of NVIDIA GPUs usinglspci.Additional Information
Considering WSL2's architecture, which abstracts hardware access through a virtualization layer, utilities like
lspcido not directly interact with the hardware in the same way they do on a native Linux system. This can lead to false negatives when detecting hardware, such as NVIDIA GPUs. A potential solution could involve enhancing the detection logic to also check for GPU presence usingnvidia-smi, which is known to work reliably in WSL2 environments.Note
I understand the importance of providing a complete and detailed bug report. I have attempted to provide all necessary information based on my current setup and the issue encountered. I'm looking forward to any guidance or suggestions on addressing this issue. Thank you!