Can't Access ZeroGPU (NVIDIA A100) even though it is enabled

I have purchased Hugging face pro to get access to the A100 GPU. I have enabled this for one of my spaces, however when I try and run it I get hit with a run time error saying that :

Runtime error
Exit code: 1. Reason: /usr/local/lib/python3.10/site-packages/torch/cuda/__init__.py:716: UserWarning: Can't initialize NVML
  warnings.warn("Can't initialize NVML")
Is CUDA available: False
Traceback (most recent call last):
  File "/home/user/app/app.py", line 21, in <module>
    print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
  File "/usr/local/lib/python3.10/site-packages/torch/cuda/__init__.py", line 940, in current_device
    _lazy_init()
  File "/usr/local/lib/python3.10/site-packages/torch/cuda/__init__.py", line 319, in _lazy_init
    torch._C._cuda_init()
RuntimeError: No CUDA GPUs are available

Does anyone know a workaround for this? My understanding was that enabling a GPU on hugging face should automatically be handled such that it can be detected by PyTorch.

1 Like

Zero GPU space is difficult to use until you get used to it…