mirror of
https://github.com/XuehaiPan/nvitop.git
synced 2026-05-15 14:15:55 -06:00
[GH-ISSUE #23] nvidia-ml-py version conflicts with other packages (e.g., gpustat) #19
Labels
No labels
api
bug
bug
cli / tui
dependencies
documentation
documentation
documentation
duplicate
enhancement
exporter
invalid
pull-request
pynvml
question
question
upstream
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: github-starred/nvitop#19
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
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 @wookayin on GitHub (Jul 4, 2022).
Original GitHub issue: https://github.com/XuehaiPan/nvitop/issues/23
Originally assigned to: @XuehaiPan on GitHub.
Context: https://github.com/wookayin/gpustat/pull/107 trying to use nvidia-ml-py, Related issues: #4
Hello @XuehaiPan,
I just realized that
nvitoprequires nvidia-ml-py to be pinned at11.450.51due to the incompatible API, as discussed in wookayin/gpustat#107. My solution (ingpustat) to this bothersome library is to use pynvml greater than 11.450.129, but this would create some nuisance problems for normal users who may have bothnvitopandgpustat>=1.0installed.From nvitop's README:
Is having
pynvmlversion NOT pinned at the specific version an option for you? More specifically,nvmlDeviceGetComputeRunningProcesses_v2exists since 11.450.129+. In my opinion, pinning nvidia-ml-py at too old and too specific version isn't a great idea, although I also admit that the solution I accepted isn't ideal at all.We could discuss and coordinate together to avoid any package conflict issues, because in the current situation
gpustatandnvitopwould be not compatible with each other due to the nvidia-ml-py version.@XuehaiPan commented on GitHub (Jul 4, 2022):
Hi @wookayin, thanks for raising this.
The reason for pinning the version of
nvidia-ml-py == 11.450.51is to support Ubuntu 16.04 LTS. For the same reason, I also do not drop the support for Python 3.5 (the default Python on Ubuntu 16.04 LTS). Although both Ubuntu 16.04 and Python 3.5 are out of maintenance.The maximum NVIDIA driver version in
ppa:graphics-driversis the R430 driver (the maximum supported CUDA version is 10.1). The structnvmlProcessInfo_v2_twas introduced in CUDA 11.x, which requires at least R450 driver. Although the admin can upgrade the NVIDIA driver on UBuntu 16.04 to R465 with a CUDA.debfile. I think the goal of a PyPI package should be usable for users who do not havesudoprivileges.I'm going to add an optional argument to
pipand let the user choose the version ofnvidia-ml-pythemself as:EDIT: The
extraoption inpackge[extra]should start with a letter not numbers.@wookayin commented on GitHub (Jul 4, 2022):
Thank you, I wasn't aware of the Ubuntu 16.04 LTS compatibility, but giving a thought to more modern systems it would make more sense to allow CUDA-11 compatible nvidia-450+ pynvml installations.
That sounds like nvitop may have support for different versions of pynvml, which will be great. Though features might be incomplete if the driver/library installation would not match.... We might need to add some fallback mechanisms --- I don't have an universal solution yet without bundling and copy-paste-ing the source code of the
nvmlProcessInfostruct ornvmlDeviceGetComputeRunningProcesses_v2function.@XuehaiPan commented on GitHub (Jul 4, 2022):
I haven't found a way to solve this either :(. The module
pynvml.pyprovides either the v1 or the v2 struct ofnvmlProcessInfo_t, not both. We need to copy-paste the source code.@XuehaiPan commented on GitHub (Jul 5, 2022):
@wookayin I have loosened the dependency constraints to
nvidia-ml-py >=11.450.51,<11.500.00in PR #24.In
gpustat, which arenvidia-ml-py >=11.450.129,<=11.495.46(innvitop, an extra version11.450.51provided for CUDA 10.x drivers).cd65b1ef5f/setup.py (L77-L82)For a fresh installation, both
gpustatandnvitopwill installnvidia-ml-py == 11.495.46:@mjkanji commented on GitHub (Sep 7, 2023):
Hi @XuehaiPan,
I'm running into the same issue when trying to install
nvitopwithcumlin a conda environment:This installs a really old version of
cuml(0.6.1), becausecumldepends ondask-cuda, which depends onpynvml.I don't know much about how
condapackages are built and don't fully understand the discussion above about Nvidia driver internals, but a fix that resolves this for the conda package would be much appreciated. Thanks!@XuehaiPan commented on GitHub (Sep 9, 2023):
Hi @mjkanji, maybe you can use
pipxto installnvitopin an isolated environment. You can also set it as an alias: