Script can be used to automatically setup a jupyter server on an (HPC) cluster using SLURM. The script assumes that the server shall be executed on a compute node, which can only be accessed via the login node.
The script performs the following actions:
- Login to login node
- Check if conda environment $ENV_NAME already exists. If it does it will be used (so make sure that jupyterlab is installed!), otherwise it will create a new environment and install jupyterlab. On my system
condawas only available if loaded viamodule load python3. This will be different on other systems and needs to be adjusted accordingly. - A SLURM job script (start_jupyter_server.sh) will be created within the home directory, which can be submitted via SLURM to start jupyter lab. If the file already exists, this step will be skipped. You can also use this script directly to submit the job yourself. The script is taken from here.
- The job script is submit