Table of Contents |
---|
Overview
The supercomputer uses Mamba, a high-performance parallel package manager, to allow users to install the Python modules they need. It also plays a pivotal role in optimizing software environments on supercomputers. In the upcoming instructions, we'll explore the process of loading Mamba modules and delve into creating and loading new environments.
...
Warning |
---|
Do NOT install package manager like conda on your account! Do NOT use any conda command except special cases! |
Why Create a New Environment?
In a fresh terminal session, python
or python3
points to a system-installed copy of Python (typically in /usr/bin)
. As the operating system heavily depends on this python instance, the version is fixed and only the most basic, built-in libraries are available.
Creating a new environment allows you to have full control over the Python version, the selection of libraries, and the specific versions, too. Python environments can then be engaged and disengaged freely, enabling a wide-variety of specific uses including CPU compute and even GPU acceleration.
Load the Package and Environment Manager
Load the latest stable version of the mamba Python manager with:
module load mamba/latest
List Available Environments
Many Python suites, such as Pytorch
or Qiime
, are commonly-requested and thus are provided by Research Computing staff on the supercomputers already. These environments are version-fixed and read-only, so they may be used freely by any number of users simultaneously without any risk of the environment changing.
...
Code Block |
---|
[<asurite>@login1 ~]$ mamba info --envs mamba version : 1.5.1 # conda environments: # pytorchGPU /home/<asurite>/.conda/envs/pytorchGPU testing /home/<asurite>/.conda/envs/testing updateTest /home/<asurite>/.conda/envs/updateTest base /packages/apps/mamba/1.5.1 pytorch-1.8.2. /packages/envs/pytorch-1.8.2 scicomp /packages/envs/scicomp ... |
Load Available Environments
Use the source activate
command to load the environment you want.
...
Panel | ||||||
---|---|---|---|---|---|---|
| ||||||
Do NOT load environments with |
Creating Environments
Warning |
---|
Do NOT perform these steps on login nodes. |
...
When using mamba to install packages or create environments, you may see errors related to opening files in /packages/apps/mamba
. These errors are harmless. An example is shown below.
Always verify the Prefix:
is pointing where you need it to before proceeding with an installation, but otherwise, errors and warnings made by mamba
may be ignored.
It is also good practice to verify what is being installed as a new package, what existing packages are being modified, and what existing packages are being removed before proceeding with the install.
Please review the mamba install
section below for a summary of the components of mamba install
.
Adding dependencies to existing Environments
Note |
---|
The global/admin-maintained environments are read-only and can’t be changed by users. To add packages to one of these environments, you will need to clone it. |
...
Please review the screenshot of an example mamba install
below before proceeding. Annotations are shown in cyan with a black background and cyan outline.
When using mamba to install packages or create environments, you may see errors related to opening files in /packages/apps/mamba
. These errors are harmless. An example is shown below.
Always verify the Prefix:
is pointing where you need it to before proceeding with an installation, but otherwise, errors and warnings made by mamba
may be ignored.
It is also good practice to verify what is being installed as a new package, what existing packages are being modified, and what existing packages are being removed before proceeding with the install.
...
Using environments in Jupyter
Once an environment is created, a kernel interface will need to be made to have that environment available in Jupyter. This is as easy as, mkjupy <env_name>
. Please review /wiki/spaces/RC/pages/1905788308 for additional details.
ADVANCED: Building from GitHub repository
Many python packages are not necessarily available on available mamba channels. It is best to avoid these packages when possible. However, it is possible to integrate them into a workflow. First, clone the git repository into your home directory:
...
Warning |
---|
Never use |
Additional Help
Insert excerpt | ||||||||
---|---|---|---|---|---|---|---|---|
|