software:juypter:caviness

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
software:juypter:caviness [2026-03-27 14:52] – Add Starting Jupyter Session section to Caviness Jupyter Notebook page mbottosoftware:juypter:caviness [2026-03-27 15:33] (current) – Add output from ls command on workgroup VALET directory mbotto
Line 4: Line 4:
 </note> </note>
  
-The following steps will walk you through setting up a Conda virtual environment with Python 3 and Jupyter Notebook. It will also cover the steps of requesting a compute node to run a Jupyter Notebook session on Caviness. Lastly, it will explain how to set up SSH connections to be able to connect to the Jupyter Notebook session running on a compute node.+The following steps will walk you through setting up a Conda virtual environment with Python 3 and Jupyter Notebook. It will also cover the steps of requesting a compute node to run a Jupyter Notebook session on Caviness. Lastly, it will explain how to set up SSH connections to be able to connect to the Jupyter Notebook session from the browser on your local machine.
  
-Before starting, make sure you set your workgroup. This example will demonstrate how to create a shared directory in your workgroup storage where you can create Conda environments that are accessible to everyone in your workgroup.+Before starting, make sure you [[abstract:caviness:app_dev:compute_env#setting-workgroup|set your workgroup]] on Caviness. This example will demonstrate how to create a shared directory in your workgroup storage where you can create Conda environments that are accessible to everyone in your workgroup.
  
 <note warning> <note warning>
Line 73: Line 73:
 # To activate this environment, use # To activate this environment, use
 # #
-#     $ conda activate /work/it_css/sw/miniforge-testing/jupyter-notebook/20260326+#     $ conda activate /work/my_workgroup/sw/conda-envs/jupyter-notebook/20260326
 # #
 # To deactivate an active environment, use # To deactivate an active environment, use
Line 86: Line 86:
 <code bash> <code bash>
 [(my_workgroup:user)@login00.caviness ~]$ ls -d ${WORKDIR_SW}/valet [(my_workgroup:user)@login00.caviness ~]$ ls -d ${WORKDIR_SW}/valet
 +/work/my_workgroup/sw/valet
 [(my_workgroup:user)@login00.caviness ~]$ echo ${WORKDIR_SW}/conda-envs/jupyter-notebook [(my_workgroup:user)@login00.caviness ~]$ echo ${WORKDIR_SW}/conda-envs/jupyter-notebook
 /work/my_workgroup/sw/conda-envs/jupyter-notebook /work/my_workgroup/sw/conda-envs/jupyter-notebook
Line 203: Line 204:
 http://r05n17:8888/tree?token=0f2f120dc34903954fb4b62dcb92e2b0c5950b670c0559ef http://r05n17:8888/tree?token=0f2f120dc34903954fb4b62dcb92e2b0c5950b670c0559ef
 </code> </code>
-Before continuing, **make a note of the corresponding URL from your output**, since you will need it for a later step (the token and most likely the node will be different for you).+Before continuing, **make a note of the corresponding URL from your output**, since you will need it for a later step (the token and most likely the compute node name will be different for you).
 </note> </note>
  
 ====Setting up SSH tunnel to connect to Jupyter Notebook server==== ====Setting up SSH tunnel to connect to Jupyter Notebook server====
  
-TODO+With the Jupyter Notebook server running on a compute node on Caviness, an SSH tunnel is needed to be able to make a connection and access the Jupyter Notebook server from a web browser on your local machine. This is done by opening a **second** SSH connection to Caviness. Follow the appropriate section below for a Linux/Mac or Windows laptop. 
 + 
 +<note warning> 
 +Your compute node name will likely be different than ''r05n17'', so please make sure to change that accordingly. This SSH tunnel connection will have to remain open while you are using Jupyter Notebook. If it is closed or internet connectivity is lost, then your connection to Jupyter Notebook will also be lost. 
 +</note> 
 + 
 +==Linux/Mac== 
 +Open a new terminal session on your local machine. Set up an SSH tunnel using the below ''ssh'' command.  
 +<code> 
 +$ ssh -L 8888:r05n17:8888 user@caviness.hpc.udel.edu 
 +</code> 
 + 
 +==Windows (Command Prompt or PowerShell)== 
 +Open a new Command Prompt or PowerShell session on your local machine. Set up an SSH tunnel using the below ''ssh'' command.  
 +<code> 
 +> ssh -L 8888:r05n17:8888 user@caviness.hpc.udel.edu 
 +</code> 
 + 
 +==Windows (WSL)== 
 +Open a Linux terminal via WSL on your local machine. Set up an SSH tunnel using the below ''ssh'' command.  
 +<code> 
 +$ ssh -L 8888:r05n17:8888 user@caviness.hpc.udel.edu 
 +</code>
  
 ====Using your local browser to access Jupyter Notebook server==== ====Using your local browser to access Jupyter Notebook server====
  
-TODO+If everything so far has been set up correctly, the final step is as easy as opening a web browser of choice on your local machine and entering the correct URL. You should now use the URL that you previously made a note of from the output of the ''jupyter notebook'' command that you ran on the compute node. Change the compute node name in the URL to ''localhost'' and copy the URL into your browser. For instance, if your URL was: 
 + 
 +<code> 
 +http://r05n17:8888/tree?token=0f2f120dc34903954fb4b62dcb92e2b0c5950b670c0559ef 
 +</code> 
 + 
 +then in your browser, you would copy: 
 + 
 +<code> 
 +http://localhost:8888/tree?token=0f2f120dc34903954fb4b62dcb92e2b0c5950b670c0559ef 
 +</code> 
 + 
 +You should now see Jupyter running on your browser. 
 + 
 +Note that since this example ran the ''jupyter notebook'' command on the compute node from the home directory ''~'', when you open Jupyter on your browser you will see files in your home directory on Caviness. If you want to start from a different directory -- for example, a directory where you already have a Jupyter Notebook ''.ipynb'' file that you want to open -- make sure to navigate to that directory on Caviness before starting up the Jupyter Notebook server. 
 + 
 +<note important> 
 +If you are not able to connect to the Jupyter Notebook session at this point, then you will need to review the prior steps and make sure that you have added and configured the SSH tunnel properly based on your compute node. Remember, the SSH tunnel connection will have to remain open the entire time while you are using Jupyter Notebook. 
 +</note>
  • software/juypter/caviness.1774637562.txt.gz
  • Last modified: 2026-03-27 14:52
  • by mbotto