This repository was archived by the owner on Jun 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 237
This repository was archived by the owner on Jun 10, 2024. It is now read-only.
CUDA_ERROR_NO_DEVICE when used inside Ray Actor #571
Copy link
Copy link
Open
Description
Describe the bug
I get the error CUDA error: CUDA_ERROR_NO_DEVICE when run inside of ray.remote
To Reproduce
##
import PyNvCodec as nvc
import ray
##
# ok
nv = nvc.PyNvEncoder(
{
"preset": "P4",
"codec": "hevc", # Use H.265 codec
"fps": "30",
"s": "1920x1080",
"bitrate": "10M",
"gop": "60",
"profile": "high"
},
0 # G
)
##
@ray.remote
class T():
def __init__(self):
self.nv = nvc.PyNvEncoder(
{
"preset": "P4",
"codec": "hevc", # Use H.265 codec
"fps": "30",
"s": "1920x1080",
"bitrate": "10M",
"gop": "60",
"profile": "high"
},
0 # G
)
# fails
T.remote()(T pid=47452) Exception raised in creation task: The actor died because of an error raised in its creation task, ray::T.__init__() (pid=47452, ip=192.168.1.68, actor_id=34d055865916a666bd2e62b501000000, repr=<2024-05-25_ray_nvenc.T object at 0x70db17bfda20>)
(T pid=47452) File "<ipython-input-3-bd07d4f981a3>", line 5, in __init__
(T pid=47452) RuntimeError: [/tmp/pip-req-build-k99edwsy/src/PyNvCodec/src/PyNvCodec.cpp:61](https://vscode-remote+ssh-002dremote-002binference1.vscode-resource.vscode-cdn.net/tmp/pip-req-build-k99edwsy/src/PyNvCodec/src/PyNvCodec.cpp:61)
(T pid=47452) CUDA error: CUDA_ERROR_NO_DEVICE
(T pid=47452) no CUDA-capable device is detected
Expected behavior
The CUDA device should be found
Desktop (please complete the following information):
- OS: Ubuntu 22.04
- Nvidia driver version: 550.67
- CUDA Version: 12.4
- Python Version: 3.10.13
- Video Codec SDK Version: PyNvCodec 2.0
Metadata
Metadata
Assignees
Labels
No labels