|
| 1 | +<p align="center"> |
| 2 | + <img src="https://github.com/intel/terraform-intel-gcp-vm/blob/main/images/logo-classicblue-800px.png?raw=true" alt="Intel Logo" width="250"/> |
| 3 | +</p> |
| 4 | + |
| 5 | +# Intel Cloud Optimization Modules for Terraform |
| 6 | + |
| 7 | +© Copyright 2023, Intel Corporation |
| 8 | + |
| 9 | +## GCP C3 4th Gen Xeon(code named Sapphire Rapids) & Intel® Optimized Cloud Recipe for Stable Diffusion |
| 10 | + |
| 11 | +This demo will showcase Stable Diffusion CPU inferencing using 4th Gen Xeon Scalable Processors on GCP. |
| 12 | + |
| 13 | +## Usage |
| 14 | + |
| 15 | +1. Log on to GCP Portal |
| 16 | +2. Enter the GCP Cloud Shell (terminal button on top right of page) |
| 17 | +3. Run the following commands in order: |
| 18 | + |
| 19 | + |
| 20 | +```bash |
| 21 | +git clone https://github.com/intel/terraform-intel-gcp-vm.git |
| 22 | +cd terraform-intel-gcp-vm/examples/gcp-linux-stable-diffusion |
| 23 | +terraform init |
| 24 | +terraform apply |
| 25 | + |
| 26 | +# (enter your GCP project ID and "yes" to confirm) |
| 27 | + |
| 28 | +``` |
| 29 | + |
| 30 | +## Run the Stable Diffusion Intel® OpenVino Optimized Demo |
| 31 | + |
| 32 | +**NOTE - Wait ~5 minutes for the software to install** |
| 33 | + |
| 34 | +**1-SSH into newly created GCP VM and run `source /usr/local/bin/run_demo.sh`** |
| 35 | + |
| 36 | +**2-On your computer open a browser and navigate to http://<VM_PLUBLIC_IP>:5000** |
| 37 | + |
| 38 | +## OPTIONAL - Run the default stock Stable Diffusion demo (not optimized) |
| 39 | + |
| 40 | +**1-SSH into VM and run `source /usr/local/bin/not_optimized_run_demo.sh`** |
| 41 | + |
| 42 | +**2-Browse to port 5001 instead http://<VM_PLUBLIC_IP>:5001** |
| 43 | + |
| 44 | + |
| 45 | +Note: You may need permissions to run Terraform https://cloud.google.com/docs/terraform/get-started-with-terraform |
| 46 | + |
| 47 | +### Pre-requisites for running on a Workstation (bypass if using GCP Cloud Shell) |
| 48 | + |
| 49 | +1. Google Cloud CLI: https://cloud.google.com/sdk/docs/install |
| 50 | +2. CGP account access configured: https://registry.terraform.io/providers/hashicorp/google/latest/docs/guides/provider_reference.html#running-terraform-on-your-workstation |
| 51 | +3. Terraform: https://learn.hashicorp.com/tutorials/terraform/install-cli |
| 52 | +4. Git: https://git-scm.com/book/en/v2/Getting-Started-Installing-Git |
0 commit comments