Jupyter can be deployed on the SCC in a number of ways. We recommend use of the Jupyter OnDemand Interactive App in combination with your preferred python environment (i.e. Python or Conda).

 
 
Sections

 

Jupyter OnDemand Interactive App

This is our recommended way to use and launch Jupyter. To launch Jupyter from SCC OnDemand, you will need to start a Jupyter Notebook Interactive App and load your preferred python environment (i.e. Python or Conda).

  1. Open a browser and login to https://scc-ondemand.bu.edu with your BU credentials.
  2. Click Interactive Apps > Jupyter Notebook.
  3. Specify in the Interface field if you’d like to run a notebook or lab. The default is notebook.
  4. Specify in the the Working Directory field the directory for your files. The default is your home directory.
  5. Click one of the Python environment options below for further instructions within that package manager:




  6.  

    1. On the Jupyter Notebook request page, specify your version of python in the List of Modules to load field. Then click Launch to submit the request.

     

     

    1. You will need to install notebook in your virtualenv for the kernel to be available in the OnDemand App. This is done with the following:
      [rcs@scc1 ~] source /path/to/my_venv/bin/activate
      (my_venv) [rcs@scc1 ~] pip install notebook
    2.  

    3. On the Jupyter Notebook request page, specify your version of python in the List of Modules to load field AND add the command to source your environment under the Pre-Launch Commands (optional) field. Then click Launch to submit the request.

     

     

    1. You will need to install notebook in your conda env for the kernel to be available in the OnDemand App. This is done with the following:
      [rcs@scc1 ~] conda activate my_conda_env
      (my_conda_env) [rcs@scc1 ~] pip install notebook
    2.  

    3. On the Jupyter Notebook request page, specify your version of miniconda in the List of Modules to load field AND add the command to activate your environment under the Pre-Launch Commands (optional) field. Then click Launch to submit the request.
      Unchanged:

     


 

Jupyter OnDemand Desktop

Use Jupyter within an Interactive Desktop session for long-running notebooks where you want to close your browser. When launched as an Interactive App as described above, it will stop running if your browser is closed.

  1. Click one of the Python environment options below for further instructions within that package manager:




  2.  

    1. Load python module:
      [rcs@scc1 ~] module load python3/3.10.12
    2.  

    3. Launch Jupyter from the command line:
      [rcs@scc1 ~] jupyter notebook

     

     

    1. You will need to install notebook in your virtualenv for the kernel to be available Jupyter. This is done with the following:
      [rcs@scc1 ~] source /path/to/my_venv/bin/activate
      (my_venv) [rcs@scc1 ~] pip install notebook
    2.  

    3. Launch Jupyter from the command line within your virtualenv:
      (my_venv) [rcs@scc1 ~] jupyter notebook

     

     

    1. You will need to install notebook in your conda environment for the kernel to be available in Jupyter. This is done with the following:
      [rcs@scc1 ~] conda activate my_conda_env
      (my_conda_env) [rcs@scc1 ~] pip install notebook
    2.  

    3. Launch Jupyter from the command line within your conda environment:
      (my_conda_env) [rcs@scc1 ~] jupyter notebook

     

 

Jupyter Batch Jobs

To run a Jupyter Notebook as a batch job there are two options:

  • Option 1: Convert Notebook to Python Script
    Convert notebook to a .py file that can be run as a batch job. This can be done within a batch job or beforehand.

    [rcs@scc1 ~] jupyter nbconvert --to script NOTEBOOK_NAME.ipynb
    [rcs@scc1 ~] python NOTEBOOK_NAME.py
  • Option 2: Execute as Notebook File
    It’s also possible to execute the notebook directly from the .ipynb file. Results are saved within the notebook exactly the way they would be if run from within Jupyter.

    [rcs@scc1 ~] jupyter nbconvert --to notebook --execute  NOTEBOOK_NAME.ipynb

 
Back to top

Last updated: Loading…