Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion install.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,26 @@
#!/bin/bash

# sourceCommand="source /root/.bashrc && mamba activate cern"
sourceCommand="source /cvmfs/sft.cern.ch/lcg/views/LCG_103/x86_64-centos7-gcc11-opt/setup.sh"
# sourceCommand="source /cvmfs/sft.cern.ch/lcg/views/LCG_103/x86_64-centos7-gcc11-opt/setup.sh"
# Not optimal because SCRAM is not setup with cmsenv... but better than nothing

fullos=$(uname -r)
split=(${fullos//./ })
os=${split[5]}

if [[ ${os:0:3} == el7 ]]; then
echo "Assuming el7 OS"
sourceCommand="source /cvmfs/sft.cern.ch/lcg/views/LCG_103/x86_64-centos7-gcc11-opt/setup.sh"
elif [[ ${os:0:3} == el8 ]]; then
echo "Assuming el8 OS"
sourceCommand="source /cvmfs/sft.cern.ch/lcg/views/LCG_104/x86_64-centos8-gcc11-opt/setup.sh"
elif [[ ${os:0:3} == el9 ]]; then
echo "Assuming el9 OS"
sourceCommand="source /cvmfs/sft.cern.ch/lcg/views/LCG_105/x86_64-el9-gcc11-opt/setup.sh"
else
echo "OS not recognized"
exit
fi

eval "$sourceCommand"
python -m venv --system-site-packages myenv
Expand Down