Yanis Urbis
Yanis Urbis

Reputation: 181

How to create datalab with a compute engine with a GPU?

  1. I can create datalab with specific CE instance type, but then can't add GPU to that instance.
  2. I can create CE instance with GPU, but then don't know how to run datalab on it. Please, help.

Upvotes: 4

Views: 888

Answers (2)

Chris Meyers
Chris Meyers

Reputation: 1426

Edit: Rose's answer above is correct. There now exists a 'datalab beta create-gpu' command.

Original Answer (out of date): Datalab doesn't currently support using GPUs. This is an datalab github issue #1275.

The VM that Datalab is running on doesn't have the NVidia drivers installed (unless you install them yourself), and the Datalab Docker image itself doesn't have the CUDA or GPU support installed due to the NVidia license required.

The datalab create tool just uses "gcloud compute instances create" calls to make the VMs, and you could theoretically copy those commands and convert them to "gcloud beta compute instances create" with "--accelerator" options, but you'd still have to create your own version of the Datalab docker image to run on it with the NVidia drivers installed (which requires accepting the NVidia license agreement). And that may also require running it using nvidia_docker instead of normal docker.

See also: https://stackoverflow.com/a/42703626/5441818

Upvotes: 4

Rose Perrone
Rose Perrone

Reputation: 63586

Datalab supports GPUs now. See the docs on datalab beta create-gpu here:

https://cloud.google.com/datalab/docs/quickstart#create_and_connect_to_a_cloud_datalab_instance

Upvotes: 2

Related Questions