[Windows] How to run JupyterLab on SDIL?
When the SDIL is on high demand, you may not get resource allocated and cannot enter JupyterLab to edit your notebook. Unix users can directly use portforwarding. It's a bit trickier for Windows users.
- Install Jupyterlab on your computer, using
conda install -c conda-forge jupyterlab
- Install OpenSSH for Windows by following the instructions here
- Open the PowerShell (if possible, as an Administrator) and connect to SDIL with the command
ssh <username>@uc2.scc.kit.edu
. You will be prompted to key in OTP and password. - Request resource with the
salloc
command, e.g. for 1 GPU, 10 CPUS, 80 GB RAM for 8 hours on SDIL with LSDF mounted
salloc --partition=sdil --time=08:00:00 --gres=gpu:1 --mem=80gb --cpus-per-task=10 -C LSDF
- After the resource is allocated, specify a jupyter module, e.g.
module load jupyter/tensorflow/2021-09-30
You need to activate a module to be able to use jupyter command. The module can be unloaded or changed after you open Jupyter Lab. - Start Jupyter Lab on SDIL without a browser and tell the notebook server to listen on all network interfaces
jupyter lab --no-browser --ip "*"
Then you will see the following output - Open another PowerShell and log-in with the command
ssh -L 8888:<remote_node>:<remote_port> <username>@uc2.scc.kit.edu
For example:ssh -L 8888:uc2n2561.localdomain:8888 <username>@uc2.scc.kit.edu
. You will be prompted to enter an OTP and your password again (just like usual). - Open your prefer browser and paste the URL given by the first PowerShell (see the image in 7.) into the address, e.g.
http://127.0.0.1:8888/lab?token=923022c40705cc71d342ce536b74a16056e754b863370f6f
It will take sometime to load. Just keep refreshing the browser.