Skip to content

Latest commit

 

History

History
61 lines (46 loc) · 1.74 KB

readme.md

File metadata and controls

61 lines (46 loc) · 1.74 KB

Overview

This is part of the JAPAC Generative AI Technical Workshop qwiklabs. The workshop walk the audiences through:

  • Google Generative AI Language offerings
  • Langchain integration

Environment Setup

  1. Configure Google Cloud Environment

If you are running the lab in Qwiklabs environment, you do not have to manually configure the Google Project.

To manually configure the Google Cloud project:

  1. Use Terraform to create and configure required resources.
cd terraform/qwiklabs

terraform init
terraform plan
terraform apply

This will create the following resources: 1. A VPC with firewall rules which allows 80, 8080, 23 TCP inbound traffics. 2. Service Network peering with the VPC. 3. A GCE VM that runs in the VPC created previously.

  1. ssh to the newly created GVE VM instance and clone the repository.
  2. Switch to llm-workshop folder and open 1-setup-vm.sh
  3. Update the following line, replace the project id with your own project id.
export GOOGLE_PROJECT_ID=<YOUR PROJECT ID>
  1. Install required packages.
cd llm-workshop
sudo apt install -y python3.11-distutils
sudo apt-get update -y
sudo apt install -y python3-virtualenv
virtualenv --python=/usr/bin/python3.11 .venv
source ./.venv/bin/activate
curl -sS https://bootstrap.pypa.io/get-pip.py | python3.11

pip install --require-hashes -r requirements.txt
  1. Sets the GOOGLE_CLOUD_PROJECT environment variable.
export GOOGLE_CLOUD_PROJECT=$(gcloud config get project)
export GOOGLE_CLOUD_REGIN=<REGION>
  1. Run 0-setup-matching-engine.py, this will create the Vertex Matching Engine which can take 40-60 minutes.

  2. Create BigQuery Dataset and copy data from the public dataset.

bash ./1-create-and-copy-bq-data.py