...
Select from the following quick options for time limit and memory allocation:
...
...
If login fails, please email hpc@uconn.edu to have an administrator recreate your user certificate.
JupyterHub through Interactive Session
In the terminal on the cluster, use srun
to request resources through SLURM for an interactive session. Here we ask for 1 node, 5 cores, 5G of memory, in the general partition, nodes with cpu only and 2 hours of runtime:
Code Block |
---|
srun -N 1 -n 5 --mem=5G -p general --constraint=cpuonly --time=00:02:00:00 --pty bash |
Code Block |
---|
srun: job 6186040 queued and waiting for resources
srun: job 6186040 has been allocated resources
Agent pid 513661
Your current list of jobs:
JobID Partition QOS JobName User Submit Elapsed State NNodes NCPUS NodeList Start
------------ ---------- ---------- ---------- --------- ------------------- ---------- ---------- -------- ---------- --------------- -------------------
6186040 general general bash jht12345 2024-11-12T13:18:28 00:00:06 RUNNING 1 5 cn457 2024-11-12T13:18:29
|
Next, load the “jupyterhub” module, you can check available modules using the command module avail
and load them with module load
Code Block |
---|
module avail jupyterhub
------------------------------------------- /cm/shared/modulefiles -------------------------------------------
jupyterhub/live jupyterhub/test4 |
Code Block |
---|
module load jupyterhub/live
Loading jupyterhub/live
Loading requirement: pre-module post-module gcc/13.2.0 |
Note |
---|
If you run in any module conflicts, use |
Navigate to your desired working directory and launch jupyter
Code Block |
---|
jupyter-lab --no-browser --ip='*' --port=8890 |
You will be greeted with a very large output. The main thing to look for is the connection is successful and that a server is running on the port chosen. At the bottom of the ouput, you will have links to access your jupyter page but one more step is needed to allow it to load.
Note |
---|
If you run into an error or the output is blank after attempting to launch jupyter-lab, it is likely that the port you selected is occupied. In this case, try a higher port number such as 8891, 8892 or more. Generally, ports between 8888 to 9000 work well. |
Set up SSH Port Forwarding
In a separate terminal window to access the jupyter server from your local machine. Use the following command with the correct hostname and selected port filled in.
Code Block |
---|
ssh -L <port>:<nodename>:<port> <your_netid>@hpc2.storrs.hpc.uconn.edu |
From our example above, we landed on cn457
and we chose 8890
as our port:
Code Block |
---|
ssh -L 8890:cn457:8890 jht123456@hpc2.storrs.hpc.uconn.edu |
Now to finally access the server, you can either of the 2 links provided in the output of your original terminal.
...
Custom Conda Environments in Jupyter
...