-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsetup_external.sh
executable file
·144 lines (118 loc) · 4.15 KB
/
setup_external.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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
#!/bin/bash
set -e
# ===== PREP =====
mkdir -p external
pushd external
setup_root=$(pwd)
# ===== VIENNA (1.x) =====
if [ ! -d ViennaRNA-1.8.5 ]; then
wget https://www.tbi.univie.ac.at/RNA/download/sourcecode/1_8_x/ViennaRNA-1.8.5.tar.gz
tar -xvf ViennaRNA-1.8.5.tar.gz
rm ViennaRNA-1.8.5.tar.gz
fi
pushd ViennaRNA-1.8.5
./configure CFLAGS="-std=gnu89 -fcommon -g -O2" --without-perl --without-forester --without-kinfold --prefix=$setup_root/ViennaRNA-1.8.5/build
make
make check
make install
popd
# ===== VIENNA (2.1.9) =====
if [ ! -d ViennaRNA-2.1.9 ]; then
wget https://www.tbi.univie.ac.at/RNA/download/sourcecode/2_1_x/ViennaRNA-2.1.9.tar.gz
tar -xvf ViennaRNA-2.1.9.tar.gz
rm ViennaRNA-2.1.9.tar.gz
fi
pushd ViennaRNA-2.1.9
./configure CFLAGS="-Wno-error=implicit-int -Wno-error=implicit-function-declaration" --prefix=$setup_root/ViennaRNA-2.1.9/build --without-perl --without-forester --without-kinfold
make check
make install
popd
# ===== VIENNA (2.6.4/Current Latest) =====
if [ ! -d ViennaRNA-2.6.4 ]; then
wget https://www.tbi.univie.ac.at/RNA/download/sourcecode/2_6_x/ViennaRNA-2.6.4.tar.gz
tar -xvf ViennaRNA-2.6.4.tar.gz
rm ViennaRNA-2.6.4.tar.gz
fi
pushd ViennaRNA-2.6.4
./configure --prefix=$setup_root/ViennaRNA-2.6.4/build --without-perl --without-python --without-forester --without-kinfold --without-rnalocmin --without-rnaxplorer
make
make check
make install
popd
# ===== NEMO =====
if [ ! -d nemo ]; then
git clone https://github.com/eternagame/nemo
pushd nemo
else
pushd nemo
git fetch
fi
git checkout 154ada38c33efa4ccb1502f368a790d1b8124381
gcc -g -O2 -fopenmp -I../ViennaRNA-2.1.9/H -MD -MP -c -o nemo.o nemo.cpp
gcc -g -O2 -fopenmp -L../ViennaRNA-2.1.9/build/lib -o nemo nemo.o -lstdc++ -lRNA -lm -ldl
popd
# ===== ETERNABRAIN =====
if [ ! -d eternabrain ]; then
git clone https://github.com/eternagame/eternabrain
pushd eternabrain
else
pushd eternabrain
git fetch
fi
echo "rna-prediction/models/*/*eterna100-benchmarking**" > .git/info/exclude
# In order to make sure our patch applies cleanly, throw out any prior modifications
# We use git stash instead of git clean just in case there were intentional local modifications
# someone wants to retrieve (the overhead incurred here should not be substantial)
git stash -u
git checkout 3b152333b579ef49ca843c497b3f11045e67b319
git apply ../eternabrain.patch
conda create -qy -p ../eternabrain-env python=2.7
# We pin grpcio to ensure it uses a prebuilt wheel
../eternabrain-env/bin/pip install -r requirements.txt grpcio==1.39.0
popd
# ===== LEARNA =====
if [ ! -d learna ]; then
git clone https://github.com/automl/learna
pushd learna
else
pushd learna
git fetch
fi
echo "models/eterna100-benchmarking" > .git/info/exclude
# In order to make sure our patch applies cleanly, throw out any prior modifications
# We use git stash instead of git clean just in case there were intentional local modifications
# someone wants to retrieve (the overhead incurred here should not be substantial)
git stash -u
git checkout 34b3cf9eeaab848a7fa8b1481b4abe0c416fe09e
git apply ../learna.patch
conda env create -qy -p ../learna-env --file environment.yml
./src/data/download_and_build_rfam_learn.sh
if [ ! -d data/rfam_learn_test ]; then
mv data/rfam_learn/test data/rfam_learn_test
fi
if [ ! -d data/rfam_learn_validation ]; then
mv data/rfam_learn/validation data/rfam_learn_validation
fi
if [ ! -d data/rfam_learn_train ]; then
mv data/rfam_learn/train data/rfam_learn_train
fi
rm -rf data/rfam_learn
popd
# ===== SENTRNA =====
if [ ! -d SentRNA ]; then
git clone https://github.com/jadeshi/SentRNA
pushd SentRNA
else
pushd SentRNA
git fetch
fi
echo "models/eterna100-benchmarking" > .git/info/exclude
# In order to make sure our patch applies cleanly, throw out any prior modifications
# We use git stash instead of git clean just in case there were intentional local modifications
# someone wants to retrieve (the overhead incurred here should not be substantial)
git stash -u
git checkout 6855a2d0734a962ffa7bf5a5833f52695644e18c
git apply ../sentrna.patch
conda create -qy -p ../sentrna-env python=2.7 tensorflow=1.15.0 numpy=1.16.6
popd
popd