-
Notifications
You must be signed in to change notification settings - Fork 0
/
setup.sh
46 lines (40 loc) · 1.16 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
git clone --branch v1.0.1 --single-branch https://github.com/opera-adt/RTC.git RTC
# build container
cp -fr build_docker_image_otf.sh RTC
cp -fr Dockerfile RTC/Docker
cp -fr credentials RTC
cd RTC
sh build_docker_image_otf.sh
cd ..
# copy .netrc credentials on local machine
cp -fr credentials/.netrc ~/
chmod og-rw ~/.netrc
INSTALL_CONDA=false
# Process command-line arguments
while [[ $# -gt 0 ]]; do
case "$1" in
-p|--install-conda)
INSTALL_CONDA=true
;;
-np|--no-install-conda)
INSTALL_CONDA=false
;;
*)
echo "Unknown option: $1"
exit 1
;;
esac
shift
done
# Python installation, needed on aws image for management
if [ "$INSTALL_CONDA" = true ]; then
echo "Installing mamba environment manager"
wget https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge-Linux-x86_64.sh
bash ./Mambaforge-Linux-x86_64.sh -b -f -p ~/mambaforge
~/mambaforge/bin/conda init
source ~/.bashrc
echo "yes" | conda update --all
rm ./Mambaforge-Linux-x86_64.sh
fi
# create the environment
conda env create --file environment.yml