jupyterlab-nvdashboard icon indicating copy to clipboard operation
jupyterlab-nvdashboard copied to clipboard

Moving from `pynvml` to `nvidia-ml-py`

Open jakirkham opened this issue 2 years ago • 3 comments

Currently this is making use of pynvml in a few places:

https://github.com/rapidsai/jupyterlab-nvdashboard/blob/953973ae021bb13299262f6a102060ac88521e76/requirements.txt#L3

https://github.com/rapidsai/jupyterlab-nvdashboard/blob/953973ae021bb13299262f6a102060ac88521e76/jupyterlab_nvdashboard/apps/gpu.py#L10

https://github.com/rapidsai/jupyterlab-nvdashboard/blob/953973ae021bb13299262f6a102060ac88521e76/conda/recipes/jupyterlab-nvdashboard/meta.yaml#L25

However we would like to move to nvidia-ml-py in the future. Raising this issue to track this work

jakirkham avatar Feb 14 '23 20:02 jakirkham

I'm still interested in this a year later.

The following packages are incompatible
├─ jupyterlab-nvdashboard is installable with the potential options
│  ├─ jupyterlab-nvdashboard [0.1.11|0.1.11191029|...|0.9.0a] would require
│  │  └─ pynvml, which can be installed;
│  └─ jupyterlab-nvdashboard [0.3.0|0.3.0a200420|...|0.4.0] would require
│     └─ bokeh <2  with the potential options
│        ├─ bokeh [0.12.10|0.12.11|...|1.4.0] would require
│        │  └─ python [2.7* |>=2.7,<2.8.0a0 ], which can be installed;
│        ├─ bokeh [0.12.10|0.12.11|...|0.13.0] would require
│        │  └─ python [3.5* |>=3.5,<3.6.0a0 ], which can be installed;
│        ├─ bokeh [0.12.10|0.12.11|...|0.12.9] would require
│        │  └─ python 3.6* , which can be installed;
│        ├─ bokeh [0.12.16|0.13.0|...|1.4.0] would require
│        │  └─ python >=3.6,<3.7.0a0 , which can be installed;
│        ├─ bokeh [0.13.0|1.0.0|...|1.4.0] would require
│        │  └─ python >=3.7,<3.8.0a0 , which can be installed;
│        └─ bokeh [1.3.4|1.4.0] would require
│           └─ python >=3.8,<3.9.0a0 , which can be installed;
└─ nvidia-ml-py is not installable because it requires
   └─ pynvml 9999999999 , which conflicts with any installable versions previously reported.

I have to use pip to get around it, but I'm not a fan of mixing Conda and pip packages.

shermansiu avatar Feb 02 '24 22:02 shermansiu

Thanks Sherman! 🙏

Appreciate the reminder

This would need to be a RAPIDS-wide change as there are several projects that use pynvml currently. We have these tracked already, but this got downprioritized relative to other things last year (like the CUDA 12 bringup). It is a good idea to revisit it though

One tricky piece is pynvml has an smi module (so pynvml.smi), which nvidia-ml-py does not. In the few cases where that is used, we lack a clear replacement strategy. We would either need to drop usages of pynvml.smi or come up with a replacement. That hasn't been figured out yet

jakirkham avatar Feb 03 '24 00:02 jakirkham

Should add the version constraint is intentional as without it the two different packages will clobber each other. For reference, please see these lines in the conda-forge recipe for nvidia-ml-py

jakirkham avatar Feb 03 '24 03:02 jakirkham