-
Notifications
You must be signed in to change notification settings - Fork 741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
google.colab.auth is unsupported in this environment for custom GCE VM runtime #2533
Comments
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 |
how do i connect to colab with private GCE server. |
@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. |
Is there a workaround? It would be really handy if results from a Colab Notebook could be saved to Drive. |
Keep in mind that a custom GCE VM will be accessible to all users who have access to VMs within that project. Because of this you need to be careful about putting credentials on the VM- they will be accessible to everyone with access to that VM. Because the Colab service cannot guarantee the VM is only accessible to a single user we are not allowed to provide credentials to it. An alternative is to use something such as https://github.com/astrada/google-drive-ocamlfuse- |
@blois - I'm a little surprised that anyone who has access to the project has access to notebook data by default. My assumption was that the environment ran in its own container with each different user connecting being given their own containers and their own container local storage. Isn't that how it works in the hosted environment? I guess that's mostly the crux of my confusion. If there are sufficient environmental protections in place for the hosted environment, why isn't a project security boundary considered equivalent? How is this different than any other project level security boundaries in GCP? Specifically, doesn't the workaround you describe also put the credentials on the VM? And with FUSE can't anyone in the project, by default, ssh to the VM, then sudo su to the user and have access to the FUSE drive? So this doesn't materially change the security posture? |
It's not necessary a gmail login. It can be a service account (the one the VM has access to). Why not to support it for better UX? |
You can add in your policy to comply users with agreement and allow google.colab.auth for those who use custom GCE VM runtime. Also it would be nice if it's available in google cloud function na kub. |
Has this been resolved? Colab Pro + only ever gives me P100s so I upgraded to a A100 with GCE Vms but now I can't access all my google drive files. |
Was using ocamlfuse solution to access my Drive, but that has just stopped working too. Have to look for an alternative solution, again. |
|
@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. |
Any updates on this? Trying to connect a custom GCE VM, but it is an unsupported environment |
#2533 (comment) is still the current status. |
If we're connecting to the custom GCE VM through a locally-hosted runtime (via port-forwarding), there's no way to install omcamlfuse, since terminal functionality is disabled. |
What's the point of using Colab if we can't use beefier hardware? Any recommendations for alternative services? |
It's september. This still hasn't been resolved? Very disappointed.... we just upgraded for the same reasons and got caught by this bug. |
Hey everyone, I'm just as confused and annoyed at the lack of Google Drive integration with GCE. I hope we find a fix soon.
|
I mentioned it already in the thread and will do it again. If the only concern is that Google Drive creds/tokens will be accessible to everyone who has access to that VM then we can use a service account.
|
It would be nice there is a bypass/opt-out. I mean google-drive-ocamlfuse works. but I'd expect it to work out of box. At least have a prompt when trying to mount etc |
Any update on this issue? |
Scrolled through this thread hoping for a solution and was met with disappointment.. |
Disappointment in 2023... |
@cperry-goog @blois Any updates on the issue? What is the status of |
After a year and two months of waiting, any update on this issue? |
Any updates? Paid for custom GCE VM and immediately regretted. |
Any updates? |
I came here because I'm facing the same issue... unbelievable that there's no updates on this yet. |
@cperry-goog are there any updates on that issue? |
Same issue. Hoping for an update! |
Hi all! I wanted to share the solution that has been working for me since it seems that this has been an ongoing issue for a lot of people. I've been using google-drive-ocamlfuse to mount my gDrive on a custom GCE VM. The process is a bit involved and not the most elegant, but it works. First you'll need to create a new project and OAuth credentials via the API Console. The key here is that we'll need to set it up for Headless Usage since Google Colab doesn't have a web browser. Follow the steps here on ocamlfuse's documentation to setup Headless Usage HERE and this should give you API access to your Drive, with a client ID and secret key. Once you have your client ID and secret key setup, you can install ocamlfuse with the following command
and then you should be able to now mount your drive with this
which should then show you something similar to this
which will take you to a credential page and you can copy and paste your key
And that's basically it! You should be able to mount your drive with the code below
The only thing is that this has made things cumbersome for when I just have a single notebook that I like to run on either a hosted runtime or GCE VM, so I've made the code below in order to determine whether or not it's on a GCE VM, install ocamlfuse if needed, and mount the drive the old fashioned way, or with ocamlfuse. I pretty much have this code block on all of my notebooks now. Hope this helps!!! Just make sure to replace your client ID and secret keys
|
Hi chriscast88, Thanks for posting this. After following your guide, I ran this code: But got this error: If anyone has any advice, I'd appreciate it? Thanks! |
Try this? |
For my use case, using a Google Storage Bucket as the backing datastore was an equivalent option to Google Drive. It's very straightforward to connect to a bucket with the following code (utilizing gcsfuse)
|
still no fix? |
Posting with permission from @cperry-goog - we're collaborating with the Colab team to provide DagsHub Storage as an alternative to GDrive that is more scalable and built for use with large datasets. It's an S3-compatible bucket that has much simpler access controls, and can be mounted easily. It might help avoid the issues above - here's a link to an example notebook to try it out We're looking for community feedback, so I'd love to get your input if it helps with the issue at hand. (If you're curious, DagsHub is a platform for ML teams which is why we think Colab should have a storage solution suitable for ML workloads) |
Umm doesn't this run into the same issue being that "google.colab is unsupported in this environment." |
How can I change my google colab compute engine? |
Still a problem after 2 years...This took time and $ |
@cperry-goog, Any updates on this? |
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
I get the following error
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.
The text was updated successfully, but these errors were encountered: