Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If you need a special-purpose python environment above and beyond what is already available on the Agave supercomputer, you can add your own custom Anaconda environments as kernels to OpenOnDemand’s the webapp’s Jupyter server.

Info

Anaconda provides a python package manager, often referred to as conda as that’s the name of the program used in the shell for package management. Anaconda organizes Python workflows into environments that are independent of Jupyter. To have Jupyter recognize the Anaconda environments, we have to create kernels, which involve having ipykernel installed in the target environment and setting up special configuration files in your home directory, all automated by the script mkjupy <environment>.

...

Create the Anaconda Environment

In order for OpenOnDemand the webapp to load your environment, you must first create the environment from the terminal. This can be accomplished with the following shell commands (where the $ indicates the shell prompt) for an example environment called nobel:

...

Warning

Since python is a default program on the supercomputer (for operating system and system administration tasks), so is the vanilla “pip installs python” program, pip. As a result, pip will appear to work as intended without anaconda et al. However, pip is doing something frustrating in these cases, which is polluting ~/.local/lib/python<version>/site-packages with requested software, having a significantly detrimental impact on any conflicting python versions installed by conda.

Adding to the danger, pip will always install the latest version of a python module unless specified, hence its use carries a significant risk of destroying a previously working environment.

In almost all cases, install with conda over pip.

pip installs

When packages are not available through conda, pip is the only alternative. Do not use pip unless you are certain that conda is not an option. Seriously. Otherwise, clone the target environment for safety and then run the install from within the activated environment.

...

Code Block
languagebash
$ mkjupy nobel

Start the

...

Session

In the supercomputer’s web app webapp (https://login.rc.asu.edu), create a new interactive session after selecting Jupyter from the server list. The new kernel is now available for driving notebooks!

...