From afe994edfe584df34e0bc436e5f2e5b631db786a Mon Sep 17 00:00:00 2001
From: jakirkham <jakirkham@gmail.com>
Date: Tue, 26 Nov 2024 06:49:08 -0800
Subject: [PATCH] Use PyNVML 11 for now (#210)

PyNVML 12 will depend on nvidia-ml-py and drop its equivalent
functionality. So it will largely become a metapackage with some
utilities. This will mean using a much newer version of the NVML
functionality through Python than is currently used in RAPIDS. As a
preventive step, stick to PyNVML 11, which is what RAPIDS already uses.

Then when PyNVML 12 is released, this can be relaxed on a
project-by-project basis to see if it unconvers any issues that will
need project-level fixes.
---
 conda/environments/all_arch-any.yaml           | 2 +-
 conda/recipes/jupyterlab-nvdashboard/meta.yaml | 2 +-
 dependencies.yaml                              | 2 +-
 pyproject.toml                                 | 2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/conda/environments/all_arch-any.yaml b/conda/environments/all_arch-any.yaml
index e96db4f..5762fa1 100644
--- a/conda/environments/all_arch-any.yaml
+++ b/conda/environments/all_arch-any.yaml
@@ -10,7 +10,7 @@ dependencies:
 - nodejs=18
 - pre-commit
 - psutil
-- pynvml
+- pynvml>=11.0.0,<12.0.0a0
 - pytest
 - pytest-asyncio
 - pytest-jupyter[server]>=0.6.0
diff --git a/conda/recipes/jupyterlab-nvdashboard/meta.yaml b/conda/recipes/jupyterlab-nvdashboard/meta.yaml
index 0bf73c2..f6960b6 100644
--- a/conda/recipes/jupyterlab-nvdashboard/meta.yaml
+++ b/conda/recipes/jupyterlab-nvdashboard/meta.yaml
@@ -26,7 +26,7 @@ requirements:
   run:
     - python >=3.8
     - jupyterlab >=4
-    - pynvml
+    - pynvml >=11.0.0,<12.0.0a0
     - psutil
 
 
diff --git a/dependencies.yaml b/dependencies.yaml
index 59c226a..38a889e 100644
--- a/dependencies.yaml
+++ b/dependencies.yaml
@@ -72,7 +72,7 @@ dependencies:
       - output_types: [conda, requirements, pyproject]
         packages:
           - jupyterlab>=4
-          - pynvml
+          - pynvml>=11.0.0,<12.0.0a0
           - psutil
   test_python:
     common:
diff --git a/pyproject.toml b/pyproject.toml
index 1e44230..39b2c3d 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -31,7 +31,7 @@ classifiers = [
 dependencies = [
     "jupyterlab>=4",
     "psutil",
-    "pynvml",
+    "pynvml>=11.0.0,<12.0.0a0",
 ] # This list was generated by `rapids-dependency-file-generator`. To make changes, edit dependencies.yaml and run `rapids-dependency-file-generator`.
 dynamic = ["version", "description", "authors", "urls", "keywords"]