When not in use, or when you wish to cease usage, please shut down the server on JupyterHub
by going to FileFile > Hub Control Panel > Stop my serverto return resources to the system.


Load slurm-magic before using Slurm commands.
%load_ext slurm_magic
Submit a job using the %%sbatch command followed by the usual Job script.
%%sbatch
#!/bin/bash
#SBATCH --gpus=1 # total number of GPUs
#SBATCH -p gpu # specific partition (compute, memory, gpu)
#SBATCH -o mytest.%j.out # Name of stdout output file (%j expands to jobId)
#SBATCH --job-name=mytest # Job name
#SBATCH --time=10:00:00
source $HOME/.bashrc
conda activate test
python program.py
python --version
In the example Job script, Python code is run using a Conda environment.

When usage is halted by stopping the kernel or closing the browser, the Jupyter process continues to run, which consumes resources on the login node for reserving resources for JupyterHub usage. Therefore, the operation should be stopped by shutting down the server system using the following method:
File menu, then choose Hub Control Panel.
Stop My Server to stop the process.
Start My Server.