Skip to content

Install Mamba, Python, and Jupyter Lab: Amarel User

  • Request Amarel Account from Rutgers Office of Advanced Computing

  • Connect to Amarel Open OnDemand

  • Click Clusters
  • Choose Amarel Cluster Shell Access
  • Enter your password
  • In the terminal, do the following commands (one line each time). If you're using Windows, type 'Ctrl+c' to copy and 'Ctrl+Shift+v' to paste command.

  • Install Miniforge using:

wget "https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-$(uname)-$(uname -m).sh"
bash Miniforge3-$(uname)-$(uname -m).sh
    Agree license term: yes
    Confirm install location: ENTER
    Do you wish to update your shell profile to automatically initialize conda: yes
  • Close terminal window, and reopen a terminal window. Test if Mamba and Conda have been successfully installed
mamba

You should see

conda is a tool for managing and deploying applications, environments and packages.
....
  • Create a new environment esa_env:
mamba create -n esa_env python=3.12 jupyter jupyterlab notebook numpy scipy ipython pandas matplotlib cartopy geopandas xarray dask netCDF4 seaborn statsmodels pooch

This will take several minutes. Mamba has to work out a set of package versions that all fit together before it downloads anything.

  • Activate the environment:
mamba activate esa_env

Launch Personal Jupyter

  • Go back to Amarel Open OnDemand. This time, we will launch a personal jupyter. Click on 'Interactive Apps', choose 'Personal Jupyter'.

  • Settings for Personal Jupyter:

    Number of hours: 10
    Number of cores: 1
    Gigabytes of memory: 10
    Partition: main
    Leave Reservation and slurm feature blank
    conda path: /home/YOURNETID/miniforge3
    conda environment: esa_env
  • You should see the Jupyter Lab page automatically opened in your web browser.

  • In the Jupyter Lab, go to File -> Open from Path. Enter the path of your home folder: /home/YOURNETID/

  • Once you're at your home folder, open a new Jupyter notebook by clicking the + sign. Choose Notebook.

  • Rename the Notebook to be 'Lecture_2_Install_Python.ipynb'

Test your installation

  • Enter the following code in the Notebook to test if you successfully installed all necessary packages:
import xarray as xr
import pandas as pd
import geopandas as gpd

If no errors, enter the following to test the plotting functions:

ds = xr.tutorial.load_dataset("air_temperature")
ds.air[0,:,:].plot()

You should see a colored map of air temperature. If you do, everything you need for this course is installed.

If something goes wrong

  • mamba: command not found — you did not reopen the terminal after installing Miniforge. Close the shell tab, open a new one, and try again.
  • Personal Jupyter starts but the imports fail — the conda environment field was blank or misspelled when you launched the job. Cancel the session and launch a new one with esa_env in that field.
  • The job never starts — the cluster is busy. Lower the number of hours or the memory request and try again.
  • The mamba create step fails or hangs on "solving environment" — run it again. If it still fails, bring the error message to office hours.

Submit

  • Download and submit this Notebook as your assignment. It must show the package imports and the xarray plot.