[PR #575] [MERGED] Enhance GPU detection logic to support WSL2 environments #43431

Closed
opened 2026-04-29 17:32:12 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/575
Author: @Mulugruntz
Created: 1/25/2024
Status: Merged
Merged: 1/25/2024
Merged by: @tjbck

Base: mainHead: sgiffard/nvidia-gpu-on-wsl2


📝 Commits (1)

  • 2cb4112 Enhance GPU detection logic to support WSL2 environments

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 run-compose.sh (+2 -2)

📄 Description

Pull Request Description:

This pull request addresses the issue outlined in #574, where the existing GPU detection logic in the setup script failed to identify NVIDIA GPUs in WSL2 environments. The modification introduced by this PR allows the script to detect NVIDIA GPUs using both lspci and nvidia-smi, enhancing compatibility with WSL2 and potentially other non-standard environments.

Changes Made:

  • Modified the GPU detection logic to attempt identification via lspci; if that fails, it then tries nvidia-smi.
  • This dual-method approach ensures that NVIDIA GPUs are detected not only in traditional Linux setups but also in WSL2, where GPUs might not appear in lspci output.

Benefits:

  • Ensures broader environment support, specifically aiding users in WSL2 setups.
  • Improves the robustness and user-friendliness of the setup script.
  • Facilitates a smoother setup process for applications requiring GPU support, especially in development and testing scenarios involving WSL2.

Testing:

  • Tested in both native Linux and WSL2 environments with NVIDIA GPUs to verify enhanced detection logic works as intended.
  • Ensured backward compatibility with systems where lspci successfully identifies NVIDIA GPUs.

Acknowledgments:

Thanks to the community for the feedback and suggestions on improving GPU detection, and to the maintainers for reviewing this enhancement.


I look forward to any further feedback or requests for adjustments to ensure this change meets the project's standards and effectively addresses the identified issue.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/575 **Author:** [@Mulugruntz](https://github.com/Mulugruntz) **Created:** 1/25/2024 **Status:** ✅ Merged **Merged:** 1/25/2024 **Merged by:** [@tjbck](https://github.com/tjbck) **Base:** `main` ← **Head:** `sgiffard/nvidia-gpu-on-wsl2` --- ### 📝 Commits (1) - [`2cb4112`](https://github.com/open-webui/open-webui/commit/2cb41121458e69085418830027a6f875b293ca38) Enhance GPU detection logic to support WSL2 environments ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `run-compose.sh` (+2 -2) </details> ### 📄 Description **Pull Request Description:** This pull request addresses the issue outlined in #574, where the existing GPU detection logic in the setup script failed to identify NVIDIA GPUs in WSL2 environments. The modification introduced by this PR allows the script to detect NVIDIA GPUs using both `lspci` and `nvidia-smi`, enhancing compatibility with WSL2 and potentially other non-standard environments. **Changes Made:** - Modified the GPU detection logic to attempt identification via `lspci`; if that fails, it then tries `nvidia-smi`. - This dual-method approach ensures that NVIDIA GPUs are detected not only in traditional Linux setups but also in WSL2, where GPUs might not appear in `lspci` output. **Benefits:** - Ensures broader environment support, specifically aiding users in WSL2 setups. - Improves the robustness and user-friendliness of the setup script. - Facilitates a smoother setup process for applications requiring GPU support, especially in development and testing scenarios involving WSL2. **Testing:** - Tested in both native Linux and WSL2 environments with NVIDIA GPUs to verify enhanced detection logic works as intended. - Ensured backward compatibility with systems where `lspci` successfully identifies NVIDIA GPUs. **Acknowledgments:** Thanks to the community for the feedback and suggestions on improving GPU detection, and to the maintainers for reviewing this enhancement. --- I look forward to any further feedback or requests for adjustments to ensure this change meets the project's standards and effectively addresses the identified issue. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-04-29 17:32:13 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#43431