forked from liulab-dfci/RIMA_pipeline
-
Notifications
You must be signed in to change notification settings - Fork 0
/
RIMA_environment.sh
49 lines (41 loc) · 1.13 KB
/
RIMA_environment.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
47
48
49
#!/bin/bash
str2="AWS"
str1="GCP"
while getopts ":p:" opt; do
case $opt in
p)
if [ "$OPTARG" == "$str2" ]; then
echo "Installing the RIMA environment on: $OPTARG"
#install the mamba as conda package builder
conda install -c conda-forge mamba
for i in "static/environment/AWS"/*.yml
do
echo "Creating all environments for the pipeline"
mamba env create -f $i
done
conda activate RIMA
sudo apt install libfontconfig1 libxrender1
elif [ "$OPTARG" == "$str1" ]; then
echo "Installing the RIMA environment on: $OPTARG"
#install the mamba as conda package builder
conda install -c conda-forge mamba
for i in "static/environment/GCP"/*.yml
do
echo "Creating all environments for the pipeline"
mamba env create -f $i
done
else
echo "$OPTARG is not a support argument"
exit 1
fi
;;
\?)
echo "Invalid option: -$OPTARG" >&2
exit 1
;;
:)
echo "Option -$OPTARG requires an argument." >&2
exit 1
;;
esac
done