File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5151 "source": [
5252 "%%capture\n",
5353 "if 'google.colab' in str(get_ipython()):\n",
54- " !pip install rioxarray"
54+ " !pip install rioxarray dask[distributed] "
5555 ]
5656 },
5757 {
9393 " os.mkdir(output_folder)"
9494 ]
9595 },
96- {
97- "cell_type": "markdown",
98- "metadata": {
99- "id": "sEl0ZACGjPZ-"
100- },
101- "source": [
102- "Setup a local Dask cluster. This distributes the computation across multiple workers on your computer."
103- ]
104- },
105- {
106- "cell_type": "code",
107- "execution_count": null,
108- "metadata": {
109- "id": "UKJse9ObjPZ-"
110- },
111- "outputs": [],
112- "source": [
113- "from dask.distributed import Client, progress\n",
114- "client = Client() # set up local cluster on the machine\n",
115- "client"
116- ]
117- },
118- {
119- "cell_type": "markdown",
120- "metadata": {
121- "id": "WG-SY6YEjPZ-"
122- },
123- "source": [
124- "If you are running this notebook in Colab, you will need to create and use a proxy URL to see the dashboard running on the local server."
125- ]
126- },
127- {
128- "cell_type": "code",
129- "execution_count": null,
130- "metadata": {
131- "id": "EdUeUb6NjPZ-"
132- },
133- "outputs": [],
134- "source": [
135- "if 'google.colab' in str(get_ipython()):\n",
136- " from google.colab import output\n",
137- " port_to_expose = 8787 # This is the default port for Dask dashboard\n",
138- " print(output.eval_js(f'google.colab.kernel.proxyPort({port_to_expose})'))\n"
139- ]
140- },
14196 {
14297 "cell_type": "code",
14398 "execution_count": null,
14601415 {
14611416 "cell_type": "markdown",
14621417 "metadata": {
1463- "id": "Q8ncpyiUI74w "
1418+ "id": "zgiWrCxkJkdz "
14641419 },
14651420 "source": [
14661421 "----\n",
You can’t perform that action at this time.
0 commit comments