Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| software:juypter:caviness [2026-03-26 16:55] – Add TODO sections mbotto | software:juypter:caviness [2026-03-27 15:33] (current) – Add output from ls command on workgroup VALET directory mbotto | ||
|---|---|---|---|
| Line 4: | Line 4: | ||
| </ | </ | ||
| - | 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 | + | 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 |
| - | 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: |
| <note warning> | <note warning> | ||
| Line 73: | Line 73: | ||
| # To activate this environment, | # To activate this environment, | ||
| # | # | ||
| - | # $ conda activate /work/it_css/sw/miniforge-testing/ | + | # $ conda activate /work/my_workgroup/sw/conda-envs/ |
| # | # | ||
| # To deactivate an active environment, | # To deactivate an active environment, | ||
| Line 86: | Line 86: | ||
| <code bash> | <code bash> | ||
| [(my_workgroup: | [(my_workgroup: | ||
| + | / | ||
| [(my_workgroup: | [(my_workgroup: | ||
| / | / | ||
| Line 158: | Line 159: | ||
| <code bash> | <code bash> | ||
| - | [(my_workgroup: | + | [(my_workgroup: |
| Adding dependency `miniforge/ | Adding dependency `miniforge/ | ||
| Adding package `jupyter-notebook/ | Adding package `jupyter-notebook/ | ||
| - | (/ | + | (/ |
| </ | </ | ||
| ====Starting a Jupyter Notebook session==== | ====Starting a Jupyter Notebook session==== | ||
| - | TODO | + | When starting the Jupyter Notebook session, specific options are passed which are used to set up the tunnel connection. You should see output similar to the following output: |
| + | |||
| + | <code bash> | ||
| + | (/ | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [I 2026-03-27 14: | ||
| + | [C 2026-03-27 14: | ||
| + | |||
| + | To access the server, open this file in a browser: | ||
| + | file:/ | ||
| + | Or copy and paste one of these URLs: | ||
| + | http:// | ||
| + | http:// | ||
| + | [I 2026-03-27 14: | ||
| + | </ | ||
| + | |||
| + | <note warning> | ||
| + | At this point you will not be prompted for any further input, but the Jupyter Notebook server is running. Note the following URL in the output above: | ||
| + | <code bash> | ||
| + | http:// | ||
| + | </ | ||
| + | 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). | ||
| + | </ | ||
| ====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 '' | ||
| + | </ | ||
| + | |||
| + | ==Linux/ | ||
| + | Open a new terminal session on your local machine. Set up an SSH tunnel using the below '' | ||
| + | < | ||
| + | $ ssh -L 8888: | ||
| + | </ | ||
| + | |||
| + | ==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 -L 8888: | ||
| + | </ | ||
| + | |||
| + | ==Windows (WSL)== | ||
| + | Open a Linux terminal via WSL on your local machine. Set up an SSH tunnel using the below '' | ||
| + | < | ||
| + | $ ssh -L 8888: | ||
| + | </ | ||
| ====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 '' |
| + | |||
| + | < | ||
| + | http:// | ||
| + | </ | ||
| + | |||
| + | then in your browser, you would copy: | ||
| + | |||
| + | < | ||
| + | http:// | ||
| + | </ | ||
| + | |||
| + | You should now see Jupyter running on your browser. | ||
| + | |||
| + | Note that since this example ran the '' | ||
| + | |||
| + | <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. | ||
| + | </ | ||