- Notifications
You must be signed in to change notification settings - Fork671
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
As stated by the title, i have my lancedb table in a gcp bucket, and when i run this locally, it works fine. The code is as follows: ^ this works fine locally, but I have a lot of trouble connecting it in cloud run, with this particular GOOGLE_APPLICATION_CREDENTIALS (creds_path) not being able to connect properly to lancedb. But, this doesn't work, neither locally nor in the cloud. Edit: What's painful in navigating this is when the connection fails, I don't really get to know: since lancedb creates a local table with the same name as the gcp bucket. |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 1 comment 3 replies
-
By "run this locally" do you mean you are connecting to GCP from your local laptop? Or connecting to a local path?
How are you configuring lancedb to point at the credentials? |
BetaWas this translation helpful?Give feedback.
All reactions
-
Hey! thanks for responding. Yes, i do mean i'm connecting to GCP from a local laptop. Locally, what works is the first code snippet i attached, the creds_path is just a string containing the path to the service account json, since even with GOOGLE_APPLICATION_CREDENTIALS set, just the gs:// path did not suffice. However, with the cloud run application, none of this works. Including using all appropriate options mentioned in the docs here:https://lancedb.github.io/lancedb/guides/storage/#google-cloud-storage. Usually, for google clients, setting the path to service account is not necessary in cloud run, as long as the service account connected to the cloud run container has the necessary permissions (which it does). I still can't connect to the bucket through the .connect() function. |
BetaWas this translation helpful?Give feedback.
All reactions
-
I agree this is the standard and much easier path. That is normally how I setup GCP instances as well. I configure the VM to have a service account with the appropriate credentials and then check the "Allow full access to all Cloud APIs" checkbox. After that I'm usually able to use
I think the environment variables for a service account json file are |
BetaWas this translation helpful?Give feedback.
All reactions
-
The service account has the required permissions, I just created a new one and deployed it to check if it works but it doesn't. Also, the "Allow full access to all Cloud APIs" is I think the option that shows up when creating a VM but not Cloud run - my project is in a container deployed with cloud run. As for the |
BetaWas this translation helpful?Give feedback.