conda

From CCI User Wiki
Jump to: navigation, search

conda is the package and environment manager from Anaconda.

Installing conda

CCI recommends using miniconda rather than the full anaconda distribution. Ensure the CCI proxy is configured in your environment before starting. The example below assumes this will be used on DCS. If you are using another cluster, please make sure you use the installer for the correct architecture, such as x86_64 instead of ppc64le.

  1. wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-ppc64le.sh
  2. bash Miniconda3-latest-Linux-ppc64le.sh -p ~/barn/miniconda3
  3. You will need to read and accept the license terms.
  4. When prompted to run conda init, answer yes.
  5. source ~/.bashrc

The conda command should now be present in your environment.

You can search the Anaconda Cloud for available packages. Please pay attention to the availability of packages for the architecture of the system you're using.

Shared package cache

There is a shared package cache available to all users of the DCS system that is regularly updated. Using this cache can save the time and space of downloading packages from remote mirrors to the local environment. The instructions below do not apply to other systems at CCI, only the DCS system.

The shared cache has to be configured for each install of conda:

  1. Check the current package cache for the install: conda info - look for "package cache" setting and note it for later
  2. Edit the conda (also listed in the output of `conda info`, usually /gpfs/u/home/<PROJ>/<USER>/.condarc) and add the following:
pkgs_dirs:
  - /gpfs/u/software/ppc64le-rhel7/.conda/pkgs
  - /gpfs/u/home/<PROJ>/<USER>/barn/miniconda3/pkgs​

The second entry should be the package cache from above; without this conda will not be able to install other packages that are not in the CCI package cache. The spaces are important!