Spaces:
Running
Running
**Title: ZeroGPU worker_init fails with "RuntimeError: No CUDA GPUs are available" (account > a or 2 years old, email verified)**
#186
by humair025 - opened
Space: humair025/codec
Hardware: ZeroGPU
Issue
Requests to my @spaces.GPU-decorated function fail during worker startup, before any of my own code runs. Traceback:
Traceback (most recent call last):
File "/usr/local/lib/python3.12/site-packages/spaces/zero/wrappers.py", line 148, in worker_init
torch.init(nvidia_uuid)
File "/usr/local/lib/python3.12/site-packages/spaces/zero/torch/patching.py", line 417, in init
torch.Tensor([0]).cuda()
File "/usr/local/lib/python3.12/site-packages/torch/cuda/__init__.py", line 478, in _lazy_init
torch._C._cuda_init()
RuntimeError: No CUDA GPUs are available
Why I don't think this is an eligibility issue
My account is more than [X] years old and my email is verified, so I don't believe this is the "new account / unverified email" gating case. spaces is imported before torch at the top of app.py, and @spaces.GPU is applied to the function that does the actual inference, so the decorator setup itself looks correct.
What I've tried
- Restarted the Space
- Retried the same request multiple times, a few minutes apart
- Confirmed
spacesis in requirements.txt and imported first
Question
Is this shared-pool exhaustion on your end, or is there something specific to my account/Space I should check? Happy to share the full app.py or more logs if useful.