BinAC/Software/Jupyterlab: Difference between revisions

From bwHPC Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 55: Line 55:
== Access Jupyterlab> ==
== Access Jupyterlab> ==


The information you need to access Jupyterlab is printed in the job's standard output file: Jupyterlab.<jobid>
The information you need to access Jupyterlab is printed in the job's standard output file.
This file is named <code>Jupyterlab.<jobid></code> and the following command will print the connection details:
Here is an example output. Please note that details like IP and port numbers will vary.
Please note that details like IP, port number, and access URL will vary.


<pre>
<pre>
cat JupyterLab.o${jobid}
cat JupyterLab.o${jobid}
</pre>


Attempt 1: Checked port 18617, port is free ...


[[File:Binac_jupyterlab_connection_details.png | 800px | center | Test caption]]
Paste this ssh command in a terminal on local host (i.e., laptop)
-----------------------------------------------------------------
ssh -N -L 18617:172.17.5.1:18617 $USER@login03.binac.uni-tuebingen.de


Open this address in a browser on local host; see token below.
-----------------------------------------------------------------
localhost:18617 (prepend with https:// if using a password)

[...]
</pre>


If you're using Linux, copy the ssh command and execute it on your local machine and authenticate yourself with second factor and password.
If you're using Linux, copy the ssh command and execute it on your local machine and authenticate yourself with second factor and password.

Revision as of 16:13, 25 July 2024

The main documentation is available via module help devel/jupyterlab on the cluster. Most software modules for applications provide working example batch scripts.


Description Content
module load devel/jupyterlab
License Jupyterlab License
Links Homepage
Graphical Interface Yes

Description

JupyterLab is a web-based interactive development environment for notebooks, code, and data.

Usage

Start Jupyterlab

The module provides a jobscript for starting a Jupyterlab instance on the BinAC interactive job queue. Load the module and copy the jobscript into your workspace:

module load devel/jupyterlab/7.2.1
cp $JUPYTERLAB_EXA_DIR/jupyterlab.pbs.template jupyterlab.pbs

You can adjust the following settings in the jobscript according to your needs.

#PBS -l nodes=1:ppn=1          # adjust the number of cpu cores (ppn)
#PBS -l mem=2gb
#PBS -l walltime=6:00:00

Please note the restrictions of the inter queue:

  • max. walltime: 12 hours
  • max. cores: 28
  • max jobs per user: 1

Then submit the job.

jobid=$(qsub jupyterlab.pbs)

Access Jupyterlab>

The information you need to access Jupyterlab is printed in the job's standard output file. This file is named Jupyterlab.<jobid> and the following command will print the connection details: Please note that details like IP, port number, and access URL will vary.

cat JupyterLab.o${jobid}


Test caption


If you're using Linux, copy the ssh command and execute it on your local machine and authenticate yourself with second factor and password. The ssh command creates an SSH tunnel through which you can access Jupyterlab in your browser. The ssh command does not return a result. If there is no error message everything should be fine.

The Jupyterlab output file also contains a direct link to your Jupyterlab:

cat JupyterLab.o11604591
[...]
Or copy and paste one of these URLs:
  [...]
  http://127.0.0.1:18617/lab?token=<your token>

Stop Jupyterlab

Add new Kernels

== Set