Conda
conda is the package and environment manager from Anaconda. It is the main method for users to install applications or dependencies at CCI. In most situations conda install package-name
is a direct in replacement for PIP in instructions or examples you may be following.
CCI recommends using miniconda rather than the full anaconda distribution.
NOTE: Ensure the proxy is configured in your environment before starting.
Installing conda on PPC64le¶
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-ppc64le.sh
bash Miniconda3-latest-Linux-ppc64le.sh -p ~/barn/miniconda3
- You will need to read and accept the license terms.
- When prompted to run conda init, answer yes.
source ~/.bashrc
The conda
command should now be present in your environment.
You can search the Anaconda Cloud for available packages. Pay attention to the availability of packages for the architecture of the system you're using.
Instructions for installing specific package versions and sourcing from specific channels can be found at Managing Packages
Installing conda on x86¶
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh -p ~/barn/miniconda3x86
- Read and accept the license terms.
- If this is the first conda install inside your project you can let conda auto initialize your environment.
- When prompted to run conda init, answer yes.
source ~/.bashrc
NOTE: If this your second install of conda for a different architecture, do not run conda init. The installer will display a command to run to manually setup conda each time you login.
Installing conda on Arm¶
wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh
bash Miniconda3-latest-Linux-aarch64.sh
- Read and accept the license terms.
- If this is the first conda install inside your project, let conda auto initialize your environment.
- When prompted to run conda init, answer yes.
Common situations¶
Manually activating Conda or switching Conda between different architecture installations¶
Replace and activate the Conda install at the path provided in your current shell
eval "$(~/barn/<PATH TO MINICONDA INSTALL>/bin/conda shell.bash hook)"
Activating a conda environment in a sbatch file¶
Conda environments can be activated as part of a Slurm job
#!/bin/bash
#Slurm Directives
#SBATCH -N 1
#SBATCH --time=00:10:00
#SBATCH --gres=gpu:1
source /gpfs/u/home/PROJ/PROJuser/barn/<PATH TO MINICONDA INSTALL>/etc/profile.d/conda.sh
conda activate ENVIRONMENT-NAME
#Run the script that does your work
srun /gpfs/u/home/CCNI/CCNIdmnn/barn/worker.sh