Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 16 additions & 3 deletions samples/langchain_quick_start.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -91,15 +91,21 @@
"source": [
"Memorystore for Redis uses private, internal IP addresses for security. To access your Redis instance from the public internet, you'll need to set up a jump box and SSH into it from your Colab with port forwarding. Using a local Colab runtime makes this process easier.\n",
"\n",
"Download and run the latest Colab runtime docker image on your local machine: `docker run --network=host us-docker.pkg.dev/colab-images/public/runtime`"
"The flow of a connection to Redis instance in this colab example would be:\n",
"\n",
"```\n",
"Colab browser -> Colab runtime on local machine -> GCE VM(jump box) -> Redis instance\n",
"```"
]
},
{
"attachments": {},
"cell_type": "markdown",
"metadata": {},
"source": [
"Connect Colab to the local Colab runtime. Please refer to the [instructions](https://research.google.com/colaboratory/local-runtimes.html)."
"1. Download and run the latest Colab runtime docker image on your local machine: `docker run --network=host us-docker.pkg.dev/colab-images/public/runtime`\n",
"\n",
"1. Connect Colab to the local Colab runtime. Please refer to the [instructions](https://research.google.com/colaboratory/local-runtimes.html)."
]
},
{
Expand Down Expand Up @@ -350,7 +356,14 @@
"outputs": [],
"source": [
"redis_ip = !gcloud beta redis instances describe {instance_name} --region {region} --format=\"value(host)\"\n",
"!gcloud compute ssh --project={project_id} --zone={zone} {vm_name} -- -NL 6379:{redis_ip}:6379"
"!gcloud compute ssh --project={project_id} --zone={zone} {vm_name} -- -NL 6379:{redis_ip[0]}:6379\""
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Please run the above command printed in the output of above step in your local machine to establishing traffic forwarding. Note that the above command is a processed as a blocking command, hence it has to be executed outside Colab and you will need run it on your local machine terminal."
]
},
{
Expand Down