This guide assumes that you have already switched your conda from a local install to the /opt/ global install (see: Conda Instructions for Users)

You can verify that you are using the global /opt/ install with the following command (it should return /opt/conda/bin/conda)

which conda

In case you want to have your own base env that is independent of the base maintained by the HPC staff the following steps will enable you to do this.

There are XXX base environment templates available to build your base environment from: miniconda2, miniconda3, anaconda2, anaconda3. These .yml files were exported from clean installs of the corresponding *conda type on XX/YY/2021 and can be found in /home/SE/base_conda_yml_files/.

To build your own base environment from one of these you should use the following command (substitute the appropriate name to the version of conda you wish to install located in /home/SE/base_conda_yml_files/)

conda create -n Base -f /home/SE/base_conda_yml_files/<insert_conda_filename_here>.yml

This command will create a new environment named Base in the .conda/envs directory in your home directory and can be activated with conda activate Base

This environment will also install your own version of conda and allow you to maintain your own conda versioning (note this should not impact the ability to use environment switching within interactive apps on the HPC). If you do not want to have a version of conda in this environment you can simply activate the environment (if it isn't already) using conda activate Base and remove conda with the following commands

conda remove conda

You can also install whatever packages you want inside the Base environment to have them always be available to you.

The final step you need to do to make the Base environment you just created is add the following line to your .bashrc profile: conda activate Base. This will activate your newly created Base environment every time you login to the HPC. The easiest way to add this line to your .bashrc profile is with the following command:

echo "conda activate Base" >> ~/.bashrc
  • No labels