Jupyter Notebooks On HiPerGator¶
Introduction¶
Project Jupyter Notebooks represent a popular web-based development interface for teaching, testing and development and running code. Notebooks allow seamless integrations of live code, richly formatted text, images, visualizations, cleanly formatted equations and more. Jupyter supports many programming languages, but is most often associated with Python and R. In addition, nowadays researchers prefer using JupyterLab instead of the original Jupyter Notebook interface.
UF Research Computing offers several methods to run Jupyter. This page provides general information about using Jupyter Notebook and JupyterLab servers on HiPerGator. In general, these options are listed in the order of ease of use., but differ in the degree of flexibility and functionality, so pick the option that suits your workflow and needs best and feel free to experiment to determine the best interface to use.
Interfaces¶
The two main interfaces for Jupyter on HiPerGator are
- JupyterHub. See our jupyterhub specific jupyter documentation here.
- Open OnDemand. See our ondemand specific jupyter documentation here.
If you need to run jupyter as a standalone server and forward the connection to your local computer see - Standalone Server
Filesystem Access¶
See Jupyter Filesystem Access for details on how to set up convenient filesystem access from the jupyterlab interface.
Exporting Notebooks as Executable Scripts¶
Notebooks are a great method for testing and development, but can be cumbersome when it comes to production runs. It is simple to export a Jupyter Notebook as an executable script (.py file for example).
Select File \> Export Notebook As... \> Export Notebook to Executable Script
Jupyter Kernels¶
RC Managed Kernels¶
We are happy to add and maintain custom Jupyter kernels based on collections of python or R packages/modules, environment modules, or custom class conda environments and make those kernels available in the JupyterLab interface. Use the RC Support System to request managed kernel creation or package installs/updates. RC managed Jupyter kernels are based either on environment modules that can also be loaded in an interactive terminal session or in job scripts with 'module load' or custom conda environments.
We provide _kitchen sink__ kernels named 'RC-py3-$version
' and 'RC-R-$version
' that
provide access hundreds of R packages and python3 modules we installed to support
exploratory research and code writing by UF researchers on request. Use
https://support.rc.ufl.edu to request additional package and module installs. Note that
the shared python3 and R environments can only have one package/module version to avoid
conflicts. Use conda or python
virtualenv or conda environments to create custom module
sets for particular projects as shown below.
All other managed kernels are application-specific. Their installation requests are documented in our support system and on this help site.
For directions on setting up your own Julia kernel, please see the Julia page.
Personal Kernels¶
Users can define their own Jupyter kernels for use in JupyterHub. See https://jupyter-client.readthedocs.io/en/stable/kernels.html
In short, kernel definitions can be put into
~/.local/share/jupyter/kernels
directory. See
/apps/jupyterhub/kernels/
for examples of how we define commonly used
kernels. You can also copy a template kernel from
/apps/jupyterhub/template_kernel
. Replace the placeholder paths and
strings in the template files run.sh
and kernel.json
in accordance
to your conda environment configuration.
Note: Even though the kernel.json
defines the display_name
, the
folder name must also be unique. You cannot just copy a folder and
update the contents of the kernel.json
and run.sh
files, you also
need to rename the folder.
To troubleshoot issues with personal kernels, check the log files at
~/ondemand/data/sys/dashboard/batch_connect/sys/jupyter/output/YOUR_SESSION_ID/output.log