rbbt-image 0.1.39 → 0.2.0
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 +126 -256
- data/share/provision_scripts/R.sh +12 -0
- data/share/provision_scripts/{R_setup.sh → R_custom.sh} +3 -2
- data/share/provision_scripts/R_packages.sh +11 -13
- data/share/provision_scripts/alpine_basic_setup.sh +20 -0
- data/share/provision_scripts/alpine_extended_setup.sh +49 -0
- data/share/provision_scripts/alpine_setup.sh +22 -0
- data/share/provision_scripts/bootstrap.sh +8 -7
- data/share/provision_scripts/custom_gems.sh +1 -0
- 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 +5 -0
- data/share/provision_scripts/python.sh +6 -0
- data/share/provision_scripts/{python_setup.sh → python_custom.sh} +7 -7
- data/share/provision_scripts/{ruby_setup.sh → ruby_custom.sh} +11 -3
- data/share/provision_scripts/tokyocabinet.sh +17 -0
- data/share/provision_scripts/ubuntu_basic_setup.sh +37 -0
- data/share/provision_scripts/ubuntu_setup.sh +6 -70
- data/share/provision_scripts/variables.sh +10 -12
- metadata +20 -10
- data/share/provision_scripts/gem_setup.sh +0 -46
- data/share/provision_scripts/tokyocabinet_setup.sh +0 -11
- /data/share/provision_scripts/{perl_setup.sh → perl_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: bd869e4ef0be90e31b7336f2dda2776fefb6449e1423d2d96e5ce9daf09b029f
|
4
|
+
data.tar.gz: 1b60f792b06bd633e39b6fd917c6075b333b06fda808e1a5a1c03c4b97507dac
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8269c1f224f9292c164e075893f95b68ee4bd93d5e0ce008db17e819fa54b05b8e3abed9392161189dbbf73bbe377be81c251c3f05bba8762077b756c3566b6c
|
7
|
+
data.tar.gz: b8f112f632dbdbf54d4fe762589b2397eaf1852727faeb2fa8836c4c8bcfbe7fb1b6b84eda747ba5ba182fc9af6763b625f3ba83b339b87c77ccdb00cbd1bab6
|
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
|
@@ -48,6 +39,8 @@ $ #{$0} [options]
|
|
48
39
|
-dv--docker_volumnes* List of volumes to set-up in Docker
|
49
40
|
--nocolor Prevent rbbt from using colors and control sequences in the logs while provisioning
|
50
41
|
--nobar Prevent rbbt from using progress bars while provisioning
|
42
|
+
-g--gems* Custom gems to install
|
43
|
+
-sp--system_packages* Custom system packages
|
51
44
|
EOF
|
52
45
|
|
53
46
|
if options[:help]
|
@@ -67,28 +60,25 @@ script_dir = File.join(root_dir, "share/provision_scripts/")
|
|
67
60
|
# options[:skip_bootstrap] = true
|
68
61
|
#end
|
69
62
|
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
OPTIMIZE = options[:optimize]
|
63
|
+
all_steps = %w(functions base_system tokyocabinet ruby_custom gem custom_gems java R_custom R R_packages perl_custom python_custom python user slurm_loopback hacks)
|
64
|
+
|
65
|
+
do_steps = options.include?("do")? (all_steps & options[:do].split(",")) : all_steps
|
66
|
+
not_do_steps = options.include?(:not_do)? options[:not_do].split(",") : all_steps - do_steps
|
67
|
+
|
68
|
+
do_steps << 'base_system' if options[:base_system]
|
69
|
+
do_steps << 'user' if options[:workflow]
|
70
|
+
|
71
|
+
OPTIMIZE = options[:optimize]
|
72
|
+
USER = options[:user] || 'rbbt'
|
73
|
+
CONTAINER_DEP = options[:container_dependency] || 'alpine'
|
74
|
+
BASE_SYSTEM = options[:base_system] || CONTAINER_DEP
|
83
75
|
|
84
76
|
VARIABLES={
|
85
|
-
|
86
|
-
|
87
|
-
|
77
|
+
:RBBT_LOG => 0,
|
78
|
+
:BOOTSTRAP_WORKFLOWS => (options[:workflow] || "").split(/[\s,]+/)*" ",
|
79
|
+
:REMOTE_RESOURCES => (options[:remote_resources] || "").split(/[\s,]+/)*" "
|
88
80
|
}
|
89
81
|
|
90
|
-
VARIABLES[:BOOTSTRAP_WORKFLOWS] = "" if VARIABLES[:BOOTSTRAP_WORKFLOWS] == 'none'
|
91
|
-
|
92
82
|
VARIABLES[:RBBT_SERVER] = options[:server] if options[:server]
|
93
83
|
VARIABLES[:RBBT_FILE_SERVER] = options[:file_server] if options[:file_server]
|
94
84
|
VARIABLES[:RBBT_WORKFLOW_SERVER] = options[:workflow_server] if options[:workflow_server]
|
@@ -96,233 +86,102 @@ VARIABLES[:REMOTE_WORKFLOWS] = options[:remote_workflows].split(/[\s,]+/)*" " if
|
|
96
86
|
VARIABLES[:RBBT_NOCOLOR] = "true" if options[:nocolor]
|
97
87
|
VARIABLES[:RBBT_NO_PROGRESS] = "true" if options[:nobar]
|
98
88
|
|
99
|
-
options[:ruby_version] ||= "2.6.4"
|
89
|
+
VARIABLES[:RUBY_VERSION] = options[:ruby_version] ||= "2.6.4"
|
90
|
+
VARIABLES[:CUSTOM_GEMS] = options[:gems]
|
91
|
+
VARIABLES[:CUSTOM_SYSTEM_PACKAGES] = options[:system_packages]
|
100
92
|
|
93
|
+
do_steps << 'custom_gems' if options[:gems]
|
101
94
|
|
102
95
|
provision_script =<<-EOF
|
103
96
|
#!/bin/bash -x
|
104
97
|
|
105
|
-
|
106
|
-
echo
|
98
|
+
# PROVISION FILE
|
107
99
|
echo "CMD: #{File.basename($0) + " " + orig_argv.collect{|a| a =~ /\s/ ? "\'#{a}\'" : a }.join(" ")}"
|
108
|
-
echo
|
109
|
-
echo -n "Starting: "
|
110
|
-
date
|
111
|
-
|
112
|
-
EOF
|
113
|
-
|
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
100
|
|
198
|
-
|
199
|
-
|
200
|
-
EOF
|
201
|
-
|
202
|
-
provision_script +=<<-EOF
|
203
|
-
echo "5. Configuring user"
|
204
|
-
EOF
|
205
|
-
|
206
|
-
if not SKIP_USER
|
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}'
|
101
|
+
test -f /etc/profile && . /etc/profile
|
102
|
+
test -f /etc/rbbt_environment && . /etc/rbbt_environment
|
216
103
|
|
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
104
|
#{
|
234
|
-
|
235
|
-
|
236
|
-
|
105
|
+
VARIABLES.collect do |variable,value|
|
106
|
+
"export " << ([variable,'"' << value.to_s << '"'] * "=")
|
107
|
+
end * "\n"
|
237
108
|
}
|
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
109
|
EOF
|
259
110
|
|
260
|
-
|
261
|
-
|
262
|
-
|
263
|
-
|
264
|
-
|
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}
|
111
|
+
all_steps.each_with_index do |step,i|
|
112
|
+
if ! do_steps.include?(step)
|
113
|
+
provision_script += "#" + "NOT DO #{step}\n"
|
114
|
+
next
|
115
|
+
end
|
295
116
|
|
296
|
-
|
297
|
-
|
298
|
-
|
117
|
+
provision_script += "#" + "DO #{step}\n"
|
118
|
+
provision_script += case step
|
119
|
+
when 'base_system'
|
120
|
+
File.read(script_dir + "#{BASE_SYSTEM}_setup.sh")
|
121
|
+
when 'user'
|
122
|
+
user_script =<<~EOF
|
123
|
+
. /etc/profile
|
124
|
+
. /etc/rbbt_environment
|
125
|
+
|
126
|
+
echo "6.1. Loading custom variables"
|
127
|
+
#{
|
128
|
+
VARIABLES.collect do |variable,value|
|
129
|
+
"export " << ([variable,'"' << value.to_s << '"'] * "=")
|
130
|
+
end * "\n"
|
131
|
+
}
|
132
|
+
|
133
|
+
echo "6.2. Loading default variables"
|
134
|
+
#{File.read(script_dir + 'variables.sh')}
|
135
|
+
|
136
|
+
echo "6.3. Configuring rbbt"
|
137
|
+
#{File.read(script_dir + 'user.sh')}
|
138
|
+
|
139
|
+
echo "6.4. Install and bootstrap"
|
140
|
+
#{File.read(script_dir + "bootstrap.sh")}
|
141
|
+
#
|
142
|
+
echo "6.5. Migrate shared files"
|
143
|
+
#{File.read(script_dir + "migrate.sh")}
|
144
|
+
|
145
|
+
rm -Rf ~/.rbbt/tmp/
|
146
|
+
EOF
|
147
|
+
|
148
|
+
<<~EOF
|
149
|
+
if [[ '#{ USER }' == 'root' ]] ; then
|
150
|
+
home_dir='/root'
|
151
|
+
else
|
152
|
+
adduser --disabled-password --gecos "" #{USER}
|
153
|
+
addgroup rbbt
|
154
|
+
adduser #{USER} rbbt
|
155
|
+
home_dir='/home/#{USER}'
|
156
|
+
chown -R #{USER} $home_dir/
|
157
|
+
fi
|
158
|
+
|
159
|
+
mkdir -p $home_dir/.rbbt/bin/
|
160
|
+
user_script=$home_dir/.rbbt/bin/bootstrap
|
161
|
+
chown -R #{USER} $home_dir/
|
162
|
+
|
163
|
+
for d in /usr/local/var/rbbt /usr/local/share/rbbt /usr/local/workflows/rbbt /usr/local/software/rbbt; do
|
164
|
+
mkdir -p $d
|
165
|
+
chgrp rbbt $d
|
166
|
+
chown rbbt $d
|
167
|
+
chmod g+w $d
|
168
|
+
done
|
169
|
+
|
170
|
+
cat > $user_script <<'EUSER'
|
171
|
+
#{user_script}
|
172
|
+
EUSER
|
173
|
+
|
174
|
+
chmod 777 -R /usr/local/
|
175
|
+
su -l -c "sh $user_script" #{USER}
|
176
|
+
|
177
|
+
EOF
|
178
|
+
else
|
179
|
+
File.read(script_dir + "#{step}.sh")
|
180
|
+
end
|
299
181
|
end
|
300
182
|
|
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'
|
183
|
+
if docker_image = options[:docker]
|
184
|
+
container_dependency = CONTAINER_DEP
|
326
185
|
dockerfile = options[:dockerfile] || File.join(root_dir, 'Dockerfile')
|
327
186
|
dockerfile_text = Open.read(dockerfile)
|
328
187
|
dockerfile_text.sub!(/^FROM.*/,'FROM ' + container_dependency) if container_dependency
|
@@ -359,33 +218,44 @@ end
|
|
359
218
|
|
360
219
|
if singularity_image = options[:singularity]
|
361
220
|
|
362
|
-
container_dependency =
|
221
|
+
container_dependency = CONTAINER_DEP
|
363
222
|
TmpFile.with_file(nil, false) do |dir|
|
364
223
|
Path.setup(dir)
|
365
224
|
|
366
225
|
provision_file = dir['provision.sh']
|
367
226
|
|
368
|
-
|
227
|
+
if container_dependency.include? '.sif'
|
228
|
+
bootstrap_text=<<-EOF
|
229
|
+
Bootstrap: localimage
|
230
|
+
From: #{container_dependency}
|
231
|
+
EOF
|
232
|
+
else
|
233
|
+
bootstrap_text=<<-EOF
|
369
234
|
Bootstrap: docker
|
370
235
|
From: #{container_dependency}
|
236
|
+
EOF
|
237
|
+
end
|
371
238
|
|
239
|
+
bootstrap_text+=<<-EOF
|
372
240
|
%post
|
373
241
|
cat > /image_provision.sh <<"EOS"
|
374
242
|
#{provision_script}
|
375
243
|
EOS
|
376
|
-
|
377
|
-
ln -s /etc/rbbt_environment /.singularity.d/env/99-rbbt_environment.sh
|
244
|
+
sh -x /image_provision.sh 2>&1 | tee /image_provision.log
|
245
|
+
bash -c '[ -f /.singularity.d/env/99-rbbt_environment.sh ] || ln -s /etc/rbbt_environment /.singularity.d/env/99-rbbt_environment.sh'
|
378
246
|
chmod +x /.singularity.d/env/99-rbbt_environment.sh
|
379
|
-
bash -c '[ -d /
|
380
|
-
bash -c '[ -d /usr/local/
|
381
|
-
bash -c '[ -d /
|
247
|
+
#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 ""
|
248
|
+
#bash -c '[ -d /usr/local/share ] || mkdir -p /usr/local/share'
|
249
|
+
#bash -c '[ -d /usr/local/share ] || mkdir -p /usr/local/share'
|
250
|
+
#bash -c '[ -d /usr/local/workflows ] || mkdir -p /usr/local/workflows'
|
251
|
+
#bash -c '[ -d /software/rbbt ] || mkdir -p /software/rbbt'
|
382
252
|
#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 ""
|
253
|
+
#bash -c '[ -d /home/#{USER}/.rbbt/var/ ] && rm -Rf /home/#{USER}/.rbbt/var/' || echo -n ""
|
254
|
+
#bash -c '[ -d /home/#{USER}/.rbbt/share/ ] && mv /home/#{USER}/.rbbt/share/ /usr/local/share/rbbt' || echo -n ""
|
255
|
+
#bash -c '[ -d /home/#{USER}/.rbbt/workflows/ ] && mv /home/#{USER}/.rbbt/workflows/ /usr/local/workflows/rbbt' || echo -n ""
|
256
|
+
#bash -c '[ -d /home/#{USER}/.rbbt/software/opt ] && mv /home/#{USER}/.rbbt/software/opt /software/rbbt/opt' || echo -n ""
|
257
|
+
#bash -c '[ -d /home/#{USER}/.rbbt/software/src ] && mv /home/#{USER}/.rbbt/software/src /software/rbbt/src' || echo -n ""
|
258
|
+
#bash -c '[ -d /home/#{USER}/.rbbt/software/scm ] && mv /home/#{USER}/.rbbt/software/scm /software/rbbt/scm' || echo -n ""
|
389
259
|
EOF
|
390
260
|
FileUtils.mkdir_p dir
|
391
261
|
Open.write(dir["singularity_bootstrap"].find, bootstrap_text)
|
@@ -412,7 +282,7 @@ EOF
|
|
412
282
|
end
|
413
283
|
|
414
284
|
if options[:virtualbox]
|
415
|
-
container_dependency =
|
285
|
+
container_dependency = CONTAINER_DEP
|
416
286
|
TmpFile.with_file(nil, false) do |dir|
|
417
287
|
Path.setup(dir)
|
418
288
|
|
@@ -0,0 +1,12 @@
|
|
1
|
+
#!/bin/bash -x
|
2
|
+
|
3
|
+
# INSTALL
|
4
|
+
# =======
|
5
|
+
|
6
|
+
|
7
|
+
export R_HOME=$(R RHOME)
|
8
|
+
export R_INCLUDE="$R_HOME/../../include/R"
|
9
|
+
gem install rsruby -- --with-R-dir=$R_HOME --with-R-include=$R_INCLUDE || gem install rsruby -- --with-R-dir=$R_HOME --with-R-include=/usr/share/R/include/
|
10
|
+
|
11
|
+
echo 'install.packages("Rserve", repos="http://www.rforge.net/")' | R --vanilla --quiet
|
12
|
+
gem install rserve-client
|
@@ -16,7 +16,8 @@ make && make install
|
|
16
16
|
|
17
17
|
echo "# For RSRuby gem " >> /etc/rbbt_environment
|
18
18
|
echo 'export R_HOME="/usr/local/lib/R"' >> /etc/rbbt_environment
|
19
|
-
echo '
|
20
|
-
echo '
|
19
|
+
echo 'PATH="$R_HOME/bin/:$PATH" # Rserver' >> /etc/rbbt_environment
|
20
|
+
echo 'LD_LIBRARY_PATH="$R_HOME/lib/:$LD_LIBRARY_PATH" # Rserver' >> /etc/rbbt_environment
|
21
|
+
echo 'LD_RUN_PATH="$R_HOME/lib/:$LD_RUN_PATH" # Rserver' >> /etc/rbbt_environment
|
21
22
|
|
22
23
|
. /etc/rbbt_environment
|
@@ -6,43 +6,40 @@
|
|
6
6
|
# R packages
|
7
7
|
# ----------
|
8
8
|
|
9
|
-
|
9
|
+
R_install_packages(){
|
10
10
|
pkgs="'$1'"
|
11
11
|
shift
|
12
12
|
for p in $@; do
|
13
13
|
pkgs="$pkgs, '$p'"
|
14
14
|
done
|
15
|
-
echo "install.packages(c($pkgs), repos='http://cran.us.r-project.org')" | R --vanilla
|
15
|
+
echo "install.packages(c($pkgs), repos='http://cran.us.r-project.org')" | R --vanilla --quiet
|
16
16
|
}
|
17
17
|
|
18
|
-
|
18
|
+
R_biocLite(){
|
19
19
|
pkgs="'$1'"
|
20
20
|
shift
|
21
21
|
for p in $@; do
|
22
|
-
echo "
|
22
|
+
echo "BiocManager::install(c('$p'))" | R --vanilla --quiet
|
23
23
|
done
|
24
24
|
}
|
25
25
|
|
26
|
-
|
26
|
+
R_CMD_install(){
|
27
27
|
url=$1
|
28
28
|
name=$2
|
29
29
|
wget "$url" -O /tmp/R-pkg-"$name".tar.gz
|
30
30
|
R CMD INSTALL /tmp/R-pkg-"$name".tar.gz
|
31
31
|
}
|
32
32
|
|
33
|
-
R_install_packages
|
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'
|
33
|
+
R_install_packages 'tidyverse'
|
37
34
|
|
38
|
-
|
35
|
+
R_install_packages 'RJSONIO' 'XML' 'digest' 'gtable' 'reshape2' 'scales' 'proto'
|
39
36
|
|
40
|
-
R_install_packages
|
37
|
+
R_install_packages 'BiocManager'
|
38
|
+
R_biocLite Biobase
|
41
39
|
|
42
|
-
|
40
|
+
R_install_packages NMF Cairo drc gridSVG ggthemes mclust randomForest viper
|
43
41
|
|
44
42
|
R_install_packages pheatmap VennDiagram Hmisc pls gridSVG
|
45
|
-
R_install_packages tidyverse
|
46
43
|
|
47
44
|
R_install_packages UpSetR
|
48
45
|
|
@@ -51,3 +48,4 @@ R_biocLite limma viper
|
|
51
48
|
R_install_packages pROC txtplot
|
52
49
|
|
53
50
|
rm /tmp/R-pkg-*.tar.gz
|
51
|
+
|
@@ -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 openssl1.1-compat-dev openssl1.1-compat # openssl
|
6
|
+
apk add bash openssh-client wget curl rsync gnu-libiconv # Tools
|
7
|
+
|
8
|
+
echo $CUSTOM_SYSTEM_PACKAGES | sed 's/,/\n/g' | xargs apk add
|
9
|
+
|
10
|
+
gem install rbbt-util rbbt-sources
|
11
|
+
gem install RubyInline
|
12
|
+
|
13
|
+
gem install specific_install hoe minitest
|
14
|
+
gem specific_install -l https://github.com/mikisvaz/lockfile.git
|
15
|
+
gem specific_install -l https://github.com/mikisvaz/rubyinline.git
|
16
|
+
|
17
|
+
rm -Rf /usr/lib/ruby/gems/*/doc /usr/lib/ruby/gems/*/cache
|
18
|
+
|
19
|
+
grep rbbt_environment /etc/rbbt_environment || echo "[ -f ~/.rbbt/etc/environment ] && . ~/.rbbt/etc/environment" >> "/etc/rbbt_environment"
|
20
|
+
grep rbbt_environment /etc/profile || echo echo "source /etc/rbbt_environment" >> /etc/profile
|
@@ -0,0 +1,49 @@
|
|
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
|
+
echo $CUSTOM_SYSTEM_PACKAGES | sed 's/,/\n/g' | xargs apk add
|
8
|
+
|
9
|
+
gem install rbbt-util rbbt-sources
|
10
|
+
gem install RubyInline
|
11
|
+
|
12
|
+
gem install specific_install hoe minitest
|
13
|
+
gem specific_install -l https://github.com/mikisvaz/lockfile.git
|
14
|
+
gem specific_install -l https://github.com/mikisvaz/rubyinline.git
|
15
|
+
|
16
|
+
rm -Rf /usr/lib/ruby/gems/*/doc /usr/lib/ruby/gems/*/cache
|
17
|
+
|
18
|
+
grep rbbt_environment /etc/rbbt_environment || echo "[ -f ~/.rbbt/etc/environment ] && . ~/.rbbt/etc/environment" >> "/etc/rbbt_environment"
|
19
|
+
grep rbbt_environment /etc/profile || echo echo "source /etc/rbbt_environment" >> /etc/profile
|
20
|
+
|
21
|
+
# Main alpine setup
|
22
|
+
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
|
23
|
+
|
24
|
+
# Extended alpine setup
|
25
|
+
apk add openjdk17 R R-dev python3 python3-dev py3-pip ansible
|
26
|
+
|
27
|
+
apk add fontconfig fontconfig-dev harfbuzz fribidi harfbuzz-dev fribidi-dev jpeg jpeg-dev tiff tiff-dev cairo cairo-dev libxt-dev libxt
|
28
|
+
|
29
|
+
# Allow USER to install things globaly during bootstrap
|
30
|
+
chmod 777 -R /usr/lib/python*/site-packages
|
31
|
+
|
32
|
+
gem install pycall
|
33
|
+
|
34
|
+
export R_HOME=$(R RHOME)
|
35
|
+
export R_INCLUDE="$R_HOME/../../include/R"
|
36
|
+
cat >> /etc/rbbt_environment <<'EOF'
|
37
|
+
export R_HOME=$(R RHOME)
|
38
|
+
export R_INCLUDE="$R_HOME/../../include/R"
|
39
|
+
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:$R_HOME/lib"
|
40
|
+
export PATH="$PATH:$R_HOME/bin"
|
41
|
+
EOF
|
42
|
+
gem install rsruby -- --with-R-dir=$R_HOME --with-R-include=$R_INCLUDE
|
43
|
+
|
44
|
+
echo 'install.packages("Rserve", repos="http://www.rforge.net/")' | R --vanilla --quiet
|
45
|
+
gem install rserve-client
|
46
|
+
|
47
|
+
export JAVA_HOME=$(java -XshowSettings:properties -version 2>&1 > /dev/null | grep 'java.home' | cut -f 2 -d "=" | awk '{$1=$1};1')
|
48
|
+
echo $JAVA_HOME
|
49
|
+
gem install rjb
|
@@ -0,0 +1,22 @@
|
|
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 openssl openssl1.1-compat openssl1.1-compat-dev # Libs
|
5
|
+
apk add bash openssh-client wget curl rsync gnu-libiconv # Tools
|
6
|
+
|
7
|
+
echo $CUSTOM_SYSTEM_PACKAGES | sed 's/,/\n/g' | xargs apk add
|
8
|
+
|
9
|
+
gem install rbbt-util rbbt-sources
|
10
|
+
gem install RubyInline
|
11
|
+
|
12
|
+
gem install specific_install hoe minitest
|
13
|
+
gem specific_install -l https://github.com/mikisvaz/lockfile.git
|
14
|
+
gem specific_install -l https://github.com/mikisvaz/rubyinline.git
|
15
|
+
|
16
|
+
rm -Rf /usr/lib/ruby/gems/*/doc /usr/lib/ruby/gems/*/cache
|
17
|
+
|
18
|
+
grep rbbt_environment /etc/rbbt_environment || echo "[ -f ~/.rbbt/etc/environment ] && . ~/.rbbt/etc/environment" >> "/etc/rbbt_environment"
|
19
|
+
grep rbbt_environment /etc/profile || echo echo "source /etc/rbbt_environment" >> /etc/profile
|
20
|
+
|
21
|
+
# Main alpine setup
|
22
|
+
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,27 +3,28 @@
|
|
3
3
|
# USER RBBT BOOTSTRAP
|
4
4
|
# ===================
|
5
5
|
|
6
|
+
export RBBT_WORKFLOW_AUTOINSTALL=true
|
7
|
+
export RBBT_LOG=0
|
8
|
+
#export PIP_TARGET="/usr/local/python"
|
9
|
+
|
6
10
|
for workflow in $BOOTSTRAP_WORKFLOWS; do
|
7
11
|
rbbt workflow install $workflow
|
8
12
|
|
9
13
|
pip_requirements_file=$(rbbt_find.rb -w $workflow requirements.pip --nocolor)
|
10
|
-
|
14
|
+
test -z $pip_requirements_file || pip install -r $pip_requirements_file || pip install --break-system-packages -r $pip_requirements_file
|
11
15
|
unset pip_requirements_file
|
12
16
|
|
13
17
|
pip_requirements_file2=$(rbbt_find.rb -w $workflow requirements.pip2 --nocolor)
|
14
|
-
|
18
|
+
test -z $pip_requirements_file2 || pip install -r $pip_requirements_file2 || pip install --break-system-packages -r $pip_requirements_file2
|
15
19
|
unset pip_requirements_file2
|
16
20
|
|
17
21
|
pip_requirements_file3=$(rbbt_find.rb -w $workflow requirements.pip3 --nocolor)
|
18
|
-
|
22
|
+
test -z $pip_requirements_file3 || pip install -r $pip_requirements_file3 || pip install --break-system-packages -r $pip_requirements_file3
|
19
23
|
unset pip_requirements_file3
|
20
24
|
done
|
21
25
|
|
22
|
-
export RBBT_WORKFLOW_AUTOINSTALL=true
|
23
|
-
export RBBT_LOG=0
|
24
|
-
|
25
26
|
for workflow in $BOOTSTRAP_WORKFLOWS; do
|
26
27
|
echo "Bootstrapping $workflow on $BOOTSTRAP_CPUS CPUs"
|
27
|
-
|
28
|
+
test -d $HOME/.rbbt/tmp/ || mkdir -p $HOME/.rbbt/tmp/
|
28
29
|
rbbt workflow cmd $workflow bootstrap --config_keys "cpus $BOOTSTRAP_CPUS bootstrap" > $HOME/.rbbt/tmp/${workflow}.bootstrap.log
|
29
30
|
done
|
@@ -0,0 +1 @@
|
|
1
|
+
echo $CUSTOM_GEMS | sed 's/,/\n/g' | xargs gem install
|
@@ -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 rack \
|
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
|
@@ -4,22 +4,22 @@ echo "# Python conda " >> /etc/rbbt_environment
|
|
4
4
|
bash /tmp/miniconda.sh -b -p /usr/local/miniconda3
|
5
5
|
|
6
6
|
ln -s /usr/local/miniconda3/bin/conda /usr/local/bin/conda
|
7
|
-
echo '
|
7
|
+
echo 'PATH="/usr/local/miniconda3/bin/:$PATH"' >> /etc/rbbt_environment
|
8
8
|
|
9
9
|
conda create --yes -n python2 python=2.7 pip
|
10
10
|
|
11
11
|
conda create --yes -n python3 python=3.6 pip
|
12
12
|
|
13
|
-
|
14
|
-
|
13
|
+
chmod 777 -R /usr/local/miniconda3/
|
14
|
+
|
15
|
+
echo 'PATH="/usr/local/miniconda3/envs/python2/bin/:$PATH"' >> /etc/rbbt_environment
|
16
|
+
echo 'PATH="/usr/local/miniconda3/envs/python3/bin/:$PATH"' >> /etc/rbbt_environment
|
15
17
|
echo '' >> /etc/rbbt_environment
|
16
18
|
echo '# Setup conda environment' >> /etc/rbbt_environment
|
17
19
|
echo 'export CONDA_PKGS_DIRS=~/tmp/conda/pkgs' >> /etc/rbbt_environment
|
18
20
|
echo '. /usr/local/miniconda3/etc/profile.d/conda.sh' >> /etc/rbbt_environment
|
21
|
+
echo 'conda activate python3' >> /etc/rbbt_environment
|
19
22
|
|
20
23
|
rm -Rf /usr/local/miniconda3/pkgs
|
21
|
-
|
22
|
-
|
23
|
-
pip install ansible
|
24
|
+
. /etc/rbbt_environment
|
24
25
|
|
25
|
-
gem install pycall
|
@@ -5,10 +5,12 @@
|
|
5
5
|
|
6
6
|
_small_version=`echo $RUBY_VERSION | cut -f 1,2 -d.`
|
7
7
|
|
8
|
-
[ -d /
|
8
|
+
[ -d /usr/local/scr/ruby-install ] || mkdir -p /usr/local/src/ruby-install
|
9
9
|
|
10
10
|
_prewd="$(pwd)"
|
11
|
-
cd /
|
11
|
+
cd /usr/local/scr/ruby-install
|
12
|
+
|
13
|
+
gem list --no-versions > gem.list
|
12
14
|
|
13
15
|
wget https://cache.ruby-lang.org/pub/ruby/$_small_version/ruby-${RUBY_VERSION}.tar.gz -O "ruby.tar.gz"
|
14
16
|
tar -xvzf ruby.tar.gz
|
@@ -16,10 +18,16 @@ cd ruby-*/
|
|
16
18
|
./configure --prefix=/usr/local --enable-shared
|
17
19
|
make && make install
|
18
20
|
|
21
|
+
cd ..
|
22
|
+
|
23
|
+
for p in `cat gem.list`; do
|
24
|
+
/usr/local/bin/gem install $p
|
25
|
+
done
|
26
|
+
|
19
27
|
unset _small_version
|
20
28
|
|
21
29
|
cd "$_prewd"
|
22
|
-
rm -Rf /tmp/ruby-install
|
30
|
+
#rm -Rf /tmp/ruby-install
|
23
31
|
|
24
32
|
#\curl -sSL https://get.rvm.io | bash -s stable
|
25
33
|
#source /etc/profile.d/rvm.sh
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#!/bin/bash -x
|
2
|
+
|
3
|
+
# TOKYOCABINET INSTALL
|
4
|
+
# ===================
|
5
|
+
|
6
|
+
mkdir -p /opt/src/
|
7
|
+
cd /opt/src/
|
8
|
+
#wget http://fallabs.com/tokyocabinet/tokyocabinet-1.4.48.tar.gz -O "tokyocabinet.tar.gz"
|
9
|
+
wget "https://b2drop.bsc.es/index.php/s/5SP3wYCyNwFE2b3/download" -O "tokyocabinet.tar.gz"
|
10
|
+
tar -xvzf tokyocabinet.tar.gz
|
11
|
+
cd tokyocabinet-1.4.48
|
12
|
+
./configure --prefix=/usr/local
|
13
|
+
make > /tc_make.log
|
14
|
+
make install > /tc_make_install.log
|
15
|
+
gem install tokyocabinet
|
16
|
+
cd /
|
17
|
+
rm -Rf /opt/src/
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# Basic ubuntu setup
|
2
|
+
apt-get -y update
|
3
|
+
apt-get -y install software-properties-common
|
4
|
+
|
5
|
+
export DEBIAN_FRONTEND=noninteractive
|
6
|
+
|
7
|
+
apt-get -y install \
|
8
|
+
ruby ruby-dev \
|
9
|
+
git make gcc g++ cmake autotools-dev autoconf automake \
|
10
|
+
zlib1g-dev libbz2-dev libreadline-dev \
|
11
|
+
openssl \
|
12
|
+
libxml2-dev libfontconfig1-dev \
|
13
|
+
liblzma5 liblzma-dev libcurl4-openssl-dev \
|
14
|
+
build-essential zlib1g-dev libssl-dev libyaml-dev libffi-dev \
|
15
|
+
locales \
|
16
|
+
bash openssh-client wget curl rsync libtokyocabinet-dev
|
17
|
+
|
18
|
+
apt-get -y install \
|
19
|
+
python3 python3-pip python-is-python3
|
20
|
+
|
21
|
+
apt-get -y install \
|
22
|
+
r-base r-base-dev
|
23
|
+
|
24
|
+
gem install rbbt-util rbbt-sources
|
25
|
+
gem install RubyInline
|
26
|
+
|
27
|
+
gem install specific_install hoe minitest
|
28
|
+
gem specific_install -l https://github.com/mikisvaz/lockfile.git
|
29
|
+
gem specific_install -l https://github.com/mikisvaz/rubyinline.git
|
30
|
+
|
31
|
+
rm -Rf /usr/lib/ruby/gems/*/doc /usr/lib/ruby/gems/*/cache
|
32
|
+
|
33
|
+
grep rbbt_environment /etc/rbbt_environment || echo "[ -f ~/.rbbt/etc/environment ] && . ~/.rbbt/etc/environment" >> "/etc/rbbt_environment"
|
34
|
+
grep rbbt_environment /etc/profile || echo echo "source /etc/rbbt_environment" >> /etc/profile
|
35
|
+
|
36
|
+
|
37
|
+
echo $CUSTOM_SYSTEM_PACKAGES | sed 's/,/\n/g' | xargs apt-get -y install
|
@@ -1,70 +1,3 @@
|
|
1
|
-
#!/bin/bash -x
|
2
|
-
|
3
|
-
# INSTALL
|
4
|
-
# =======
|
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
|
67
|
-
|
68
1
|
# Basic system requirements
|
69
2
|
# -------------------------
|
70
3
|
apt-get -y update
|
@@ -73,7 +6,6 @@ apt-get -y install software-properties-common
|
|
73
6
|
apt-get -y update
|
74
7
|
apt-get -y update
|
75
8
|
DEBIAN_FRONTEND=noninteractive apt-get -y install \
|
76
|
-
vim \
|
77
9
|
wget \
|
78
10
|
libc6 \
|
79
11
|
time numactl xvfb \
|
@@ -87,6 +19,7 @@ DEBIAN_FRONTEND=noninteractive apt-get -y install \
|
|
87
19
|
tcsh gawk \
|
88
20
|
ansible \
|
89
21
|
pandoc \
|
22
|
+
locales \
|
90
23
|
libtbb-dev
|
91
24
|
|
92
25
|
#add-apt-repository ppa:george-edison55/cmake-3.x
|
@@ -98,6 +31,8 @@ apt-get -y install cmake
|
|
98
31
|
apt-get -y install \
|
99
32
|
libgmp-dev libboost-all-dev
|
100
33
|
|
34
|
+
apt-get install ruby ruby-dev
|
35
|
+
|
101
36
|
# This link was broken for some reason
|
102
37
|
rm /usr/lib/R/bin/Rserve
|
103
38
|
ln -s /usr/lib/R/site-library/Rserve/libs/Rserve /usr/lib/R/bin/Rserve
|
@@ -115,7 +50,8 @@ echo '_add_path "/usr/local/bin/"' >> /etc/rbbt_environment
|
|
115
50
|
echo 'export LC_ALL=C.UTF-8' >> /etc/rbbt_environment
|
116
51
|
|
117
52
|
|
118
|
-
. /etc/rbbt_environment
|
119
|
-
|
120
53
|
apt-get clean
|
121
54
|
rm -rf /var/lib/apt/lists/*
|
55
|
+
|
56
|
+
echo "[ -f ~/.rbbt/etc/environment ] && . ~/.rbbt/etc/environment" >> "/etc/rbbt_environment"
|
57
|
+
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.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rbbt-util
|
@@ -40,18 +40,28 @@ 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/R.sh
|
44
|
+
- share/provision_scripts/R_custom.sh
|
43
45
|
- share/provision_scripts/R_packages.sh
|
44
|
-
- share/provision_scripts/
|
46
|
+
- share/provision_scripts/alpine_basic_setup.sh
|
47
|
+
- share/provision_scripts/alpine_extended_setup.sh
|
48
|
+
- share/provision_scripts/alpine_setup.sh
|
45
49
|
- share/provision_scripts/bootstrap.sh
|
46
|
-
- share/provision_scripts/
|
50
|
+
- share/provision_scripts/custom_gems.sh
|
51
|
+
- share/provision_scripts/functions.sh
|
52
|
+
- share/provision_scripts/gem.sh
|
47
53
|
- share/provision_scripts/hacks.sh
|
48
|
-
- share/provision_scripts/
|
49
|
-
- share/provision_scripts/
|
50
|
-
- share/provision_scripts/
|
54
|
+
- share/provision_scripts/java.sh
|
55
|
+
- share/provision_scripts/migrate.sh
|
56
|
+
- share/provision_scripts/perl_custom.sh
|
57
|
+
- share/provision_scripts/python.sh
|
58
|
+
- share/provision_scripts/python_custom.sh
|
59
|
+
- share/provision_scripts/ruby_custom.sh
|
51
60
|
- share/provision_scripts/slurm_loopback.sh
|
52
|
-
- share/provision_scripts/
|
61
|
+
- share/provision_scripts/tokyocabinet.sh
|
62
|
+
- share/provision_scripts/ubuntu_basic_setup.sh
|
53
63
|
- share/provision_scripts/ubuntu_setup.sh
|
54
|
-
- share/provision_scripts/
|
64
|
+
- share/provision_scripts/user.sh
|
55
65
|
- share/provision_scripts/variables.sh
|
56
66
|
homepage: http://github.com/mikisvaz/rbbt-image
|
57
67
|
licenses:
|
@@ -72,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
72
82
|
- !ruby/object:Gem::Version
|
73
83
|
version: '0'
|
74
84
|
requirements: []
|
75
|
-
rubygems_version: 3.
|
85
|
+
rubygems_version: 3.5.23
|
76
86
|
signing_key:
|
77
87
|
specification_version: 4
|
78
88
|
summary: Build docker and Vagrant (VM) images
|
@@ -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
|
@@ -1,11 +0,0 @@
|
|
1
|
-
#!/bin/bash -x
|
2
|
-
|
3
|
-
# TOKYOCABINET INSTALL
|
4
|
-
# ===================
|
5
|
-
|
6
|
-
cd /tmp
|
7
|
-
wget http://fallabs.com/tokyocabinet/tokyocabinet-1.4.48.tar.gz -O "tokyocabinet.tar.gz"
|
8
|
-
tar -xvzf tokyocabinet.tar.gz
|
9
|
-
cd tokyocabinet-1.4.48
|
10
|
-
./configure --prefix=/usr/local
|
11
|
-
make && make install
|
File without changes
|
File without changes
|