google.colab.auth is unsupported in this environment for custom GCE VM runtime
See original GitHub issueAfter 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:
- Created 2 years ago
- Reactions:15
- Comments:22 (2 by maintainers)
Top 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 >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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.
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