rbbt-image 0.1.39 → 0.1.40
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Dockerfile +3 -3
- data/bin/build_rbbt_provision_sh.rb +115 -258
- data/share/provision_scripts/R.sh +66 -0
- data/share/provision_scripts/alpine_basic_setup.sh +17 -0
- data/share/provision_scripts/alpine_extended_setup.sh +47 -0
- data/share/provision_scripts/alpine_setup.sh +20 -0
- data/share/provision_scripts/bootstrap.sh +6 -6
- data/share/provision_scripts/functions.sh +58 -0
- data/share/provision_scripts/gem.sh +42 -0
- data/share/provision_scripts/java.sh +3 -0
- data/share/provision_scripts/migrate.sh +6 -0
- data/share/provision_scripts/python.sh +4 -0
- data/share/provision_scripts/{python_setup.sh → python_custom.sh} +0 -3
- data/share/provision_scripts/{tokyocabinet_setup.sh → tokyocabinet.sh} +7 -2
- data/share/provision_scripts/ubuntu_setup.sh +62 -63
- data/share/provision_scripts/variables.sh +10 -12
- metadata +18 -11
- data/share/provision_scripts/R_packages.sh +0 -53
- data/share/provision_scripts/gem_setup.sh +0 -46
- /data/share/provision_scripts/{R_setup.sh → R_custom.sh} +0 -0
- /data/share/provision_scripts/{perl_setup.sh → perl_custom.sh} +0 -0
- /data/share/provision_scripts/{ruby_setup.sh → ruby_custom.sh} +0 -0
- /data/share/provision_scripts/{user_setup.sh → user.sh} +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: db006b39f539ccfe01887fe76863904209abc11ab2caf2c53d9b77b35f463662
|
4
|
+
data.tar.gz: efdead2dfa7cd0d79303524e415cf1acdcc3db2cdeb1aa562e268d44e9f4a372
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b481e7a4daf5a2f4155959d7e2b53aeee8d8cb2da95ba252df5f590407679bfe4b5faf70f736ffd735b8bf1cc08717fb8b80471042649a9a4ffc8a2aafd25b67
|
7
|
+
data.tar.gz: bb5db5c1d64cecdd49e8bb8e1557c296e2a29e36be7ce3fa3c12644e40448157456b988ed5c4ab1a5e170f14bfec4978768422444b2206a239bbcd0fce84cea1
|
data/Dockerfile
CHANGED
@@ -25,19 +25,10 @@ $ #{$0} [options]
|
|
25
25
|
-ws--workflow_server* Rbbt remote workflow server
|
26
26
|
-rr--remote_resources* Remote resources to gather from file-server
|
27
27
|
-rw--remote_workflows* Remote workflows server from workflow-server
|
28
|
-
-
|
29
|
-
-st--skip_tokyocabinet Skip tokyocabinet setup installation
|
30
|
-
-sr--skip_ruby Skip ruby setup installation
|
31
|
-
-sp--skip_perl Skip perl setup installation
|
32
|
-
-spy--skip_python Skip python setup installation
|
33
|
-
-spsl--skip_slurm_loopback Skip setting the slurm loopback
|
34
|
-
-sg--skip_gem Skip ruby gem installation
|
35
|
-
-sR--skip_R Skip R setup
|
36
|
-
-su--skip_user_setup Skip user setup
|
37
|
-
-sb--skip_bootstrap Skip user bootstrap
|
38
|
-
-Rc--R_custom Install a custom installation of R
|
39
|
-
-Rp--R_packages Install basic R packages
|
28
|
+
-bs--base_system* Version of base system initialization script to use (default: ubuntu)
|
40
29
|
-Rbv--ruby_version* Ruby version to use, using three numbers (defaults to 2.4.1)
|
30
|
+
-d--do* List of steps to do
|
31
|
+
-nd--not_do* List of steps to not do
|
41
32
|
-op--optimize Optimize files under ~/.rbbt
|
42
33
|
-dep--container_dependency* Use a different image in Dockerfile, Singularity and Virtualbox
|
43
34
|
-dt--docker* Build docker image using the provided name
|
@@ -67,28 +58,26 @@ script_dir = File.join(root_dir, "share/provision_scripts/")
|
|
67
58
|
# options[:skip_bootstrap] = true
|
68
59
|
#end
|
69
60
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
61
|
+
all_steps = %w(functions base_system tokyocabinet ruby_custom gem java R_custom R perl_custom python_custom python user slurm_loopback hacks)
|
62
|
+
|
63
|
+
|
64
|
+
do_steps = options.include?("do")? (all_steps & options[:do].split(",")) : all_steps
|
65
|
+
not_do_steps = options.include?(:not_do)? options[:not_do].split(",") : all_steps - do_steps
|
66
|
+
|
67
|
+
do_steps << 'base_system' if options[:base_system]
|
68
|
+
do_steps << 'user' if options[:workflow]
|
69
|
+
|
70
|
+
OPTIMIZE = options[:optimize]
|
71
|
+
USER = options[:user] || 'rbbt'
|
72
|
+
CONTAINER_DEP = options[:container_dependency] || 'alpine'
|
73
|
+
BASE_SYSTEM = options[:base_system] || CONTAINER_DEP
|
83
74
|
|
84
75
|
VARIABLES={
|
85
|
-
|
86
|
-
|
87
|
-
|
76
|
+
:RBBT_LOG => 0,
|
77
|
+
:BOOTSTRAP_WORKFLOWS => (options[:workflow] || "").split(/[\s,]+/)*" ",
|
78
|
+
:REMOTE_RESOURCES => (options[:remote_resources] || "").split(/[\s,]+/)*" "
|
88
79
|
}
|
89
80
|
|
90
|
-
VARIABLES[:BOOTSTRAP_WORKFLOWS] = "" if VARIABLES[:BOOTSTRAP_WORKFLOWS] == 'none'
|
91
|
-
|
92
81
|
VARIABLES[:RBBT_SERVER] = options[:server] if options[:server]
|
93
82
|
VARIABLES[:RBBT_FILE_SERVER] = options[:file_server] if options[:file_server]
|
94
83
|
VARIABLES[:RBBT_WORKFLOW_SERVER] = options[:workflow_server] if options[:workflow_server]
|
@@ -98,231 +87,88 @@ VARIABLES[:RBBT_NO_PROGRESS] = "true" if options[:nobar]
|
|
98
87
|
|
99
88
|
options[:ruby_version] ||= "2.6.4"
|
100
89
|
|
101
|
-
|
102
90
|
provision_script =<<-EOF
|
103
91
|
#!/bin/bash -x
|
104
92
|
|
105
|
-
|
106
|
-
echo
|
93
|
+
# PROVISION FILE
|
107
94
|
echo "CMD: #{File.basename($0) + " " + orig_argv.collect{|a| a =~ /\s/ ? "\'#{a}\'" : a }.join(" ")}"
|
108
|
-
echo
|
109
|
-
echo -n "Starting: "
|
110
|
-
date
|
111
95
|
|
112
|
-
|
96
|
+
test -f /etc/profile && source /etc/profile
|
97
|
+
test -f /etc/rbbt_environment && source /etc/rbbt_environment
|
113
98
|
|
114
|
-
provision_script +=<<-EOF
|
115
|
-
echo "1. Provisioning base system"
|
116
|
-
#{
|
117
|
-
if not SKIP_BASE_SYSTEM
|
118
|
-
File.read(script_dir + 'ubuntu_setup.sh')
|
119
|
-
else
|
120
|
-
"echo SKIPPED\necho"
|
121
|
-
end
|
122
|
-
}
|
123
|
-
|
124
|
-
#{
|
125
|
-
if not SKIP_BASE_SYSTEM and R_CUSTOM
|
126
|
-
"echo 1.1 Setting custom R"
|
127
|
-
File.read(script_dir + 'R_setup.sh')
|
128
|
-
else
|
129
|
-
"echo SKIPPED Custom R\necho"
|
130
|
-
end
|
131
|
-
}
|
132
|
-
|
133
|
-
#{
|
134
|
-
if not SKIP_R
|
135
|
-
"echo 1.2 Install R packages"
|
136
|
-
File.read(script_dir + 'R_packages.sh')
|
137
|
-
else
|
138
|
-
"echo SKIPPED installing R packages\necho"
|
139
|
-
end
|
140
|
-
}
|
141
|
-
|
142
|
-
echo "2. Setting up tokyocabinet"
|
143
|
-
#{
|
144
|
-
if not SKIP_TOKYOCABINET
|
145
|
-
File.read(script_dir + 'tokyocabinet_setup.sh')
|
146
|
-
else
|
147
|
-
"echo SKIPPED TokyoCabinet\necho"
|
148
|
-
end
|
149
|
-
}
|
150
|
-
|
151
|
-
echo "3. Setting up ruby"
|
152
|
-
#{
|
153
|
-
if not SKIP_RUBY
|
154
|
-
"export RUBY_VERSION='#{options[:ruby_version]}'\n" << File.read(script_dir + 'ruby_setup.sh')
|
155
|
-
else
|
156
|
-
"echo SKIPPED Ruby\necho"
|
157
|
-
end
|
158
|
-
}
|
159
|
-
|
160
|
-
|
161
|
-
echo "3.1. Setting up gems"
|
162
|
-
#{
|
163
|
-
if not SKIP_GEM
|
164
|
-
File.read(script_dir + 'gem_setup.sh')
|
165
|
-
else
|
166
|
-
"echo SKIPPED Ruby gems\necho"
|
167
|
-
end
|
168
|
-
}
|
169
|
-
|
170
|
-
echo "4 Setting up other stuff"
|
171
|
-
echo "4.1 Setting up perl"
|
172
|
-
#{
|
173
|
-
if not SKIP_PERL
|
174
|
-
File.read(script_dir + 'perl_setup.sh')
|
175
|
-
else
|
176
|
-
"echo SKIPPED Perl\necho"
|
177
|
-
end
|
178
|
-
}
|
179
|
-
|
180
|
-
echo "4.2 Setting up python"
|
181
|
-
#{
|
182
|
-
if not SKIP_PYTHON
|
183
|
-
File.read(script_dir + 'python_setup.sh')
|
184
|
-
else
|
185
|
-
"echo SKIPPED Python\necho"
|
186
|
-
end
|
187
|
-
}
|
188
|
-
|
189
|
-
echo "4.3 Setting up SLURM loopback"
|
190
|
-
#{
|
191
|
-
if not SKIP_SLURM_LOOPBACK
|
192
|
-
File.read(script_dir + 'slurm_loopback.sh')
|
193
|
-
else
|
194
|
-
"echo SKIPPED SLURM lookback\necho"
|
195
|
-
end
|
196
|
-
}
|
197
|
-
|
198
|
-
echo "[ -f ~/.rbbt/etc/environment ] && . ~/.rbbt/etc/environment" >> "/etc/rbbt_environment"
|
199
|
-
echo "source /etc/rbbt_environment" >> /etc/profile
|
200
99
|
EOF
|
201
100
|
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
provision_script +=<<-EOF
|
208
|
-
####################
|
209
|
-
# USER CONFIGURATION
|
210
|
-
|
211
|
-
if [[ '#{ USER }' == 'root' ]] ; then
|
212
|
-
home_dir='/root'
|
213
|
-
else
|
214
|
-
useradd -ms /bin/bash #{USER}
|
215
|
-
home_dir='/home/#{USER}'
|
216
|
-
|
217
|
-
if [ -d /usr/local/miniconda3 ]; then
|
218
|
-
chgrp #{USER} -R /usr/local/miniconda3
|
219
|
-
chmod g+rw -R /usr/local/miniconda3
|
220
|
-
fi
|
221
|
-
fi
|
222
|
-
|
223
|
-
user_script=$home_dir/.rbbt/bin/config_user
|
224
|
-
mkdir -p $(dirname $user_script)
|
225
|
-
chown -R #{USER} $home_dir/.rbbt/
|
226
|
-
|
227
|
-
# set user configuration script
|
228
|
-
cat > $user_script <<'EUSER'
|
229
|
-
|
230
|
-
. /etc/profile
|
231
|
-
|
232
|
-
echo "5.1. Loading custom variables"
|
233
|
-
#{
|
234
|
-
VARIABLES.collect do |variable,value|
|
235
|
-
"export " << ([variable,'"' << value.to_s << '"'] * "=")
|
236
|
-
end * "\n"
|
237
|
-
}
|
238
|
-
|
239
|
-
echo "5.2. Loading default variables"
|
240
|
-
#{File.read(script_dir + 'variables.sh')}
|
241
|
-
|
242
|
-
echo "5.3. Configuring rbbt"
|
243
|
-
#{File.read(script_dir + 'user_setup.sh')}
|
244
|
-
EUSER
|
245
|
-
|
246
|
-
echo "5.4. Running user configuration as '#{USER}'"
|
247
|
-
chown #{USER} $user_script;
|
248
|
-
su -l -c "bash $user_script" #{USER}
|
249
|
-
|
250
|
-
EOF
|
251
|
-
else
|
252
|
-
provision_script += "echo SKIPPED user configuration\necho\n\n"
|
253
|
-
end
|
254
|
-
|
255
|
-
provision_script +=<<-EOF
|
256
|
-
echo "6. Bootstrapping workflows as '#{USER}'"
|
257
|
-
echo
|
258
|
-
EOF
|
259
|
-
|
260
|
-
if not SKIP_BOOT
|
261
|
-
provision_script +=<<-EOF
|
262
|
-
|
263
|
-
if [[ '#{ USER }' == 'root' ]] ; then
|
264
|
-
home_dir='/root'
|
265
|
-
else
|
266
|
-
home_dir='/home/#{USER}'
|
267
|
-
fi
|
268
|
-
|
269
|
-
user_script=$home_dir/.rbbt/bin/bootstrap
|
270
|
-
|
271
|
-
cat > $user_script <<'EUSER'
|
272
|
-
|
273
|
-
. /etc/profile
|
274
|
-
. /etc/rbbt_environment
|
275
|
-
|
276
|
-
echo "6.1. Loading custom variables"
|
277
|
-
#{
|
278
|
-
VARIABLES.collect do |variable,value|
|
279
|
-
"export " << ([variable,'"' << value.to_s << '"'] * "=")
|
280
|
-
end * "\n"
|
281
|
-
}
|
282
|
-
|
283
|
-
echo "6.2. Loading default variables"
|
284
|
-
#{File.read(script_dir + 'variables.sh')}
|
285
|
-
|
286
|
-
echo "6.3. Configuring rbbt"
|
287
|
-
#{File.read(script_dir + 'user_setup.sh')}
|
288
|
-
#
|
289
|
-
echo "6.4. Install and bootstrap"
|
290
|
-
#{File.read(script_dir + "bootstrap.sh")}
|
291
|
-
EUSER
|
292
|
-
|
293
|
-
chown #{USER} $user_script;
|
294
|
-
su -l -c "bash $user_script" #{USER}
|
101
|
+
all_steps.each_with_index do |step,i|
|
102
|
+
if ! do_steps.include?(step)
|
103
|
+
provision_script += "#" + "NOT DO #{step}\n"
|
104
|
+
next
|
105
|
+
end
|
295
106
|
|
296
|
-
|
297
|
-
|
298
|
-
|
107
|
+
provision_script += "#" + "DO #{step}\n"
|
108
|
+
provision_script += case step
|
109
|
+
when 'base_system'
|
110
|
+
File.read(script_dir + "#{BASE_SYSTEM}_setup.sh")
|
111
|
+
when 'user'
|
112
|
+
user_script =<<~EOF
|
113
|
+
. /etc/profile
|
114
|
+
. /etc/rbbt_environment
|
115
|
+
|
116
|
+
echo "6.1. Loading custom variables"
|
117
|
+
#{
|
118
|
+
VARIABLES.collect do |variable,value|
|
119
|
+
"export " << ([variable,'"' << value.to_s << '"'] * "=")
|
120
|
+
end * "\n"
|
121
|
+
}
|
122
|
+
|
123
|
+
echo "6.2. Loading default variables"
|
124
|
+
#{File.read(script_dir + 'variables.sh')}
|
125
|
+
|
126
|
+
echo "6.3. Configuring rbbt"
|
127
|
+
#{File.read(script_dir + 'user.sh')}
|
128
|
+
|
129
|
+
echo "6.4. Install and bootstrap"
|
130
|
+
#{File.read(script_dir + "bootstrap.sh")}
|
131
|
+
|
132
|
+
echo "6.5. Migrate shared files"
|
133
|
+
#{File.read(script_dir + "migrate.sh")}
|
134
|
+
EOF
|
135
|
+
|
136
|
+
<<~EOF
|
137
|
+
if [[ '#{ USER }' == 'root' ]] ; then
|
138
|
+
home_dir='/root'
|
139
|
+
else
|
140
|
+
adduser --disabled-password --gecos "" #{USER}
|
141
|
+
addgroup rbbt
|
142
|
+
adduser #{USER} rbbt
|
143
|
+
home_dir='/home/#{USER}'
|
144
|
+
chown -R #{USER} $home_dir/
|
145
|
+
fi
|
146
|
+
|
147
|
+
mkdir -p $home_dir/.rbbt/bin/
|
148
|
+
user_script=$home_dir/.rbbt/bin/bootstrap
|
149
|
+
chown -R #{USER} $home_dir/
|
150
|
+
|
151
|
+
for d in /usr/local/var/rbbt /usr/local/share/rbbt /usr/local/workflows/rbbt /usr/local/software/rbbt; do
|
152
|
+
mkdir -p $d
|
153
|
+
chgrp rbbt $d
|
154
|
+
chown rbbt $d
|
155
|
+
chmod g+w $d
|
156
|
+
done
|
157
|
+
|
158
|
+
cat > $user_script <<'EUSER'
|
159
|
+
#{user_script}
|
160
|
+
EUSER
|
161
|
+
|
162
|
+
|
163
|
+
su -l -c "sh $user_script" #{USER}
|
164
|
+
EOF
|
165
|
+
else
|
166
|
+
File.read(script_dir + "#{step}.sh")
|
167
|
+
end
|
299
168
|
end
|
300
169
|
|
301
|
-
|
302
|
-
|
303
|
-
# =====
|
304
|
-
|
305
|
-
#{File.read(script_dir + 'hacks.sh')}
|
306
|
-
EOF
|
307
|
-
|
308
|
-
provision_script +=<<-EOF
|
309
|
-
# CODA
|
310
|
-
# ====
|
311
|
-
|
312
|
-
apt-get clean
|
313
|
-
rm -rf /var/lib/apt/lists/* /var/tmp/* /usr/share/doc /usr/share/man /usr/local/share/ri
|
314
|
-
|
315
|
-
#{ "su -l -c 'rbbt system optimize /home/#{USER}/.rbbt ' #{USER}" if OPTIMIZE}
|
316
|
-
|
317
|
-
echo
|
318
|
-
echo -n "Installation done: "
|
319
|
-
date
|
320
|
-
|
321
|
-
EOF
|
322
|
-
|
323
|
-
|
324
|
-
if docker_image = options[:docker]
|
325
|
-
container_dependency = options[:container_dependency] || 'ubuntu:focal'
|
170
|
+
if docker_image = options[:docker]
|
171
|
+
container_dependency = CONTAINER_DEP
|
326
172
|
dockerfile = options[:dockerfile] || File.join(root_dir, 'Dockerfile')
|
327
173
|
dockerfile_text = Open.read(dockerfile)
|
328
174
|
dockerfile_text.sub!(/^FROM.*/,'FROM ' + container_dependency) if container_dependency
|
@@ -359,33 +205,44 @@ end
|
|
359
205
|
|
360
206
|
if singularity_image = options[:singularity]
|
361
207
|
|
362
|
-
container_dependency =
|
208
|
+
container_dependency = CONTAINER_DEP
|
363
209
|
TmpFile.with_file(nil, false) do |dir|
|
364
210
|
Path.setup(dir)
|
365
211
|
|
366
212
|
provision_file = dir['provision.sh']
|
367
213
|
|
368
|
-
|
214
|
+
if container_dependency.include? '.sif'
|
215
|
+
bootstrap_text=<<-EOF
|
216
|
+
Bootstrap: localimage
|
217
|
+
From: #{container_dependency}
|
218
|
+
EOF
|
219
|
+
else
|
220
|
+
bootstrap_text=<<-EOF
|
369
221
|
Bootstrap: docker
|
370
222
|
From: #{container_dependency}
|
223
|
+
EOF
|
224
|
+
end
|
371
225
|
|
226
|
+
bootstrap_text+=<<-EOF
|
372
227
|
%post
|
373
228
|
cat > /image_provision.sh <<"EOS"
|
374
229
|
#{provision_script}
|
375
230
|
EOS
|
376
|
-
|
377
|
-
ln -s /etc/rbbt_environment /.singularity.d/env/99-rbbt_environment.sh
|
231
|
+
sh -x /image_provision.sh 2>&1 | tee /image_provision.log
|
232
|
+
bash -c '[ -f /.singularity.d/env/99-rbbt_environment.sh ] || ln -s /etc/rbbt_environment /.singularity.d/env/99-rbbt_environment.sh'
|
378
233
|
chmod +x /.singularity.d/env/99-rbbt_environment.sh
|
379
|
-
bash -c '[ -d /
|
380
|
-
bash -c '[ -d /usr/local/
|
381
|
-
bash -c '[ -d /
|
234
|
+
#bash -c '[ -d /home/#{USER}/.local/lib/ ] && (rsync -av /home/#{USER}/.local/lib/ /usr/lib/' && chmod 755 /usr/lib/python*/site-packages/ && chown -R root /usr/lib/python*/site-packages/ && rm /home/#{USER}/.local/lib/) || echo -n ""
|
235
|
+
#bash -c '[ -d /usr/local/share ] || mkdir -p /usr/local/share'
|
236
|
+
#bash -c '[ -d /usr/local/share ] || mkdir -p /usr/local/share'
|
237
|
+
#bash -c '[ -d /usr/local/workflows ] || mkdir -p /usr/local/workflows'
|
238
|
+
#bash -c '[ -d /software/rbbt ] || mkdir -p /software/rbbt'
|
382
239
|
#bash -c '[ -d /home/#{USER}/.rbbt/var/ ] && mv /home/#{USER}/.rbbt/var/ /var/rbbt' || echo -n ""
|
383
|
-
bash -c '[ -d /home/#{USER}/.rbbt/var/ ] && rm -Rf /home/#{USER}/.rbbt/var/' || echo -n ""
|
384
|
-
bash -c '[ -d /home/#{USER}/.rbbt/share/ ] && mv /home/#{USER}/.rbbt/share/ /usr/local/share/rbbt' || echo -n ""
|
385
|
-
bash -c '[ -d /home/#{USER}/.rbbt/workflows/ ] && mv /home/#{USER}/.rbbt/workflows/ /usr/local/workflows/rbbt' || echo -n ""
|
386
|
-
bash -c '[ -d /home/#{USER}/.rbbt/software/opt ] && mv /home/#{USER}/.rbbt/software/opt /software/rbbt/opt' || echo -n ""
|
387
|
-
bash -c '[ -d /home/#{USER}/.rbbt/software/src ] && mv /home/#{USER}/.rbbt/software/src /software/rbbt/src' || echo -n ""
|
388
|
-
bash -c '[ -d /home/#{USER}/.rbbt/software/scm ] && mv /home/#{USER}/.rbbt/software/scm /software/rbbt/scm' || echo -n ""
|
240
|
+
#bash -c '[ -d /home/#{USER}/.rbbt/var/ ] && rm -Rf /home/#{USER}/.rbbt/var/' || echo -n ""
|
241
|
+
#bash -c '[ -d /home/#{USER}/.rbbt/share/ ] && mv /home/#{USER}/.rbbt/share/ /usr/local/share/rbbt' || echo -n ""
|
242
|
+
#bash -c '[ -d /home/#{USER}/.rbbt/workflows/ ] && mv /home/#{USER}/.rbbt/workflows/ /usr/local/workflows/rbbt' || echo -n ""
|
243
|
+
#bash -c '[ -d /home/#{USER}/.rbbt/software/opt ] && mv /home/#{USER}/.rbbt/software/opt /software/rbbt/opt' || echo -n ""
|
244
|
+
#bash -c '[ -d /home/#{USER}/.rbbt/software/src ] && mv /home/#{USER}/.rbbt/software/src /software/rbbt/src' || echo -n ""
|
245
|
+
#bash -c '[ -d /home/#{USER}/.rbbt/software/scm ] && mv /home/#{USER}/.rbbt/software/scm /software/rbbt/scm' || echo -n ""
|
389
246
|
EOF
|
390
247
|
FileUtils.mkdir_p dir
|
391
248
|
Open.write(dir["singularity_bootstrap"].find, bootstrap_text)
|
@@ -412,7 +269,7 @@ EOF
|
|
412
269
|
end
|
413
270
|
|
414
271
|
if options[:virtualbox]
|
415
|
-
container_dependency =
|
272
|
+
container_dependency = CONTAINER_DEP
|
416
273
|
TmpFile.with_file(nil, false) do |dir|
|
417
274
|
Path.setup(dir)
|
418
275
|
|
@@ -0,0 +1,66 @@
|
|
1
|
+
#!/bin/bash -x
|
2
|
+
|
3
|
+
# INSTALL
|
4
|
+
# =======
|
5
|
+
|
6
|
+
# R packages
|
7
|
+
# ----------
|
8
|
+
|
9
|
+
function R_install_packages(){
|
10
|
+
pkgs="'$1'"
|
11
|
+
shift
|
12
|
+
for p in $@; do
|
13
|
+
pkgs="$pkgs, '$p'"
|
14
|
+
done
|
15
|
+
echo "install.packages(c($pkgs), repos='http://cran.us.r-project.org')" | R --vanilla --quiet
|
16
|
+
}
|
17
|
+
|
18
|
+
function R_biocLite(){
|
19
|
+
pkgs="'$1'"
|
20
|
+
shift
|
21
|
+
for p in $@; do
|
22
|
+
echo "BiocManager::install(c('$p'))" | R --vanilla --quiet
|
23
|
+
done
|
24
|
+
}
|
25
|
+
|
26
|
+
function R_CMD_install(){
|
27
|
+
url=$1
|
28
|
+
name=$2
|
29
|
+
wget "$url" -O /tmp/R-pkg-"$name".tar.gz
|
30
|
+
R CMD INSTALL /tmp/R-pkg-"$name".tar.gz
|
31
|
+
}
|
32
|
+
|
33
|
+
|
34
|
+
export R_HOME=$(R RHOME)
|
35
|
+
export R_INCLUDE="$R_HOME/../../include/R"
|
36
|
+
gem install rsruby -- --with-R-dir=$R_HOME --with-R-include=$R_INCLUDE
|
37
|
+
|
38
|
+
echo 'install.packages("Rserve", repos="http://www.rforge.net/")' | R --vanilla --quiet
|
39
|
+
gem install rserve-client
|
40
|
+
|
41
|
+
#R_install_packages 'Rcpp'
|
42
|
+
#R_CMD_install 'https://cran.r-project.org/src/contrib/Archive/plyr/plyr_1.8.1.tar.gz' plyr
|
43
|
+
|
44
|
+
#R_install_packages 'MASS' 'nnet'
|
45
|
+
#R_CMD_install 'https://cran.r-project.org/src/contrib/Archive/car/car_2.0-22.tar.gz' car
|
46
|
+
|
47
|
+
R_install_packages 'tidyverse'
|
48
|
+
|
49
|
+
R_install_packages 'RJSONIO' 'XML' 'digest' 'gtable' 'reshape2' 'scales' 'proto'
|
50
|
+
#R_CMD_install 'https://cran.r-project.org/src/contrib/Archive/ggplot2/ggplot2_1.0.0.tar.gz' ggplot2
|
51
|
+
|
52
|
+
R_install_packages 'BiocManager'
|
53
|
+
R_biocLite Biobase
|
54
|
+
|
55
|
+
R_install_packages NMF Cairo drc gridSVG ggthemes mclust randomForest viper
|
56
|
+
|
57
|
+
R_install_packages pheatmap VennDiagram Hmisc pls gridSVG
|
58
|
+
|
59
|
+
R_install_packages UpSetR
|
60
|
+
|
61
|
+
R_biocLite limma viper
|
62
|
+
|
63
|
+
R_install_packages pROC txtplot
|
64
|
+
|
65
|
+
rm /tmp/R-pkg-*.tar.gz
|
66
|
+
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# Basic alpine setup
|
2
|
+
apk add ruby ruby-dev # Ruby
|
3
|
+
apk add git make gcc g++ cmake # Building
|
4
|
+
apk add bzip2 bzip2-dev zlib zlib-dev krb5 gcompat # Libs
|
5
|
+
apk add bash openssh-client wget curl rsync gnu-libiconv # Tools
|
6
|
+
|
7
|
+
gem install rbbt-util rbbt-sources
|
8
|
+
gem install RubyInline
|
9
|
+
|
10
|
+
gem install specific_install hoe minitest
|
11
|
+
gem specific_install -l https://github.com/mikisvaz/lockfile.git
|
12
|
+
gem specific_install -l https://github.com/mikisvaz/rubyinline.git
|
13
|
+
|
14
|
+
rm -Rf /usr/lib/ruby/gems/*/doc /usr/lib/ruby/gems/*/cache
|
15
|
+
|
16
|
+
grep rbbt_environment /etc/rbbt_environment || echo "[ -f ~/.rbbt/etc/environment ] && . ~/.rbbt/etc/environment" >> "/etc/rbbt_environment"
|
17
|
+
grep rbbt_environment /etc/profile || echo echo "source /etc/rbbt_environment" >> /etc/profile
|
@@ -0,0 +1,47 @@
|
|
1
|
+
# Basic alpine setup
|
2
|
+
apk add ruby ruby-dev # Ruby
|
3
|
+
apk add git make gcc g++ cmake # Building
|
4
|
+
apk add bzip2 bzip2-dev zlib zlib-dev krb5 gcompat # Libs
|
5
|
+
apk add bash openssh-client wget curl rsync gnu-libiconv # Tools
|
6
|
+
|
7
|
+
gem install rbbt-util rbbt-sources
|
8
|
+
gem install RubyInline
|
9
|
+
|
10
|
+
gem install specific_install hoe minitest
|
11
|
+
gem specific_install -l https://github.com/mikisvaz/lockfile.git
|
12
|
+
gem specific_install -l https://github.com/mikisvaz/rubyinline.git
|
13
|
+
|
14
|
+
rm -Rf /usr/lib/ruby/gems/*/doc /usr/lib/ruby/gems/*/cache
|
15
|
+
|
16
|
+
grep rbbt_environment /etc/rbbt_environment || echo "[ -f ~/.rbbt/etc/environment ] && . ~/.rbbt/etc/environment" >> "/etc/rbbt_environment"
|
17
|
+
grep rbbt_environment /etc/profile || echo echo "source /etc/rbbt_environment" >> /etc/profile
|
18
|
+
|
19
|
+
# Main alpine setup
|
20
|
+
apk add xvfb bison autoconf rsync curl openssl numactl zlib-dev zlib yaml-dev openssl xz-dev xz-libs libffi tcsh gawk pandoc libtbb-dev yaml libxml2-dev libxml2 shared-mime-info
|
21
|
+
|
22
|
+
# Extended alpine setup
|
23
|
+
apk add openjdk17 R R-dev python3 python3-dev py3-pip ansible
|
24
|
+
|
25
|
+
apk add fontconfig fontconfig-dev harfbuzz fribidi harfbuzz-dev fribidi-dev jpeg jpeg-dev tiff tiff-dev cairo cairo-dev libxt-dev libxt
|
26
|
+
|
27
|
+
# Allow USER to install things globaly during bootstrap
|
28
|
+
chmod 777 -R /usr/lib/python*/site-packages
|
29
|
+
|
30
|
+
gem install pycall
|
31
|
+
|
32
|
+
export R_HOME=$(R RHOME)
|
33
|
+
export R_INCLUDE="$R_HOME/../../include/R"
|
34
|
+
cat >> /etc/rbbt_environment <<'EOF'
|
35
|
+
export R_HOME=$(R RHOME)
|
36
|
+
export R_INCLUDE="$R_HOME/../../include/R"
|
37
|
+
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$R_HOME/lib"
|
38
|
+
export PATH="$PATH:$R_HOME/bin"
|
39
|
+
EOF
|
40
|
+
gem install rsruby -- --with-R-dir=$R_HOME --with-R-include=$R_INCLUDE
|
41
|
+
|
42
|
+
echo 'install.packages("Rserve", repos="http://www.rforge.net/")' | R --vanilla --quiet
|
43
|
+
gem install rserve-client
|
44
|
+
|
45
|
+
export JAVA_HOME=$(java -XshowSettings:properties -version 2>&1 > /dev/null | grep 'java.home' | cut -f 2 -d "=" | awk '{$1=$1};1')
|
46
|
+
echo $JAVA_HOME
|
47
|
+
gem install rjb
|
@@ -0,0 +1,20 @@
|
|
1
|
+
# Basic alpine setup
|
2
|
+
apk add ruby ruby-dev # Ruby
|
3
|
+
apk add git make gcc g++ cmake # Building
|
4
|
+
apk add bzip2 bzip2-dev zlib zlib-dev krb5 gcompat # Libs
|
5
|
+
apk add bash openssh-client wget curl rsync gnu-libiconv # Tools
|
6
|
+
|
7
|
+
gem install rbbt-util rbbt-sources
|
8
|
+
gem install RubyInline
|
9
|
+
|
10
|
+
gem install specific_install hoe minitest
|
11
|
+
gem specific_install -l https://github.com/mikisvaz/lockfile.git
|
12
|
+
gem specific_install -l https://github.com/mikisvaz/rubyinline.git
|
13
|
+
|
14
|
+
rm -Rf /usr/lib/ruby/gems/*/doc /usr/lib/ruby/gems/*/cache
|
15
|
+
|
16
|
+
grep rbbt_environment /etc/rbbt_environment || echo "[ -f ~/.rbbt/etc/environment ] && . ~/.rbbt/etc/environment" >> "/etc/rbbt_environment"
|
17
|
+
grep rbbt_environment /etc/profile || echo echo "source /etc/rbbt_environment" >> /etc/profile
|
18
|
+
|
19
|
+
# Main alpine setup
|
20
|
+
apk add xvfb bison autoconf rsync curl openssl numactl zlib-dev zlib yaml-dev openssl xz-dev xz-libs libffi tcsh gawk pandoc libtbb-dev yaml libxml2-dev libxml2 shared-mime-info
|
@@ -3,25 +3,25 @@
|
|
3
3
|
# USER RBBT BOOTSTRAP
|
4
4
|
# ===================
|
5
5
|
|
6
|
+
export RBBT_WORKFLOW_AUTOINSTALL=true
|
7
|
+
export RBBT_LOG=0
|
8
|
+
|
6
9
|
for workflow in $BOOTSTRAP_WORKFLOWS; do
|
7
10
|
rbbt workflow install $workflow
|
8
11
|
|
9
12
|
pip_requirements_file=$(rbbt_find.rb -w $workflow requirements.pip --nocolor)
|
10
|
-
|
13
|
+
test -z $pip_requirements_file || pip install -r $pip_requirements_file
|
11
14
|
unset pip_requirements_file
|
12
15
|
|
13
16
|
pip_requirements_file2=$(rbbt_find.rb -w $workflow requirements.pip2 --nocolor)
|
14
|
-
|
17
|
+
test -z $pip_requirements_file2 || pip install -r $pip_requirements_file2
|
15
18
|
unset pip_requirements_file2
|
16
19
|
|
17
20
|
pip_requirements_file3=$(rbbt_find.rb -w $workflow requirements.pip3 --nocolor)
|
18
|
-
|
21
|
+
test -z $pip_requirements_file3 || pip install -r $pip_requirements_file3
|
19
22
|
unset pip_requirements_file3
|
20
23
|
done
|
21
24
|
|
22
|
-
export RBBT_WORKFLOW_AUTOINSTALL=true
|
23
|
-
export RBBT_LOG=0
|
24
|
-
|
25
25
|
for workflow in $BOOTSTRAP_WORKFLOWS; do
|
26
26
|
echo "Bootstrapping $workflow on $BOOTSTRAP_CPUS CPUs"
|
27
27
|
[ -d $HOME/.rbbt/tmp/ ] || mkdir -p $HOME/.rbbt/tmp/
|
@@ -0,0 +1,58 @@
|
|
1
|
+
_var_content(){
|
2
|
+
var=$1
|
3
|
+
eval echo "$"$(echo $var)
|
4
|
+
}
|
5
|
+
|
6
|
+
_append_with_colon(){
|
7
|
+
var=$1
|
8
|
+
value=$2
|
9
|
+
|
10
|
+
current=`_var_content $var`
|
11
|
+
|
12
|
+
if ! echo $current | grep "\(^\|:\)$value\(:\|$\)" >/dev/null 2>&1; then
|
13
|
+
eval $(echo $var)="\"$current:$value\""
|
14
|
+
fi
|
15
|
+
}
|
16
|
+
|
17
|
+
_append_with_space(){
|
18
|
+
var=$1
|
19
|
+
value=$2
|
20
|
+
|
21
|
+
current=`_var_content $var`
|
22
|
+
|
23
|
+
if ! echo $current | grep "\(^\| \)$value\( \|$\)" >/dev/null 2>&1; then
|
24
|
+
eval $(echo $var)="\"$current:$value\""
|
25
|
+
fi
|
26
|
+
}
|
27
|
+
|
28
|
+
_prepend_with_colon(){
|
29
|
+
var=$1
|
30
|
+
value=$2
|
31
|
+
|
32
|
+
current=`_var_content $var`
|
33
|
+
|
34
|
+
if ! echo $current | grep "\(^\|:\)$value\(:\|$\)" >/dev/null 2>&1; then
|
35
|
+
eval $(echo $var)="\"$value:$current\""
|
36
|
+
fi
|
37
|
+
}
|
38
|
+
|
39
|
+
_prepend_with_space(){
|
40
|
+
var=$1
|
41
|
+
value=$2
|
42
|
+
|
43
|
+
current=`_var_content $var`
|
44
|
+
|
45
|
+
if ! echo $current | grep "\(^\| \)$value\( \|$\)" >/dev/null 2>&1; then
|
46
|
+
eval $(echo $var)="\"$value $current\""
|
47
|
+
fi
|
48
|
+
}
|
49
|
+
|
50
|
+
_add_path(){
|
51
|
+
_prepend_with_colon PATH "${1%/}"
|
52
|
+
}
|
53
|
+
|
54
|
+
_add_libpath(){
|
55
|
+
_prepend_with_colon LD_LIBRARY_PATH "${1%/}"
|
56
|
+
_prepend_with_colon LD_RUN_PATH "${1%/}"
|
57
|
+
}
|
58
|
+
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#!/bin/bash -x
|
2
|
+
|
3
|
+
# RUBY GEMS and RBBT
|
4
|
+
# =================
|
5
|
+
|
6
|
+
echo "* Updating RubyGem"
|
7
|
+
export REALLY_GEM_UPDATE_SYSTEM=true
|
8
|
+
env REALLY_GEM_UPDATE_SYSTEM=true gem update --no-document --system
|
9
|
+
|
10
|
+
#echo "* Installing difficult gems: ZenTest, RubyInline, rsruby and rjb"
|
11
|
+
#gem install --force --no-document RubyInline
|
12
|
+
gem install --force --no-document ZenTest
|
13
|
+
|
14
|
+
## R (extra config in gem)
|
15
|
+
#export R_INCLUDE="$(echo "$R_HOME" | sed 's@/usr/lib\(32\|64\)*@/usr/share@')/include"
|
16
|
+
#gem install --conservative --no-document rsruby -- --with-R-dir="$R_HOME" --with-R-include="$R_INCLUDE" \
|
17
|
+
# --with_cflags="-fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wall -fno-strict-aliasing"
|
18
|
+
|
19
|
+
# Java (extra config in gem)
|
20
|
+
#export JAVA_HOME=$(echo /usr/lib/jvm/java-?-openjdk-*)
|
21
|
+
#gem install --conservative --force --no-document rjb
|
22
|
+
|
23
|
+
echo "* Installing all rbbt gems"
|
24
|
+
# Rbbt and some optional gems
|
25
|
+
gem install --no-document --force \
|
26
|
+
tokyocabinet \
|
27
|
+
ruby-prof \
|
28
|
+
rbbt-util rbbt-sources rbbt-dm rbbt-text rbbt-rest
|
29
|
+
|
30
|
+
echo "* Installing extra gems for web stuff"
|
31
|
+
# Extra things for web interface
|
32
|
+
gem install --no-document \
|
33
|
+
sinatra puma \
|
34
|
+
rest-client \
|
35
|
+
kramdown pandoc pandoc-ruby \
|
36
|
+
spreadsheet rubyXL \
|
37
|
+
prawn prawn-svg mimemagic \
|
38
|
+
prime mechanize
|
39
|
+
|
40
|
+
gem install --no-document mini_racer uglifier
|
41
|
+
|
42
|
+
gem cleanup
|
@@ -3,9 +3,14 @@
|
|
3
3
|
# TOKYOCABINET INSTALL
|
4
4
|
# ===================
|
5
5
|
|
6
|
-
|
6
|
+
mkdir -p /opt/src/
|
7
|
+
cd /opt/src/
|
7
8
|
wget http://fallabs.com/tokyocabinet/tokyocabinet-1.4.48.tar.gz -O "tokyocabinet.tar.gz"
|
8
9
|
tar -xvzf tokyocabinet.tar.gz
|
9
10
|
cd tokyocabinet-1.4.48
|
10
11
|
./configure --prefix=/usr/local
|
11
|
-
make
|
12
|
+
make > /tc_make.log
|
13
|
+
make install > /tc_make_install.log
|
14
|
+
gem install tokyocabinet
|
15
|
+
cd /
|
16
|
+
rm -Rf /opt/src/
|
@@ -3,67 +3,65 @@
|
|
3
3
|
# INSTALL
|
4
4
|
# =======
|
5
5
|
|
6
|
-
cat << 'EOF' > /etc/rbbt_environment
|
7
|
-
_var_content(){
|
8
|
-
var=$1
|
9
|
-
eval echo "$"$(echo $var)
|
10
|
-
}
|
11
|
-
|
12
|
-
_append_with_colon(){
|
13
|
-
var=$1
|
14
|
-
value=$2
|
15
|
-
|
16
|
-
current=`_var_content $var`
|
17
|
-
|
18
|
-
if ! echo $current | grep "\(^\|:\)$value\(:\|$\)" >/dev/null 2>&1; then
|
19
|
-
eval $(echo $var)="\"$current:$value\""
|
20
|
-
fi
|
21
|
-
}
|
22
|
-
|
23
|
-
_append_with_space(){
|
24
|
-
var=$1
|
25
|
-
value=$2
|
26
|
-
|
27
|
-
current=`_var_content $var`
|
28
|
-
|
29
|
-
if ! echo $current | grep "\(^\| \)$value\( \|$\)" >/dev/null 2>&1; then
|
30
|
-
eval $(echo $var)="\"$current:$value\""
|
31
|
-
fi
|
32
|
-
}
|
33
|
-
|
34
|
-
_prepend_with_colon(){
|
35
|
-
var=$1
|
36
|
-
value=$2
|
37
|
-
|
38
|
-
current=`_var_content $var`
|
39
|
-
|
40
|
-
if ! echo $current | grep "\(^\|:\)$value\(:\|$\)" >/dev/null 2>&1; then
|
41
|
-
eval $(echo $var)="\"$value:$current\""
|
42
|
-
fi
|
43
|
-
}
|
44
|
-
|
45
|
-
_prepend_with_space(){
|
46
|
-
var=$1
|
47
|
-
value=$2
|
48
|
-
|
49
|
-
current=`_var_content $var`
|
50
|
-
|
51
|
-
if ! echo $current | grep "\(^\| \)$value\( \|$\)" >/dev/null 2>&1; then
|
52
|
-
eval $(echo $var)="\"$value $current\""
|
53
|
-
fi
|
54
|
-
}
|
55
|
-
|
56
|
-
_add_path(){
|
57
|
-
_prepend_with_colon PATH "${1%/}"
|
58
|
-
}
|
59
|
-
|
60
|
-
_add_libpath(){
|
61
|
-
_prepend_with_colon LD_LIBRARY_PATH "${1%/}"
|
62
|
-
_prepend_with_colon LD_RUN_PATH "${1%/}"
|
63
|
-
}
|
64
|
-
EOF
|
65
|
-
|
66
|
-
. /etc/rbbt_environment
|
6
|
+
#cat << 'EOF' > /etc/rbbt_environment
|
7
|
+
#_var_content(){
|
8
|
+
# var=$1
|
9
|
+
# eval echo "$"$(echo $var)
|
10
|
+
#}
|
11
|
+
#
|
12
|
+
#_append_with_colon(){
|
13
|
+
# var=$1
|
14
|
+
# value=$2
|
15
|
+
#
|
16
|
+
# current=`_var_content $var`
|
17
|
+
#
|
18
|
+
# if ! echo $current | grep "\(^\|:\)$value\(:\|$\)" >/dev/null 2>&1; then
|
19
|
+
# eval $(echo $var)="\"$current:$value\""
|
20
|
+
# fi
|
21
|
+
#}
|
22
|
+
#
|
23
|
+
#_append_with_space(){
|
24
|
+
# var=$1
|
25
|
+
# value=$2
|
26
|
+
#
|
27
|
+
# current=`_var_content $var`
|
28
|
+
#
|
29
|
+
# if ! echo $current | grep "\(^\| \)$value\( \|$\)" >/dev/null 2>&1; then
|
30
|
+
# eval $(echo $var)="\"$current:$value\""
|
31
|
+
# fi
|
32
|
+
#}
|
33
|
+
#
|
34
|
+
#_prepend_with_colon(){
|
35
|
+
# var=$1
|
36
|
+
# value=$2
|
37
|
+
#
|
38
|
+
# current=`_var_content $var`
|
39
|
+
#
|
40
|
+
# if ! echo $current | grep "\(^\|:\)$value\(:\|$\)" >/dev/null 2>&1; then
|
41
|
+
# eval $(echo $var)="\"$value:$current\""
|
42
|
+
# fi
|
43
|
+
#}
|
44
|
+
#
|
45
|
+
#_prepend_with_space(){
|
46
|
+
# var=$1
|
47
|
+
# value=$2
|
48
|
+
#
|
49
|
+
# current=`_var_content $var`
|
50
|
+
#
|
51
|
+
# if ! echo $current | grep "\(^\| \)$value\( \|$\)" >/dev/null 2>&1; then
|
52
|
+
# eval $(echo $var)="\"$value $current\""
|
53
|
+
# fi
|
54
|
+
#}
|
55
|
+
#
|
56
|
+
#_add_path(){
|
57
|
+
# _prepend_with_colon PATH "${1%/}"
|
58
|
+
#}
|
59
|
+
#
|
60
|
+
#_add_libpath(){
|
61
|
+
# _prepend_with_colon LD_LIBRARY_PATH "${1%/}"
|
62
|
+
# _prepend_with_colon LD_RUN_PATH "${1%/}"
|
63
|
+
#}
|
64
|
+
#EOF
|
67
65
|
|
68
66
|
# Basic system requirements
|
69
67
|
# -------------------------
|
@@ -115,7 +113,8 @@ echo '_add_path "/usr/local/bin/"' >> /etc/rbbt_environment
|
|
115
113
|
echo 'export LC_ALL=C.UTF-8' >> /etc/rbbt_environment
|
116
114
|
|
117
115
|
|
118
|
-
. /etc/rbbt_environment
|
119
|
-
|
120
116
|
apt-get clean
|
121
117
|
rm -rf /var/lib/apt/lists/*
|
118
|
+
|
119
|
+
echo "[ -f ~/.rbbt/etc/environment ] && . ~/.rbbt/etc/environment" >> "/etc/rbbt_environment"
|
120
|
+
echo "source /etc/rbbt_environment" >> /etc/profile
|
@@ -1,19 +1,17 @@
|
|
1
1
|
#!/bin/bash -x
|
2
2
|
|
3
|
-
test -z $
|
4
|
-
test -z $
|
5
|
-
test -z $
|
3
|
+
test -z $RBBT_SERVER && export RBBT_SERVER=http://rbbt.bsc.es/
|
4
|
+
test -z $RBBT_FILE_SERVER && export RBBT_FILE_SERVER="$RBBT_SERVER"
|
5
|
+
test -z $RBBT_WORKFLOW_SERVER && export RBBT_WORKFLOW_SERVER="$RBBT_SERVER"
|
6
6
|
|
7
|
-
test -z $
|
8
|
-
test -z $
|
7
|
+
test -z $REMOTE_RESOURCES && export REMOTE_RESOURCES="Organism ICGC COSMIC KEGG InterPro Signor"
|
8
|
+
test -z $REMOTE_WORFLOWS && export REMOTE_WORFLOWS=""
|
9
9
|
|
10
|
-
test -z $
|
10
|
+
test -z $RBBT_WORKFLOW_AUTOINSTALL && export RBBT_WORKFLOW_AUTOINSTALL="true"
|
11
11
|
|
12
|
-
test -z $
|
12
|
+
test -z $WORKFLOWS && export WORKFLOWS=""
|
13
13
|
|
14
|
-
test -z $
|
15
|
-
test -z $
|
14
|
+
test -z $BOOTSTRAP_WORKFLOWS && export BOOTSTRAP_WORKFLOWS=""
|
15
|
+
test -z $BOOTSTRAP_CPUS && export BOOTSTRAP_CPUS="2"
|
16
16
|
|
17
|
-
test -z $
|
18
|
-
|
19
|
-
test -z ${RUBY_VERSION+x} && RUBY_VERSION="2.4.1"
|
17
|
+
test -z $RBBT_LOG && export RBBT_LOG="LOW"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-image
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.40
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-03-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbbt-util
|
@@ -40,18 +40,25 @@ files:
|
|
40
40
|
- bin/run_rbbt_docker.rb
|
41
41
|
- lib/rbbt/docker.rb
|
42
42
|
- share/provision_scripts/Dockerfile.R-packages
|
43
|
-
- share/provision_scripts/
|
44
|
-
- share/provision_scripts/
|
43
|
+
- share/provision_scripts/R.sh
|
44
|
+
- share/provision_scripts/R_custom.sh
|
45
|
+
- share/provision_scripts/alpine_basic_setup.sh
|
46
|
+
- share/provision_scripts/alpine_extended_setup.sh
|
47
|
+
- share/provision_scripts/alpine_setup.sh
|
45
48
|
- share/provision_scripts/bootstrap.sh
|
46
|
-
- share/provision_scripts/
|
49
|
+
- share/provision_scripts/functions.sh
|
50
|
+
- share/provision_scripts/gem.sh
|
47
51
|
- share/provision_scripts/hacks.sh
|
48
|
-
- share/provision_scripts/
|
49
|
-
- share/provision_scripts/
|
50
|
-
- share/provision_scripts/
|
52
|
+
- share/provision_scripts/java.sh
|
53
|
+
- share/provision_scripts/migrate.sh
|
54
|
+
- share/provision_scripts/perl_custom.sh
|
55
|
+
- share/provision_scripts/python.sh
|
56
|
+
- share/provision_scripts/python_custom.sh
|
57
|
+
- share/provision_scripts/ruby_custom.sh
|
51
58
|
- share/provision_scripts/slurm_loopback.sh
|
52
|
-
- share/provision_scripts/
|
59
|
+
- share/provision_scripts/tokyocabinet.sh
|
53
60
|
- share/provision_scripts/ubuntu_setup.sh
|
54
|
-
- share/provision_scripts/
|
61
|
+
- share/provision_scripts/user.sh
|
55
62
|
- share/provision_scripts/variables.sh
|
56
63
|
homepage: http://github.com/mikisvaz/rbbt-image
|
57
64
|
licenses:
|
@@ -72,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
79
|
- !ruby/object:Gem::Version
|
73
80
|
version: '0'
|
74
81
|
requirements: []
|
75
|
-
rubygems_version: 3.
|
82
|
+
rubygems_version: 3.4.8
|
76
83
|
signing_key:
|
77
84
|
specification_version: 4
|
78
85
|
summary: Build docker and Vagrant (VM) images
|
@@ -1,53 +0,0 @@
|
|
1
|
-
#!/bin/bash -x
|
2
|
-
|
3
|
-
# INSTALL
|
4
|
-
# =======
|
5
|
-
|
6
|
-
# R packages
|
7
|
-
# ----------
|
8
|
-
|
9
|
-
function R_install_packages(){
|
10
|
-
pkgs="'$1'"
|
11
|
-
shift
|
12
|
-
for p in $@; do
|
13
|
-
pkgs="$pkgs, '$p'"
|
14
|
-
done
|
15
|
-
echo "install.packages(c($pkgs), repos='http://cran.us.r-project.org')" | R --vanilla
|
16
|
-
}
|
17
|
-
|
18
|
-
function R_biocLite(){
|
19
|
-
pkgs="'$1'"
|
20
|
-
shift
|
21
|
-
for p in $@; do
|
22
|
-
echo "source('http://bioconductor.org/biocLite.R'); biocLite('$p')" | R --vanilla
|
23
|
-
done
|
24
|
-
}
|
25
|
-
|
26
|
-
function R_CMD_install(){
|
27
|
-
url=$1
|
28
|
-
name=$2
|
29
|
-
wget "$url" -O /tmp/R-pkg-"$name".tar.gz
|
30
|
-
R CMD INSTALL /tmp/R-pkg-"$name".tar.gz
|
31
|
-
}
|
32
|
-
|
33
|
-
R_install_packages Rcpp RJSONIO XML
|
34
|
-
R_CMD_install 'https://cran.r-project.org/src/contrib/Archive/plyr/plyr_1.8.1.tar.gz' plyr
|
35
|
-
R_CMD_install 'https://cran.r-project.org/src/contrib/Archive/car/car_2.0-22.tar.gz' car
|
36
|
-
R_install_packages 'digest' 'gtable' 'reshape2' 'scales' 'proto'
|
37
|
-
|
38
|
-
R_CMD_install 'https://cran.r-project.org/src/contrib/Archive/ggplot2/ggplot2_1.0.0.tar.gz' ggplot2
|
39
|
-
|
40
|
-
R_install_packages NMF Cairo drc gridSVG ggthemes mclust randomForest viper
|
41
|
-
|
42
|
-
echo 'install.packages("Rserve", repos="http://www.rforge.net/")' | R --vanilla
|
43
|
-
|
44
|
-
R_install_packages pheatmap VennDiagram Hmisc pls gridSVG
|
45
|
-
R_install_packages tidyverse
|
46
|
-
|
47
|
-
R_install_packages UpSetR
|
48
|
-
|
49
|
-
R_biocLite limma viper
|
50
|
-
|
51
|
-
R_install_packages pROC txtplot
|
52
|
-
|
53
|
-
rm /tmp/R-pkg-*.tar.gz
|
@@ -1,46 +0,0 @@
|
|
1
|
-
#!/bin/bash -x
|
2
|
-
|
3
|
-
# RUBY GEMS and RBBT
|
4
|
-
# =================
|
5
|
-
|
6
|
-
. /etc/rbbt_environment
|
7
|
-
|
8
|
-
echo "* Updating RubyGem"
|
9
|
-
export REALLY_GEM_UPDATE_SYSTEM=true
|
10
|
-
env REALLY_GEM_UPDATE_SYSTEM=true gem update --no-document --system
|
11
|
-
|
12
|
-
echo "* Installing difficult gems: ZenTest, RubyInline, rsruby and rjb"
|
13
|
-
gem install --force --no-document ZenTest
|
14
|
-
gem install --force --no-document RubyInline
|
15
|
-
|
16
|
-
# R (extra config in gem)
|
17
|
-
export R_INCLUDE="$(echo "$R_HOME" | sed 's@/usr/lib\(32\|64\)*@/usr/share@')/include"
|
18
|
-
gem install --conservative --no-document rsruby -- --with-R-dir="$R_HOME" --with-R-include="$R_INCLUDE" \
|
19
|
-
--with_cflags="-fPIC -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Wall -fno-strict-aliasing"
|
20
|
-
|
21
|
-
# Java (extra config in gem)
|
22
|
-
export JAVA_HOME=$(echo /usr/lib/jvm/java-?-openjdk-*)
|
23
|
-
gem install --conservative --force --no-document rjb
|
24
|
-
|
25
|
-
echo "* Installing bulk gems and Rbbt"
|
26
|
-
# Rbbt and some optional gems
|
27
|
-
gem install --no-document --force \
|
28
|
-
tokyocabinet \
|
29
|
-
ruby-prof \
|
30
|
-
rbbt-util rbbt-rest rbbt-dm rbbt-text rbbt-sources \
|
31
|
-
rserve-client \
|
32
|
-
|
33
|
-
# Get good version of lockfile
|
34
|
-
#wget http://ubio.bioinfo.cnio.es/people/mvazquezg/lockfile-2.1.4.gem -O /tmp/lockfile-2.1.4.gem
|
35
|
-
echo "* Installing our version of lockfile"
|
36
|
-
wget https://github.com/mikisvaz/lockfile/raw/master/lockfile-2.1.6.gem -O /tmp/lockfile-2.1.6.gem
|
37
|
-
gem install --no-document /tmp/lockfile-2.1.6.gem
|
38
|
-
|
39
|
-
# Extra things for web interface
|
40
|
-
gem install --no-document --force \
|
41
|
-
tokyocabinet \
|
42
|
-
ruby-prof \
|
43
|
-
rbbt-util rbbt-rest rbbt-dm rbbt-text rbbt-sources rbbt-phgx rbbt-GE \
|
44
|
-
rserve-client \
|
45
|
-
uglifier therubyracer kramdown pandoc pandoc-ruby \
|
46
|
-
puma prawn prawn-svg mimemagic
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|