Skip to content

Commit 069af62

Browse files
Simplify README.md and main.tf (#30)
* Simplify README.md and main.tf * Edit README.md
1 parent 811c192 commit 069af62

File tree

2 files changed

+26
-41
lines changed

2 files changed

+26
-41
lines changed

examples/gcp-linux-fastchat-simple/README.md

Lines changed: 12 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -6,53 +6,40 @@
66

77
© Copyright 2023, Intel Corporation
88

9-
## GCP C3 4th Gen Xeon(code named Sapphire Rapids) & Intel® Cloud Optimized Recipe for FastChat
9+
## GCP C3 4th Gen Xeon(code named Sapphire Rapids) & Intel® Optimized Cloud Recipe for FastChat
1010

1111
This demo will showcase Large Language Model(LLM) CPU inference using 4th Gen Xeon Scalable Processors on GCP.
1212

1313
## Usage
1414

15-
You may need to change the appropriate IAM settings as described here: https://cloud.google.com/docs/terraform/get-started-with-terraform
16-
1715
1. Log on to GCP Portal
1816
2. Enter the GCP Cloud Shell (terminal button on top right of page)
1917
3. Run the following commands in order:
2018

21-
`git clone https://github.com/intel/terraform-intel-gcp-vm.git`
2219

23-
`cd terraform-intel-gcp-vm/examples/gcp-linux-fastchat-simple`
20+
```bash
21+
git clone https://github.com/intel/terraform-intel-gcp-vm.git
22+
cd terraform-intel-gcp-vm/examples/gcp-linux-fastchat-simple
23+
terraform init
24+
terraform apply
2425

25-
`terraform init`
26+
# (enter your GCP project ID and "yes" to confirm)
2627

27-
`terraform apply`
28+
```
2829

2930
## Running the Demo
3031

31-
3232
1. **Wait ~10 minutes** for the Recipe to download/install FastChat and the LLM model before continuing
3333
2. SSH into newly created GCP VM
3434
3. **Run `source /usr/local/bin/run_demo.sh`**
35-
4. If you did not choose to open a port, your app will be proxied through gradio. See https://xxxxxxx.gradio.live URL that is generated during the gradio run.
36-
5. Otherwise, if you choose to open port 7860 in main.tf: on your computer, open a browser and navigate to **http://<VM_PLUBLIC_IP>:7860**. Get your Public IP from the "Compute Engine" section of the GCP console.
35+
4. On your local computer, open a browser and navigate to **http://<VM_PLUBLIC_IP>:7860**. Get your Public IP from the "Compute Engine" section of the VM in the GCP console.
36+
5. Or use the https://xxxxxxx.gradio.live URL that is generated during the demo startup(see on screen logs)
3737

3838
<p align="center">
39-
<img src="https://github.com/intel/terraform-intel-gcp-vm/blob/main/images/gradio.png?raw=true" alt="Gradio_Output" width="250"/>
39+
<img src="https://github.com/intel/terraform-intel-gcp-vm/blob/main/images/gradio.png?raw=true" alt="Gradio_Output" width="900"/>
4040
</p>
4141

42-
43-
--- KNOWN ISSUE ---
44-
45-
The demo may initially fail. In this case, run
46-
47-
`pip install gradio==3.10`
48-
49-
`pip install gradio==3.35.2`
50-
51-
Then, run:
52-
53-
`source /usr/local/bin/run_demo.sh`
54-
55-
And navigate again using your browser.
42+
Note: You may need permissions to run Terraform https://cloud.google.com/docs/terraform/get-started-with-terraform
5643

5744
## Pre-requisites for running on a Workstation (bypass if using GCP Cloud Shell)
5845

examples/gcp-linux-fastchat-simple/main.tf

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ module "linux_vm" {
1010
project = var.project
1111
boot_image_project = "ubuntu-os-cloud"
1212
boot_image_family = "ubuntu-2204-lts"
13-
name = "intel-fastchat-test"
13+
name = "intel-fastchat"
1414
zone = "us-central1-a"
15-
machine_type = "c3-highmem-22"
15+
machine_type = "c3-standard-44"
1616
tags = ["fschat"]
1717
user_data = templatefile("./cloud_init.yml", {})
1818
access_config = [{
@@ -22,18 +22,16 @@ module "linux_vm" {
2222
}, ]
2323
}
2424

25-
# FastChat Gradio Webserver can be accessed by the Gradio Proxy. See https://xxxxxxx.gradio.live URL that is generated during the gradio run
26-
# Otherwise uncomment this to allow access to the VM Public IP on Port 7860, http://<VM_PLUBLIC_IP>:7860
27-
# resource "google_compute_firewall" "rules" {
28-
# project = var.project
29-
# name = "fastchat-firewall"
30-
# network = "default"
31-
# description = "Allows access to FastChat Webserver."
25+
resource "google_compute_firewall" "rules" {
26+
project = var.project
27+
name = "fastchat-firewall"
28+
network = "default"
29+
description = "Allows access to FastChat Webserver."
3230

33-
# allow {
34-
# protocol = "tcp"
35-
# ports = ["7860"]
36-
# }
37-
# source_ranges = [ "0.0.0.0/0" ]
38-
# target_tags = ["fschat"]
39-
# }
31+
allow {
32+
protocol = "tcp"
33+
ports = ["7860"]
34+
}
35+
source_ranges = [ "0.0.0.0/0" ]
36+
target_tags = ["fschat"]
37+
}

0 commit comments

Comments
 (0)