Jupyter Notebooks: Difference between revisions

From Stat DS Computing Wiki
Jacobg2 (talk | contribs)
No edit summary
Jacobg2 (talk | contribs)
No edit summary
Line 5: Line 5:
* https://ood.stat.cmu.edu/
* https://ood.stat.cmu.edu/


2 - Click the '''Interactive Apps''' drop down menu and then select '''Jupyter Notebooks.'''
2 - Click the '''Interactive Apps''' drop down menu and then select '''Jupyter Notebook.'''
[[File:OOD Jupyter Menu Bar.png|left|frameless|719x719px]]
[[File:OOD Jupyter Menu Bar.png|left|frameless|719x719px]]


Line 20: Line 20:




3 - You will be taken to a new page where you can select options for the Notebook. Fill out the form and then click the '''Launch''' button.
3 - You will be taken to a new page where you can select options for the Notebook. Fill out the form as desired and then click the '''Launch''' button.


'''Hours''' - The number of hours your Notebook will run.
'''Hours''' - The number of hours your Notebook will run.

Revision as of 16:32, 16 September 2025

Running Jupyter Notebooks is now possible with Open OnDemand. To run a Notebook, follow the steps below.

1 - Log in to Open OnDemand.

2 - Click the Interactive Apps drop down menu and then select Jupyter Notebook.







3 - You will be taken to a new page where you can select options for the Notebook. Fill out the form as desired and then click the Launch button.

Hours - The number of hours your Notebook will run.

Server - The server to run your Notebook on.

Jupyter Notebook Path - The path the Notebook environment lives on. You can use the default path which has many statistic Python related packages preinstalled, or you can define your own Notebook Environment. See below for details on how to set your own environment up.


4 - You will be taken to another new page where the Jupyter Notebook will load. Once it's ready, click Connect to Jupyter at the bottom. You will then be taken to a new tab with your Notebook session.

Custom Jupyter Notebook Environment

To build a custom Notebook environment, you can use a Python package manager such as Momba. But, you can also use Python's built in virtual environments. This example will cover such.

  1. Declare the virtual Python environment.
    • python3 -m venv /path/to/your/jupyter_env
  2. Activate the virtual environment.
    • source /srv/jupyter_env/bin/activate
  3. Install the Jupyter Notebook application to the new Python virtual environment.
    • pip install notebook

To use your own Jupyter Environment, replace the default path above in step 3 for Jupyter Notebook Path.