Getting Started with JupyterHub (JupyterLab)
What is JupyterHub?
JupyterHub is a web-based platform that provides faculty and students with secure, personal workspaces on our HPC cluster. After you sign in, JupyterHub launches a private JupyterLab session for your account, where you can write code, analyze data, and manage files through your browser.
Why use JupyterLab?
JupyterLab provides an interactive workspace for notebooks, terminals, and file management in one place. It is often easier than working only at the command line, especially for data analysis and visualization workflows.
Are JupyterLab and Jupyter Notebook the same?
Not exactly. JupyterLab is a full workspace that can run notebooks, terminals, and file editors in multiple tabs. The classic Jupyter Notebook interface is simpler and mainly focused on a single notebook view.
Accessing JupyterLab
- Open a web browser and go to: https://n1.hpc.at.sfsu.edu
- Sign in with your SF State login. If you are off campus, you will need to use VPN: VPN instructions.
- After signing in, you will be brought to the JupyterLab interface.
Important: Where should computation run?
JupyterLab is great for development and interactive work, but intensive computation should be submitted to the cluster through Slurm (especially GPU jobs, MPI jobs, or long-running workloads). For best performance and fair resource usage:
- Use notebooks for exploration, visualization, and testing small examples.
- Submit larger runs as Slurm jobs from a terminal or the Slurm Queue Manager.
Submitting Slurm Jobs from JupyterLab
- In JupyterLab, open a Terminal (Launcher → Terminal).
- Create a Slurm script in your home directory (example name shown below):
vi nvidia-smi_test.sh - Confirm the script appears in the file list in the left sidebar (your home directory).
- Open the Slurm Queue Manager (Launcher → Slurm Queue Manager). From here you can view running jobs, submit jobs, and review job notifications.
- In the Submit Jobs tab, choose your Slurm script from the current directory and select Submit Job.
- Check the Job Notifications tab to confirm the job was submitted successfully.
- When the job completes, the output file will appear in your home directory (left sidebar).
Tip: You can also submit jobs directly from the terminal using:
sbatch your_script.sh
Shutting Down Your Server and Logging Out
When you are finished using JupyterLab, please log out. If you do not need your Jupyter server anymore, we recommend stopping your server to free resources for other users.
If you submitted long-running Slurm jobs
If your computation is running as a Slurm job (submitted with sbatch), you may safely log out of JupyterLab. Logging out does not cancel Slurm jobs that are already running.
- In the top menu, select File → Logout.
If you are done and do not need your Jupyter server running
- In the top menu, select File → Hub Control Panel.
- Select Stop My Server.
- Select Logout.
Comments
0 comments
Article is closed for comments.