forked from lavishsheth/code
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Google Fly Cup Challenge: Champion
100 lines (60 loc) · 2.42 KB
/
Google Fly Cup Challenge: Champion
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
Please find the updated workaround for the lab Google Fly Cup Challenge: Champion
Task 1:
Navigate to Vertex AI > Workbench
Click OPEN JUPYTERLAB next to the cloudlearningservices notebook
Click the Terminal icon
Run this command to download a version of the notebook with the solution:
gsutil cp gs://spls/solutions/DRL3.ipynb .
Task 2:
Run all cells in the DRL3.ipynb file
Task 3:
Navigate to Vertex AI > Model Registry
Click Import
Name the model drl-lap-time-predictor
Choose the dynamically selected region variable displayed in Task 3 for the region
Click Model Settings
Choose 2.10 for the Model Framework Version
Navigate and select the following path for the Model Artifact Location:
gs://[project-id]-bucket/model
Click Import
Task 4:
Navigate to Vertex AI > Endpoints
Click Create Endpoint
Name the endpoint drl-lt-endpoint
Choose the dynamically generated region for the region
Ensure the traffic split is set to 100%
Click on advanced scaling settings
Choose e2-standard-2 for machine type
Click Create
Task 5:
Get the Lap Time Predictor Webapp Url from the lab manual and paste it in another tab.
Click the Simulate button at the bottom of the page.
Task 6:
Switch to Cloud Shell tab:
gsutil cp gs://spls/gsp397/webapp.zip .
unzip webapp.zip
cd app
Task 7:
Open main.py in a text editor
Find the predict_custom_trained_model_sample() function
Change the value of the project argument to the unique project number
Change the value of the endpoint id argument to the unique endpoint ID
Change the value of the location argument to the dynamically selected region
Change the value of the api_endpoint argument to the region + "-aiplatform.googleapis.com"
These values can be found in the Sample Request of created endpoint from Task 4
Task 8:
In cloud shell:
gcloud auth configure-docker us-docker.pkg.dev
docker build . -t us-docker.pkg.dev/$DEVSHELL_PROJECT_ID/drl-lap-time-predictor/webapp:0.2
gcloud artifacts repositories create drl-lap-time-predictor --repository-format=docker --location=us
docker push us-docker.pkg.dev/$DEVSHELL_PROJECT_ID/drl-lap-time-predictor/webapp:0.2
Task 9:
Back in cloud console
Navigate to Cloud Run
Click on the drl-race-predictor service
Click Edit and Deploy New Revision
Select the us-docker.pkg.dev/$DEVSHELL_PROJECT_ID/drl-lap-time-predictor/webapp:0.2 container
Click Deploy
Task 10:
Return to the Lap Time Predictor Webapp
Click the Simulate Button