question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

google.colab.auth is unsupported in this environment for custom GCE VM runtime

See original GitHub issue

After deploying a custom GCE VM runtime as per the instructions at https://research.google.com/colaboratory/marketplace.html and connecting, when trying to use the following code

from google.colab import auth
auth.authenticate_user()

I get the following error

NotImplementedError                       Traceback (most recent call last)
<ipython-input-1-1f759c1655bd> in <module>()
      1 from google.colab import auth
----> 2 auth.authenticate_user()

/usr/local/lib/python3.7/dist-packages/google/colab/auth.py in authenticate_user(clear_output)
    144   """
    145   if _os.path.exists('/var/colab/mp'):
--> 146     raise NotImplementedError(__name__ + ' is unsupported in this environment.')
    147   if _check_adc():
    148     return

NotImplementedError: google.colab.auth is unsupported in this environment.

My expectation was that the GCE VM deployed from the marketplace would have the same software environment as the standard runtime but also give me the ability to specify the compute/memory/gpu resources that are avaialble to my GCP project. As such, I was not expecting to need to make code changes to the notebook for it to work on the marketplace GCE VM.

Issue Analytics

  • State:open
  • Created 2 years ago
  • Reactions:15
  • Comments:22 (2 by maintainers)

github_iconTop GitHub Comments

14reactions
flyositycommented, Jan 17, 2022

@cperry-goog Any updates on this? I launched an A100 instance with Google Colab VM specifically to use my Colab Notebook I was using on the Colab Pro + account I was paying for, but on beefier hardware, but can’t connect to Drive so it’s useless.

12reactions
cperry-googcommented, Jan 6, 2022

This is on our radar, apologies for the friction. We don’t support auth.authenticate_user() today for a few reasons, we’re tracking a fix at b/207007587

Read more comments on GitHub >

github_iconTop Results From Across the Web

from google.colab import auth auth.authenticate_user()
Using google.colab.auth.authenticate_user() on local machine get OperationalError ... is unsupported in this environment for custom GCE VM runtime#2533.
Read more >
Colab - connectiong to a custom GCE VM - Stack Overflow
Connecting to a Colab backend requires using the Colab Marketplace VM image. Vertex AI backends are not supported.
Read more >
Setting Up and Connecting To Your Google Cloud Account
1. Sign up for Google Cloud Platform · 2.1 Setup Auth for a Kaggle Notebook · 2.2 Setup Auth for a Colab Notebook...
Read more >
Create a VM with attached GPUs - Compute Engine
In the Google Cloud console, go to the Create an instance page. · Specify a Name for your VM. · Select a region...
Read more >
VM from GCP Marketplace - Google Colab
This guide is to help Colab users set up a Google Cloud Platform account and connect a GCP Marketplace virtual machine as their...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found