5 Installing Custom Software
5.1 Conda environments
The RCE is a shared resource that is actively administered to keep the cluster stable for all users. System administrators install and update software system-wide, while avoiding conflicts between software dependencies. It is not possible for RCE users to install software system-wide. However, users can install custom software into their own project shared space if the required dependencies are already installed system-wide, or if the dependencies can also be installed into the same project space. Frequently, however, it is not possible to manually install the full suite of required software dependencies (the ‘dependency tree’) for a given program.
A solution to this problem is to use Conda environments, which are siloed containers that can be used to install software - and their dependencies - without affecting other users on the cluster. Since Conda is a package management system, it automatically handles the issue of installing appropriately versioned dependencies for any software you install.
A useful resource for interacting with Conda environments will be this cheatsheet.
5.2 Conda setup
Here, we walk through the steps needed to create a Conda enviroment in your project space on the RCE.
- Start an RCE powered Anaconda shell.
- Check which shell is being used and change shell to
bash
if necessary.
- Create a new empty Conda environment in the home directory. The
-n
option indicates the environment name comes next. After the environment name, package names (possibly multiple, separated by a space) to be installed can be listed.
- Make sure there is enough room in the project space to store the
.conda
folder.
- Once the Conda environment is configured, use
rsync
to move (NOTE: do not usemv
orcp
) the.conda
hidden directory from the home directory to a new directory (e.g., calledconda
) in the project space. Then delete the old.conda
hidden directory within the home directory.
- Create a symbolic link (symlink) to the new directory from the original location (in the home directory). The
-s
option specifies a symlink, then the new directory is specified, then the previous location of the.conda
folder in the home directory.
- View list of available Conda environments to check that the symlink worked.
- Search for program(s) to install (this is optional). (NOTE: surround the search string with asterisks).
- Initiate the environment.
- Install new programs into this active environment.
For some programs and packages, you may need to specify a non-default Conda channel using the flag: -c <channel-name>
. See https://docs.conda.io/projects/conda/en/latest/user-guide/concepts/channels.html for more information. For example:
- Check where program(s) are installed and which version (this is optional).
- Run a program.
- Deactivate environment after use.
NOTE: if you need to move your existing Conda environment directory to a different location, it’s best to remove the old .conda
directory and start with a fresh one in the new location.