Yes. Jupyter Lab can be launched on a compute node and interfaced with through your local browser. We’ll need to install it and we’ll use a condo environment to do so.
- Open a terminal (or command prompt) and login to the cluster
ssh USERNAME@arcc2.uc.edu
- Using conda, create the environment (jup-lab can be renamed at your choosing, but review the future commands for consistency) and install the package
conda create --name jup-lab
conda activate jup-lab
conda install -c conda-forge jupyterlab
- Allocate the resources needed for your job. This is an example for reserving 2 cores with 4GB/per core for 2 days.
salloc -N 1 -n 2 --mem-per-cpu=4G -p public -t 2-00:00:00
Note: The result will contain the job number and the hostname of the compute node once allocated.
salloc: Granted job allocation JOBNUMBER
salloc: Nodes compute-NUMBER are ready for job
- Login to the compute node that was just allocated. If you cleared the output of the last command or want to recheck the hostname of the node type:
echo $SLURM_JOB_NODELIST
ssh compute-NUMBER
- Activate the condo environment you created and launch Jupyter Lab.
conda activate jup-lab
jupyter lab --no-browser --ip=0.0.0.0 --port=9999
- Open a new terminal on your local computer. With the next command we’ll create a SSH tunnel to carry the network traffic from the compute node to your local machine through the cluster’s login node.
ssh -N -L localhost:8888:compute-NUMBER:9999 USERNAME@arcc2.uc.edu
- Open an internet browser on your local machine and enter the appropriate address.
http://localhost:8888
Note: The port numbers do not have to exactly match these, but they need to be consistent among the corresponding commands. If another application has port 8888 reserved on your system, but sure to change it in the ssh command and your browser’s address. 8. Your job will terminate when the time you allocated is exhausted. If you’re finished your session before time is up and want to release the resources to avoid charges, you can revoke the allocation through your terminal on arcc2. If you need to recall the job number, you can type: echo $SLURM_JOB_ID
scancel JOBNUMBER