rbbt-util 5.31.3 → 5.31.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/hpc/batch.rb +14 -9
- data/lib/rbbt/hpc/lsf.rb +2 -1
- data/lib/rbbt/resource/util.rb +1 -1
- data/lib/rbbt/workflow/step/accessor.rb +1 -0
- data/share/install/software/lib/install_helpers +6 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9627d833faf734e912d68d60714081cd8179b8f65de153842c2a77bc356e58ab
|
4
|
+
data.tar.gz: 4d75542d741d61732ddead0ab6295e97461e5cd4aa7b8baeb4436f78f875465d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7105097e07ee1da675b2ee4cc5fa7f7be61bd49051553a28ca39a829105fda3e08e684ea804928000863d83d67bdad3d462121ab23a379a5ba76d3ce4c74ccc5
|
7
|
+
data.tar.gz: ba67880edc6ecad00c8a06fa802fc56a035524a321ab31abe8d4cae07ea521ce641abd948731cd7da8f0582b8d5ea9cdea8bca3e9152acb070f379b35fd0a40d
|
data/lib/rbbt/hpc/batch.rb
CHANGED
@@ -11,30 +11,35 @@ module HPC
|
|
11
11
|
env_cmd = Misc.process_options options, :env_cmd
|
12
12
|
development = Misc.process_options options, :development
|
13
13
|
|
14
|
+
if contain = options[:contain]
|
15
|
+
contain = File.expand_path(contain)
|
16
|
+
env_cmd ||= ""
|
17
|
+
env_cmd << " TMPDIR='#{contain}/.rbbt/tmp' "
|
18
|
+
end
|
19
|
+
|
14
20
|
if options[:singularity]
|
15
21
|
|
16
22
|
group, user, user_group, scratch_group_dir, projects_group_dir = options.values_at :group, :user, :user_group, :scratch_group_dir, :projects_group_dir
|
17
23
|
|
18
24
|
singularity_img, singularity_opt_dir, singularity_ruby_inline = options.values_at :singularity_img, :singularity_opt_dir, :singularity_ruby_inline
|
19
25
|
|
20
|
-
singularity_cmd = %(singularity exec -e -B #{singularity_opt_dir}:/singularity_opt/ -B
|
26
|
+
singularity_cmd = %(singularity exec -e -B #{singularity_opt_dir}:/singularity_opt/ -B "#{singularity_ruby_inline}":"/.singularity_ruby_inline":rw )
|
21
27
|
|
22
|
-
if contain
|
23
|
-
contain = File.expand_path(contain)
|
28
|
+
if contain && options[:hardened]
|
24
29
|
singularity_cmd << %( -C -H "#{contain}" \
|
30
|
+
-B "/.singularity_ruby_inline":"#{contain}/.singularity_ruby_inline":rw
|
25
31
|
-B "#{options[:batch_dir]}" \
|
26
32
|
-B /scratch/tmp \
|
27
33
|
#{ group != user_group ? "-B /gpfs/projects/#{user_group}" : "" } \
|
28
34
|
-B #{scratch_group_dir} \
|
29
35
|
-B #{projects_group_dir} \
|
30
|
-
-B
|
36
|
+
-B /apps/ \
|
31
37
|
-B ~/git:"#{contain}/git":ro \
|
32
38
|
#{Open.exists?('~/.rbbt/software/opt/')? '-B ~/.rbbt/software/opt/:"/opt/":ro' : '' } \
|
33
39
|
-B ~/.rbbt:"#{contain}/home/":ro)
|
34
|
-
singularity_cmd << " #{singularity_img} "
|
35
40
|
end
|
36
|
-
|
37
|
-
|
41
|
+
|
42
|
+
singularity_cmd << " #{singularity_img} "
|
38
43
|
end
|
39
44
|
|
40
45
|
if env_cmd
|
@@ -170,7 +175,7 @@ EOF
|
|
170
175
|
batch_options[:wipe_container] ||= 'post'
|
171
176
|
end
|
172
177
|
|
173
|
-
if batch_options[:contain] && ! batch_options[:
|
178
|
+
if batch_options[:contain] && ! batch_options[:hardened]
|
174
179
|
options[:workdir_all] = batch_options[:contain]
|
175
180
|
end
|
176
181
|
|
@@ -304,7 +309,7 @@ module load singularity
|
|
304
309
|
mkdir -p "#{singularity_opt_dir}"
|
305
310
|
EOF
|
306
311
|
|
307
|
-
if contain
|
312
|
+
if contain && options[:hardened]
|
308
313
|
|
309
314
|
prepare_environment +=<<-EOF
|
310
315
|
# Prepare container for singularity
|
data/lib/rbbt/hpc/lsf.rb
CHANGED
@@ -7,7 +7,8 @@ module HPC
|
|
7
7
|
|
8
8
|
def self.batch_system_variables
|
9
9
|
<<-EOF
|
10
|
-
|
10
|
+
[[ -z $LSB_MAX_MEM_RUSAGE ]] || MAX_MEMORY=$LSB_MAX_MEM_RUSAGE
|
11
|
+
[[ -z $MAX_MEMORY ]] && let MAX_MEMORY="$(grep MemTotal /proc/meminfo|grep -o "[[:digit:]]*") / 1024"
|
11
12
|
BATCH_JOB_ID=$LSF_JOBID
|
12
13
|
BATCH_SYSTEM=LSF
|
13
14
|
EOF
|
data/lib/rbbt/resource/util.rb
CHANGED
@@ -33,7 +33,7 @@ end
|
|
33
33
|
|
34
34
|
module Resource
|
35
35
|
def set_software_env(software_dir)
|
36
|
-
software_dir.find_all.reverse.each do |software_dir|
|
36
|
+
software_dir.opt.find_all.collect{|d| d.annotate(File.dirname(d)) }.reverse.each do |software_dir|
|
37
37
|
next unless software_dir.exists?
|
38
38
|
software_dir = File.expand_path(software_dir)
|
39
39
|
opt_dir = File.join(software_dir, 'opt')
|
@@ -99,6 +99,7 @@ class Step
|
|
99
99
|
if String === value && File.exists?(value)
|
100
100
|
Open.ln_s(value, path)
|
101
101
|
else
|
102
|
+
value = value.collect{|v| v = "#{v}" if Path === v; v }if Array === value
|
102
103
|
value = "#{value}" if Path === value
|
103
104
|
Open.write(path + '.yaml', value.to_yaml)
|
104
105
|
end
|
@@ -147,6 +147,8 @@ get_git(){
|
|
147
147
|
git pull origin master
|
148
148
|
git rebase master
|
149
149
|
git stash apply
|
150
|
+
git submodule init
|
151
|
+
git submodule update
|
150
152
|
fi
|
151
153
|
else
|
152
154
|
if [ $version == 'none' ];then
|
@@ -154,6 +156,10 @@ get_git(){
|
|
154
156
|
else
|
155
157
|
git clone --recursive "$url" "$name" -b $version
|
156
158
|
fi
|
159
|
+
|
160
|
+
cd "$name"
|
161
|
+
git submodule init
|
162
|
+
git submodule update
|
157
163
|
fi
|
158
164
|
|
159
165
|
clean_build
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.31.
|
4
|
+
version: 5.31.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-03-
|
11
|
+
date: 2021-03-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|