Scinet-conda

From SciNet Users Documentation
Jump to navigation Jump to search

The scinet-conda wrapper is a package created to address Anaconda's feature of creating zillions of files upon installation, which is not good for HPC file systems. It creates a virtual environment-like interface to Anaconda installed in a Singularity container, thus eliminating the problem of have numerous small files.

How to use scinet-conda

Activating the environment

By default scinet-conda is not available. It can be put into your environment using the command

 $ source /scinet/conda/etc/profile.d/scinet-conda.sh
 

This command must be invoked at the beginning of each session to make the necessary commands available.

Creating conda environments

You can now create conda environments using a similar syntax to regular Anaconda:

 $ scinet-conda create -n my.venv python==3.7

Note that you must specify the Python version that you want. This will create an Singularity, container which contains Anaconda, in your $HOME directory. To activate this environment, use the command:

 $ scinet-conda activate my.venv
 (my.env)$

This environment can now be used in the same way as a regular virtual environment.

Installing conda packages

Once the environment has been activated conda packages can be installed in your scinet-conda environment in the same manner as a regular conda environment.

 (my.venv)$ scinet-conda install six

To install a package from a specific channel, specify the channel in the usual way.

 (my.venv)$ scinet-conda install --channel dglteam dgl