# \`get\_gpu\_ids\` is not empty but \`torch.cuss.is\_available\` is false

**URL:** <https://discuss.ray.io/t/get-gpu-ids-is-not-empty-but-torch-cuss-is-available-is-false/4107>\
**Category:** Ray Core\
**Created:** [November 11, 2021, 5:42pm UTC](https://discuss.ray.io/t/get-gpu-ids-is-not-empty-but-torch-cuss-is-available-is-false/4107 "2021-11-11T17:42:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Robur](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/robur/32/1724_2.png) [@Robur](https://discuss.ray.io/u/Robur)\
**Post date:** [November 11, 2021, 5:42pm UTC](https://discuss.ray.io/t/get-gpu-ids-is-not-empty-but-torch-cuss-is-available-is-false/4107/1 "2021-11-11T17:42:40Z")

</div>

Hi,

I am new to ray and while trying to use it I faced a problem that my googling abilities failed to help me with.

The setup is the following. I am launching ray on a local machine in Docker initializing it with a single GPU and ten CPU cores.

One worker fails with

`RuntimeError: No CUDA GPUs are available`

having `get_gpu_ids` equals to `[0]` but `torch.cuda.is_available()` is false. Whereas there is one process with `torch.cuda.is_available()` equals to true.

Is this expected behavior? If yes, could please point to the manual so that I can more fully understand how ray works? If no, what can I do to avoid this error?

Launching on Ubuntu 18.04, PyTorch of version 1.9+cu111, ray of version 1.8.

Thanks.

---

<div class="post-metadata">

**Author:** ![sangcho](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ray.io/sangcho/32/425_2.png) [@sangcho](https://discuss.ray.io/u/sangcho)\
**Post date:** [November 23, 2021, 3:27pm UTC](https://discuss.ray.io/t/get-gpu-ids-is-not-empty-but-torch-cuss-is-available-is-false/4107/2 "2021-11-23T15:27:33Z")

</div>

cc @rliaw @sven1977 can you guys address this question?
