Replace deprecated pynvml with nvidia-ml-py

- Updated all requirements files to use nvidia-ml-py instead of deprecated pynvml
- Added fallback import in webui.py to support both packages
- Maintains backward compatibility while using the actively maintained package
- Updated installation instructions in error messages
parent 52412101
......@@ -3,7 +3,7 @@ torch>=2.0.0 --index-url https://download.pytorch.org/whl/cu118
transformers>=4.30.0
opencv-python>=4.5.0
psutil>=5.8.0
pynvml>=11.0.0
nvidia-ml-py>=12.535.108
flash-attn>=2.0.0
pyinstaller>=5.0.0
PyMySQL>=1.0.0
\ No newline at end of file
......@@ -3,6 +3,6 @@ torch>=2.0.0 --index-url https://download.pytorch.org/whl/rocm5.6
transformers>=4.30.0
opencv-python>=4.5.0
psutil>=5.8.0
pynvml>=11.0.0
nvidia-ml-py>=12.535.108
pyinstaller>=5.0.0
PyMySQL>=1.0.0
\ No newline at end of file
......@@ -3,7 +3,7 @@ torch>=2.0.0
transformers>=4.30.0
opencv-python>=4.5.0
psutil>=5.8.0
pynvml>=11.0.0
nvidia-ml-py>=12.535.108
flash-attn>=2.0.0
pyinstaller>=5.0.0
PyMySQL>=1.0.0
\ No newline at end of file
......@@ -41,8 +41,13 @@ try:
pynvml.nvmlInit()
nvml_available = True
except ImportError:
nvml_available = False
print("pynvml not available, install with: pip install pynvml")
try:
import nvidia_ml_py as pynvml
pynvml.nvmlInit()
nvml_available = True
except ImportError:
nvml_available = False
print("NVIDIA ML library not available, install with: pip install nvidia-ml-py")
try:
import flash_attn
......
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