|
|
Most LSC and CDS software is now distributed in conda environments.
|
|
|
|
|
|
Download the conda mangement script https://git.ligo.org/dasc/puppet/conda/-/raw/master/files/bin/update_conda.py and save it somewhere handy.
|
|
|
|
|
|
Identify a directory that can hold ~50GB of files for the conda software installations. This is typically put in /opt/conda, but could be different on your system.
|
|
|
|
|
|
Create a config file to list which conda environments should be installed. Unless you have specific requirements, the cds environment should suffice. Put this in your /opt/conda/conda_config.yaml file:
|
|
|
|
|
|
```
|
|
|
---
|
|
|
home: "/opt/conda"
|
|
|
forge_url: "https://apt.ligo-wa.caltech.edu/sources/conda/environments/linux-64/"
|
|
|
remove_missing: false
|
|
|
user_configs: []
|
|
|
environs:
|
|
|
cds:
|
|
|
```
|
|
|
|
|
|
Create /etc/profile.d/conda.sh with the following contents, adjusting conda_base as needed:
|
|
|
|
|
|
```
|
|
|
conda_base='/opt/conda/base'
|
|
|
default_env=''
|
|
|
|
|
|
ID=`/usr/bin/id -u`
|
|
|
[ -n "$ID" -a "$ID" -le 1000 ] && return
|
|
|
|
|
|
ssh_incoming_port=$(echo $SSH_CONNECTION | cut -d ' ' -f 4)
|
|
|
if [ "${ssh_incoming_port}" == "22" -o -z "${ssh_incoming_port}" ] ; then
|
|
|
if [ ! -e $HOME/.noconda ] ; then
|
|
|
. ${conda_base}/etc/profile.d/conda.sh
|
|
|
|
|
|
if [ ! -e $HOME/.noigwn ] ; then
|
|
|
custom_env=$(ls -1 -a $HOME/.conda_* 2>/dev/null | head -1 | sed -e "s;^$HOME/\.conda_;;")
|
|
|
if [ -z "${custom_env}" ] ; then
|
|
|
custom_env="${default_env}"
|
|
|
fi
|
|
|
|
|
|
if [ -n "${custom_env}" ] ; then
|
|
|
conda activate $custom_env
|
|
|
fi
|
|
|
fi
|
|
|
fi
|
|
|
fi
|
|
|
```
|
|
|
|
|
|
Now run update_conda.py --config /opt/conda/conda_config.yaml This will take a while (~15 minutes or more per environment). |
|
|
\ No newline at end of file |