Skip to content

Conda configuration on JASMIN

Herbie Bradley edited this page Mar 7, 2021 · 2 revisions

Conda configuration

Unfortunately, the conda installation that comes with Jaspy using module load jaspy is not really designed to use to create your own environments - it is better to install conda separately in your home directory and ignore module load ...

Therefore, type wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh to download the latest Miniconda, and bash Miniconda3-latest-Linux-x86_64.sh to run it. Then accept the license, press enter to install it in your home directory under /home/users/username/miniconda3, then type yes to have the installer run conda init - this will put a script that activates conda when you start the bash shell in the .bashrc file. But now we need to make sure that the .bashrc file is run every time we connect to JASMIN via SSH. To do this, type nano .bash_profile and paste the following:

# .bash_profile

# If .bash_profile exists, bash doesn't read .profile
if [[ -f ~/.profile ]]; then
  . ~/.profile
fi

# If the shell is interactive and .bashrc exists, get the aliases and functions
if [[ $- == *i* && -f ~/.bashrc ]]; then
    . ~/.bashrc
fi

Then press Ctrl+O, Enter, Ctrl+X to save and exit the file. Now type logout to exit JASMIN, and immediately SSH back into JASMIN. You can type conda to see if it worked, and you should see (miniconda3) prefixed to your prompt (on some terminals this doesn't happen). This should work on any of the sci servers - conda now has a stable installation that you can do whatever you like with.

Clone this wiki locally