Skip to content

Latest commit

 

History

History
76 lines (48 loc) · 2.28 KB

File metadata and controls

76 lines (48 loc) · 2.28 KB

Start Cloud Shell

While Google Cloud can be operated remotely from your laptop, in this codelab you will be using Google Cloud Shell, a command line environment running in the Cloud.

From the Google Cloud Console, click the Cloud Shell icon on the top right toolbar:

Cloud Shell Icon

It should only take a few moments to provision and connect to the environment. When it is finished, you should see something like this:

Cloud Shell Terminal

Once connected to Cloud Shell, you should see that you are already authenticated and that the project is already set to your project ID.

Run the following command in Cloud Shell to confirm that you are authenticated:

Once connected to Cloud Shell, you should see that you are already authenticated and that the project is already set to your `PROJECT_ID``.

gcloud auth list

Command output:

Credentialed accounts:
 - <myaccount>@<mydomain>.com (active)
gcloud config list project

Command output:

[core]
project = <PROJECT_ID>

If, for some reason, the project is not set, simply issue the following command:

gcloud config set project <PROJECT_ID>

Cloud Shell also sets some environment variables by default, which may be useful as you run future commands.

echo $GOOGLE_CLOUD_PROJECT

Command output:

<PROJECT_ID>

Enable the Google Cloud APIs

In order to use the various services we will need throughout this project, we will enable a few APIs. We will do so by launching the following command in Cloud Shell:

gcloud services enable cloudbuild.googleapis.com cloudfunctions.googleapis.com run.googleapis.com logging.googleapis.com storage-component.googleapis.com aiplatform.googleapis.com

After some time, you should see the operation finish successfully:

Clone the Repository

Clone the repo in Cloud Shell using the following command:

git clone https://github.com/marco-cheung/gemini-ocr-streamlit.git