-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathVECMAtk_setup.sh
128 lines (89 loc) · 2.68 KB
/
VECMAtk_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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
#!/bin/bash
# check OS version
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
echo "OS type = Linux"
curlcmd="curl -o miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh"
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
echo "OS type = Mac OSX"
curlcmd="curl -o miniconda.sh https://repo.anaconda.com/miniconda/Miniconda3-latest-MacOSX-x86_64.sh"
fi
# download Miniconda-installer
if [ ! -f miniconda.sh ]; then
echo "Downloading miniconda ..."
eval $curlcmd
fi
# setup VirtualEnv
if [ ! -d VirtualEnv ]; then
bash miniconda.sh -b -p VirtualEnv
fi
cat <<EOF > load_VECMAtk_ENV.sh
#!/bin/bash
echo "Loading VECMAtk virtualEnv . . ."
eval "\$($PWD/VirtualEnv/bin/conda shell.bash hook)"
export -f activate
pyversion="\$(python -V 2>&1)"
pylocation="\$(which python 2>&1)"
echo "conda python version = " \$pyversion
echo "conda python location = " \$pylocation
# FabSim Env parameters
export PATH=$PWD/FabSim3/bin:\$PATH
export PYTHONPATH=$PWD/FabSim3:$PWD/VirtualEnv
EOF
# load VirtualEnv
eval "$(VirtualEnv/bin/conda shell.bash hook)"
# update pip version if it is needed
python -m pip install --upgrade pip
# EasyVVUQ installation
pip install easyvvuq
# clone EasyVVUQ github repo
if [ ! -d EasyVVUQ ]; then
git clone https://github.com/UCL-CCS/EasyVVUQ.git
fi
# clone FabSim3 github repo
if [ ! -d FabSim3 ]; then
git clone https://github.com/djgroen/FabSim3.git
fi
# FabSim3 installation
cd FabSim3
pip install ruamel.yaml numpy fabric3==1.13.1.post1 cryptography
if [ ! -f deploy/machines_user.yml ]; then
python3 configure_fabsim.py
fi
cd ..
# clone muscle3 github repo
if [ ! -d muscle3 ]; then
git clone https://github.com/multiscale/muscle3.git
fi
# MUSCLE3 installation
pip install -U pip setuptools wheel
pip install muscle3
# QCG PilotJob Manager installation
# pip install --upgrade git+https://github.com/vecma-project/QCG-PilotJob.git
pip install qcg-pilotjob
pip install easyvvuq-qcgpj
# QCG Now installation
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
curlcmd="curl -o QCG-Now.tar.bz2 http://www.qoscosgrid.org/qcg-now/resources/downloads/current/QCG-Now-linux-1.4.1-1.tar.bz2"
elif [[ "$OSTYPE" == "darwin"* ]]; then
# Mac OSX
curlcmd="curl -o QCG-Now.tar.bz2 http://www.qoscosgrid.org/qcg-now/resources/downloads/current/QCG-Now-osx-1.4.1-1.tar.bz2"
fi
if [ ! -f QCG-Now.tar.bz2 ]; then
echo "Downloading QCG-Now ..."
eval $curlcmd
fi
if [ ! -d QCG-Now ]; then
mkdir QCG-Now
tar xvf QCG-Now.tar.bz2 -C QCG-Now
chmod +x QCG-Now/bin/java
chmod +x QCG-Now/bin/QCG-Now
QCG-Now/bin/QCG-Now
fi
read -d '' guide << EOF
VECMAtk installation is DONE ...
to load the VirtualEnv, please type
source load_VECMAtk_ENV.sh
EOF
echo "$guide"
conda deactivate