Shutdown Slurm Job Through JupyterLab

I have a working JupyterHub that’s integrated with Slurm, and I’m trying to replicate what is shown in this link where they can shutdown the interactive Slurm session by selecting " FileShut Down from the menu in the top left-hand side of a JupyterLab session". I have a screenshot attached just for reference:

Right now, my JupyterLab session doesn’t show that as an option:

How would I customize the JupyterLab sessions for all users so that this option shows up? Thanks!

There are different ways of integrating JupyterLab with SLURM. Your first link uses Open OnDemand, not JupyterHub.

When you launch JupyterLab via JupyterHub you’ll see the modified menu in your second screenshot. If you go to the Hub Control Panel (/hub/home) you should see a button to stop your server.

You can optionally configure JupyterHub to shutdown the singleuser server when a user logs out:

which means the Log Out menu item would be equivalent to Shut Down unless they had multiple singleuser servers in which case all would be shut down, instead of just one.

Being able to shut down a single server from the menu sounds like a nice enhancement, though it does make the UI slightly more complicated (novice users may not understand the difference between shutdown and logout).

2 Likes