Skip to content

Commit 29dc92a

Browse files
committed
iter
1 parent 97bb974 commit 29dc92a

File tree

1 file changed

+97
-0
lines changed

1 file changed

+97
-0
lines changed

people-and-planet-ai/wildfires-forecasting/notebooks/1-overview.ipynb

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,103 @@
115115
"%cd python-docs-samples/people-and-planet-ai/weather-forecasting"
116116
]
117117
},
118+
{
119+
"cell_type": "markdown",
120+
"id": "4e0a851e-4829-4dfd-b006-4ec1201f8029",
121+
"metadata": {
122+
"id": "RfaQ4Os7QBNn"
123+
},
124+
"source": [
125+
"# ☁️ My Google Cloud resources\n",
126+
"\n",
127+
"First, choose the Google Cloud _location_ where you want to run this sample.\n",
128+
"A good place to start is by choosing your [Google Cloud location](https://cloud.google.com/compute/docs/regions-zones).\n",
129+
"\n",
130+
"> ⚠️ Make sure you choose a location\n",
131+
"> available for all products: [Cloud Storage](https://cloud.google.com/storage/docs/locations),\n",
132+
"> [Vertex AI](https://cloud.google.com/vertex-ai/docs/general/locations),\n",
133+
"> [Dataflow](https://cloud.google.com/dataflow/docs/resources/locations), and\n",
134+
"> [Cloud Run](https://cloud.google.com/run/docs/locations).\n",
135+
"\n",
136+
"> 💡 Prefer locations that are geographically closer to you with\n",
137+
"> [low carbon emissions](https://cloud.google.com/sustainability/region-carbon), highlighted with the\n",
138+
"> ![Leaf](https://cloud.google.com/sustainability/region-carbon/gleaf.svg) icon.\n",
139+
"\n",
140+
"Make sure you have followed these steps to configure your Google Cloud project:\n",
141+
"\n",
142+
"1. Enable the APIs: _Dataflow, Earth Engine, Vertex AI, and Cloud Run_\n",
143+
"\n",
144+
" <button>\n",
145+
"\n",
146+
" [Click here to enable the APIs](https://console.cloud.google.com/flows/enableapi?apiid=dataflow.googleapis.com,earthengine.googleapis.com,aiplatform.googleapis.com,run.googleapis.com)\n",
147+
" </button>\n",
148+
"\n",
149+
"1. Create a Cloud Storage bucket in your desired _location_.\n",
150+
"\n",
151+
" <button>\n",
152+
"\n",
153+
" [Click here to create a new Cloud Storage bucket](https://console.cloud.google.com/storage/create-bucket)\n",
154+
" </button>\n",
155+
"\n",
156+
"1. Register your\n",
157+
" [Compute Engine default service account](https://console.cloud.google.com/iam-admin/iam)\n",
158+
" on Earth Engine.\n",
159+
"\n",
160+
" <button>\n",
161+
"\n",
162+
" [Click here to register your service account on Earth Engine](https://signup.earthengine.google.com/#!/service_accounts)\n",
163+
" </button>\n",
164+
"\n",
165+
"Once you have everything ready, you can go ahead and fill in your Google Cloud resources in the following code cell.\n",
166+
"Make sure you run it!"
167+
]
168+
},
169+
{
170+
"cell_type": "code",
171+
"execution_count": 2,
172+
"id": "0e776c9a-64c2-4bba-b17a-dbe9a4814224",
173+
"metadata": {
174+
"cellView": "form",
175+
"colab": {
176+
"base_uri": "https://localhost:8080/"
177+
},
178+
"id": "fVz5zhvZ1mM3",
179+
"outputId": "bb0a58de-ffcf-4290-a945-843203dd977f"
180+
},
181+
"outputs": [
182+
{
183+
"ename": "ModuleNotFoundError",
184+
"evalue": "No module named 'google.colab'",
185+
"output_type": "error",
186+
"traceback": [
187+
"\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
188+
"\u001b[0;31mModuleNotFoundError\u001b[0m Traceback (most recent call last)",
189+
"\u001b[0;32m/var/tmp/ipykernel_29578/3903510569.py\u001b[0m in \u001b[0;36m<module>\u001b[0;34m\u001b[0m\n\u001b[1;32m 1\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mos\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0;32m----> 2\u001b[0;31m \u001b[0;32mfrom\u001b[0m \u001b[0mgoogle\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mcolab\u001b[0m \u001b[0;32mimport\u001b[0m \u001b[0mauth\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[0m\u001b[1;32m 3\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 4\u001b[0m \u001b[0mauth\u001b[0m\u001b[0;34m.\u001b[0m\u001b[0mauthenticate_user\u001b[0m\u001b[0;34m(\u001b[0m\u001b[0;34m)\u001b[0m\u001b[0;34m\u001b[0m\u001b[0;34m\u001b[0m\u001b[0m\n\u001b[1;32m 5\u001b[0m \u001b[0;34m\u001b[0m\u001b[0m\n",
190+
"\u001b[0;31mModuleNotFoundError\u001b[0m: No module named 'google.colab'"
191+
]
192+
}
193+
],
194+
"source": [
195+
"from __future__ import annotations\n",
196+
"\n",
197+
"import os\n",
198+
"from google.colab import auth\n",
199+
"\n",
200+
"auth.authenticate_user()\n",
201+
"\n",
202+
"# Please fill in these values.\n",
203+
"project = \"video-erschmid\" #@param {type:\"string\"}\n",
204+
"\n",
205+
"# Load values from environment variables if available.\n",
206+
"project = os.environ.get(\"GOOGLE_CLOUD_PROJECT\", project)\n",
207+
"\n",
208+
"# Quick input validations.\n",
209+
"assert project, \"⚠️ Please provide a Google Cloud project ID\"\n",
210+
"\n",
211+
"# Configure gcloud.\n",
212+
"!gcloud config set project {project}"
213+
]
214+
},
118215
{
119216
"cell_type": "markdown",
120217
"id": "fUX87ic-uNNI",

0 commit comments

Comments
 (0)