启动后报错如下:
(ServeController pid=2738424) File "/root/anaconda3/lib/python3.10/site-packages/torch/nn/modules/module.py", line 987,
(ServeController pid=2738424) return t.to(device, dtype if t.is_floating_point() or t.is_complex() else None, non_bloc
(ServeController pid=2738424) File "/root/anaconda3/lib/python3.10/site-packages/torch/cuda/__init__.py", line 229, in _
(ServeController pid=2738424) torch._C._cuda_init()
(ServeController pid=2738424) RuntimeError: No CUDA GPUs are available
看是不是ray_actor_options设置错了,笔者之前写成了下面这样,漏了num_gpus字段,所以就找不到gpu了。
ray_actor_options = {
"num_cpus": 0.2,
}
这样改正后就好了
ray_actor_options = {
"num_cpus": 0.2,
"num_gpus": 0.3
}