Skip to content

Commit

Permalink
Merge pull request #1 from pangeo-data/update_spider_doc
Browse files Browse the repository at this point in the history
updating spider dask doc
  • Loading branch information
tinaok authored Jun 28, 2024
2 parents 4f21d6f + c9c5961 commit 9004e81
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 17 deletions.
26 changes: 13 additions & 13 deletions docs/pangeo/dask_spider.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2781,20 +2781,20 @@
"id": "c27e06ec-f40a-4ed4-b0b0-61db5232e115",
"metadata": {},
"source": [
"## Scaling your Computation using Dask Gateway.\n",
"## Scaling your Computation using Dask jobqueue.\n",
"\n",
"For this workshop, according to the Pangeo EOSC deployment, you will learn how to use Dask Gateway to manage Dask clusters over Kubernetes, allowing to run our data analysis in parallel e.g. distribute tasks across several workers.\n",
"For this workshop, according to the Pangeo EOSC deployment, you learned how to use Dask Gateway to manage Dask clusters over Kubernetes, allowing to run our data analysis in parallel e.g. distribute tasks across several workers.\n",
"\n",
"Lets set up your Dask cluster through Dask Gateway. \n",
"As Dask Gateway is configured by default on this ifnrastructure, you just need to execute the following cells."
"Lets now try set up your Dask cluster using HPC infrastructure with Dask jobqueue. \n",
"As Dask jobqueue is configured by default on this ifnrastructure thanks to <a href=\"JupyterDaskOnSLURM \">https://github.com/RS-DAT/JupyterDaskOnSLURM/blob/main/user-guide.md#container-wrapper-for-spider-system</a> we just installed in the last section, you just need copy the SLURMCluster configuration cell below and execute it to connect the Dask jobqueue SLURMCluster. "
]
},
{
"cell_type": "markdown",
"id": "830b67ad-3a82-4dd7-8ab6-3015d12c3240",
"metadata": {},
"source": [
"make sure you use the right port (taken from the left panel)"
"Make sure you use the right port (taken from the left panel), and click scale, to have several workers. "
]
},
{
Expand Down Expand Up @@ -13276,6 +13276,14 @@
"client.close()"
]
},
{
"cell_type": "markdown",
"id": "0684b03e-bfbb-435b-8c4b-aba54da5f1b0",
"metadata": {},
"source": [
"You can also shutdown the cluster by clicking 'ShutDown' in the dask-lab extension's SLURMCluster configuration panel. "
]
},
{
"cell_type": "markdown",
"id": "56304d1c",
Expand Down Expand Up @@ -13308,14 +13316,6 @@
"source": [
"!squeue -u $USER"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "74293ba9-d50b-4e48-8c80-131351c7c389",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
Expand Down
Binary file added docs/pangeo/sbatch_out.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 10 additions & 4 deletions docs/pangeo/start_dask_spider.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,12 +43,14 @@ We prepared the dask configuration file for spider that you need to copy:
```
cd $HOME
mkdir -p ~/.config/dask
cp /project/geocourse/Software/pangeo/JupyterDaskOnSLURM/config/dask/config_spider.yml ~/.config/dask/config.yml
cp /project/geocourse/Software/pangeo/config_dask_geohack.yml ~/.config/dask/config.yml
```

Then copy the batch job we prepared to submit on spider and start jupyterLab:

```
mkdir -p ~/scripts
cp /project/geocourse/Software/pangeo/JupyterDaskOnSLURM/scripts/jupyter_dask_spider_container.bsh $HOME/scripts/.
```

Expand All @@ -57,7 +59,7 @@ cp /project/geocourse/Software/pangeo/JupyterDaskOnSLURM/scripts/jupyter_dask_sp
Whenever you want to start a JupyterLab, you would need to submit `jupyter_dask_spider_container.bsh`:

```
sbatch jupyter_dask_spider_container.bsh
sbatch scripts/jupyter_dask_spider_container.bsh
```

### Open jupyterLab from your local computer
Expand All @@ -68,7 +70,11 @@ Open another terminal on your computer and from your local terminal. The job you
squeue -u $USER
```

Then check the slurm output, where you should have something like:
Then check the slurm output,

![SBatch Output](sbatch_out.png)

You should have something like:

```
ssh -i /path/to/private/ssh/key -N -L 8889:wn-ca-03:9300 [email protected]
Expand All @@ -77,7 +83,7 @@ ssh -i /path/to/private/ssh/key -N -L 8889:wn-ca-03:9300 geocourse-teacher09@spi
Copy/paste the command given in your slurm output but update the path to the ssh key you are using to login to spider (e.g. `/home/annef/.ssh/id_rsa`).

- If you copy the command above, make sure to change the username `geocourse-teacher09` to your username on spider.
- Open your browser and paste `http://localhost:8889/` tor get your JupyterLab session.
- Open your browser and paste `http://localhost:8889/` to get your JupyterLab session.

### Shutting down

Expand Down

0 comments on commit 9004e81

Please sign in to comment.