...
You have the possibility of creating a preset with predefined start options for yourself or your project group.
Note: The preset functionality is currently only available on Noctua 2.
...
Click here to list your presets: https://jh.pc2.uni-paderborn.de/services/presets/
...
Default and self-created apptainer containers can be used.
Advanced (Slurm)
...
An advanced view with setting options how a Slurm job should be startet started on a HPC cluster.
Loading additional Jupyter kernels
...
When you click on the tile ‘Xpra Desktop’, a remote desktop environment is set up in the background. Graphical applications (e.g. loaded via modules) can be started from the started graphical terminal.
How-To
Creating presets
Note: The preset functionality is currently only available on Noctua 2.
To save time when configuring your Jupyter environenment you have the possibilty to create preset environments for yourself or your compute time group(s).
Created presets can be selected when starting a new Jupyter instance:
...
Create presets here: https://jh.pc2.uni-paderborn.de/services/presets/ (or JupyterHub home → services → presets)
...
Spawner
Local spawner (on JupyterHub)
Spawning the Jupyter notebook environment on the JupyterHub host. Slurm job flags not needed.
Slurm tools, Modules, Remote desktop environment are available.
Noctua 2 (via Slurm)
Spawning the Jupyter environment inside a Slurm job (on a compute/gpu/fpga node) on Noctua 2. Note: You need to specifiy Slurm job flags.
Preset scopes
Select who can use your preset. You or one of your compute time projects.
Default URL
The URL to which JupyterHub redirects when the server is started.
Example:
/lab
-> Spawning JupyterLab environment
/xprahtml5
-> Spawning Remote desktop environment
Notebook directory
The working directory. Used for JupyterLab, the remote desktop environment and the classic Jupyter view.
Apptainer container
Your self-built Apptainer/Singularity container. Have a look here for creating your own container: https://upb-pc2.atlassian.net/wiki/spaces/PC2DOK/pages/1903131/JupyterHub#Create-my-own-Apptainer%2FSingularity-container
Environment variables
Extra environment variables.
Format:
Code Block |
---|
MY_ENV_VAR=”Hello World”
FOO=BAR |
Modules
Extra Lmod modules to load on start time. All system modules and Jupyter specific kernels are available.
Slurm job flags
Slurm job flags in Slurm batch format. Example:
Code Block |
---|
#SBATCH --partition=normal
#SBATCH --time=01:00:00 |
Create custom IPython kernel inside custom conda environment
Create a conda environment as described here:
conda activate <your_conda_env>
conda install ipykernel
Or:
python3 -m pip install ipykernel
ipykernel install --user --name <KERNELNAME> --display-name "<DISPLAY NAME>"
...
Example Apptainer/Singularity recipe
Build containers: Apptainer
Base recipe
Code Block |
---|
Bootstrap: docker From: debian %post apt -y update export DEBIAN_FRONTEND=noninteractive apt -y install zsh locales localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 python3 -m pip install jupyterhub |
...
Code Block |
---|
mkdir /opt/python3.12 cd /opt/python3.12 apt -y install build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libffi-dev liblzma-dev python3-openssl git wget https://www.python.org/ftp/python/3.12.0/Python-3.12.0.tgz tar -xf Python-3.12.0.tgz rm Python-3.12.0.tgz cd Python-3.12.0/ ./configure --enable-optimizations make -j 8 make altinstall python3.12 --version python3.12 -m pip install --upgrade pip python3.12 -m pip install ipykernel # finally installing ipython kernel python3.12 -m ipykernel install --sys-prefix --name <UNIQUE_KERNEL_NAME> --display-name "<KERNEL DISPLAY NAME>" |
Install Lmod with the JupyterLab-Lmod extension
Code Block |
---|
apt -y install lua5.3 lua-posix
mkdir -p /usr/lib64/lua/5.3
cp /usr/lib/x86_64-linux-gnu/liblua5.3-posix.so.1 /lib64/lua/5.3/
mv /lib64/lua/5.3/liblua5.3-posix.so.1 /lib64/lua/5.3/posix.so |
Make Slurm Tools inside my container available
Code Block |
---|
groupadd --gid 351 munge
groupadd --gid 567 slurm
useradd -d /var/run/munge -M --gid 351 --uid 994 --shell /sbin/nologin munge
useradd -d /opt/software/slurm -M --gid 567 --uid 567 --shell /bin/false slurm |
Container Location
Info |
---|
All containers with type .sif will be automatically detected in |
...
Code Block |
---|
ln -s /scratch/hpc-prf-project/jupyter_container.sif $HOME/.jupyter/pc2-jupyterhub/ |
Access remote JupyterHub server with the local Visual Studio Code instance
You need following extensions for Visual Studio Code:
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter
https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter-hub
Create an acccess token in the JupyterHub web interface:
...
Follow following instructions described here: https://marketplace.visualstudio.com/items?itemName=ms-toolsai.jupyter-hub
You need to start a Jupyter session using our JupyterHub web interface. After successful start, you can copy the URL starting with
https://jh.pc2.uni-paderborn.de/user/.../...
View Slurm job logs
If the path of the Slurm Job output has not been changed explicity, it can be found here by default:
Noctua 1: $HOME/.jupyter/last_jh_noctua1.log
Noctua 2: $HOME/.jupyter/last_jh_noctua2.log
PC² Support
If you have any other problems that won’t be solved, please contact the pc2-support@uni-paderborn.de
Troubleshooting
JupyterLab
“A Jupyter server is running.” message
This message appears because user settings managed by JupyterLab do not match the new JupyterLab version.
Try deleting
~/.jupyter/
in your$HOME
directory as follows:rm -r ~/.jupyter/
If you want to keep your custom user settings, write an email to pc2-support@uni-paderborn.de