"pynvml package is deprecated" warning in nvcr.io/nvidia/pytorch:25.09-py3

Steps to reproduce the issue:

  1. Pull and run the pytorch:25.09-py3 container from NGC.

    $ docker pull nvcr.io/nvidia/pytorch:25.09-py3 $ docker run -it --rm --gpus all --network=host --ipc=host --ulimit memlock=-1 --ulimit stack=67108864 nvcr.io/nvidia/pytorch:25.09-py3 
  2. Inside the container, run python and import torch.

    root@compute-h100:/workspace# python Python 3.12.3 (main, Aug 14 2025, 17:47:21) [GCC 13.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import torch /usr/local/lib/python3.12/dist-packages/torch/cuda/__init__.py:63: FutureWarning: The pynvml package is deprecated. Please install nvidia-ml-py instead. If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you. import pynvml # type: ignore[import] >>> 

Things which require attention:

  • “The pynvml package is deprecated. Please install nvidia-ml-py instead.”
  • “If you did not install pynvml directly, please report this to the maintainers of the package that installed pynvml for you.”

Hi jkjung,

Thanks for bringing this to our attention. I will bring this to the team and elevate.

Thanks,

AHarpster