Using other images on the JupyterHub
Other images on the hub
Use the dropdown to select a non-default image on the hub. There are a variety. You can learn about them on the NMFS Open Science container images repo.
Using other images not on the hub
The JupyterHub can run other images that are compatible with a JupyterHub, e.g. Binder images. When you start the hub, use the image dropdown to select “Other”:
You can add a url to a Docker image to this. For example, if you wanted to use the Pangeo notebook docker images image, you would paste one of these into the “Custom image” box.
From DockerHub: pangeo/pangeo-notebook
From Quay.io quay.io/pangeo/pangeo-notebook
Other common data science images:
Using a GitHub repo
You can also create an environment with a MyBinder.org compatible GitHub repo. By selecting the “Build your own image” option.
Simple example for Python
There are two ways to do this. Either via a conda environment or a pip install.
- Put an
environment.yml
file in your GitHub repo at the base level with your Python packages that you need. - Copy the url to your repo and paste that into the “Repository” box (above).
environment.yml
name: example-environment
channels:
- conda-forge
dependencies:
- python=3.11
- numpy
- psutil
- toolz
- matplotlib
- dill
- pandas
- partd
- bokeh
- dask
You will need requirements.txt
for packages and runtime.txt
for the Python version.
requirements.txt
numpy
matplotlib==3.*
seaborn==0.13.*
pandas
runtime.txt
python-3.10
Simple example for R
You will need install.R
for packages and runtime.txt
for the R version.
install.R
install.packages("tidyverse")
install.packages("rmarkdown")
install.packages("httr")
install.packages("shinydashboard")
install.packages("leaflet")
runtime.txt
r-4.3.2-2024-01-10