abhishekkrthakur / colabcode

Run VSCode (codeserver) on Google Colab or Kaggle Notebooks
MIT License
2.07k stars 276 forks source link

CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected #26

Closed TanayKarve closed 4 years ago

TanayKarve commented 4 years ago

Started colabcode from the colab_starter.ipynb notebook. I ran this code on the vscode session in browser:

from tensorflow.python.client import device_lib
import os

def get_available_gpus():
    local_device_protos = device_lib.list_local_devices()
    return [x.name for x in local_device_protos if x.device_type == 'GPU']

print(get_available_gpus())

and got this output:

2020-09-22 06:04:37.823495: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcudart.so.10.1
2020-09-22 06:04:38.942761: I tensorflow/core/platform/profile_utils/cpu_utils.cc:104] CPU Frequency: 2249995000 Hz
2020-09-22 06:04:38.943092: I tensorflow/compiler/xla/service/service.cc:168] XLA service 0x22f8a00 initialized for platform Host (this does not guarantee that XLA will be used). Devices:
2020-09-22 06:04:38.943117: I tensorflow/compiler/xla/service/service.cc:176]   StreamExecutor device (0): Host, Default Version
2020-09-22 06:04:38.944475: I tensorflow/stream_executor/platform/default/dso_loader.cc:48] Successfully opened dynamic library libcuda.so.1
2020-09-22 06:04:38.947013: E tensorflow/stream_executor/cuda/cuda_driver.cc:314] failed call to cuInit: CUDA_ERROR_NO_DEVICE: no CUDA-capable device is detected
2020-09-22 06:04:38.947042: I tensorflow/stream_executor/cuda/cuda_diagnostics.cc:156] kernel driver does not appear to be running on this host (6018e5e49baf): /proc/driver/nvidia/version does not exist
TanayKarve commented 4 years ago

Oh sorry, my bad. The colab notebook I was running on was not on a GPU runtime.