Launching a Jupyter Notebook in the CSE SunLab Environment
The following are instructions for accessing a Jupyter Notebook from a web browser via a connection to the CSE SunLab Environment. This allows for accessing your files stored in SunLab from a Jupyter Notebook interface.
As with all connections to SunLab, this requires that you are connected to a Lehigh network. If you are off campus or using the Lehigh Guest wireless network, before attempting any of the following steps, please establish a connection to Lehigh’s VPN via the documentation provided at the following link:
https://lts.lehigh.edu/services/vpn
Info
This process also requires that you are connected to SunLab, you can review the steps for doing-so in the following document:
Launching the Jupyter Notebook server
Once you are connected to SunLab, run the following command to start a Jupyter Notebook server on your SunLab host:
jupyter notebook --no-browser --ip=0.0.0.0
Note
The command line flags of --no-browser and --ip=0.0.0.0 are critical for this process to work.
Once the server launches, you will see quite a bit of output. Note the two areas with a web link that are highlighted below, both show the same URL:
Note
The link it displays needs to be modified to work properly, don't just copy and paste it into your browser as-is.
Important
Leave the server running in the terminal window until you are done using the Jupyter Notebook. Closing the window or terminating the Jupyter Notebook process via Ctrl-C will stop the Jupyter Notebook server.
Modify the URL and paste it into a browser
As shown in the following screenshot, our connection is via the SunLab host Ceres. The link shown by Jupyter Notebook is http://ceres:8888/?token={random_token_guid} which needs to be modified to be http://ceres.cse.lehigh.edu:8888/?token={random_token_guid} before pasting into the browser.
Copy the entire Jupyter Notebook token GUID string along with the URL.
Basically, add the .cse.lehigh.edu subdomain to the hostname to form a fully-qualified domain name when pasting the URL into the web browser.
Note
The hostname (shown here as ceres) will differ depending on which SunLab host you are connected to. Use the name that is associated with your current connection.
You will then see a Jupyter Notebook interface in the browser showing the contents of the folder from which it was launched.
Ctrl-C in the terminal window will stop the server.