rbbt-util 5.26.99 → 5.26.101
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.rb +13 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c25e0ed9f390b6cfe9f13d8a25f9818f01ebeb18721bffe457f2addf13519c3
|
4
|
+
data.tar.gz: 5ef61ec1c11a6993a37043004306c4a85a96d27dd6e391fdb0a32ecf882fb695
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43c13e02b198f133a37f8368ac53471ddd456fb6267c902c1acc2c100c6cfd9322002d216e305b21c1e44745d858fe9d18ee782b39cc7a7a94527c010df729fc
|
7
|
+
data.tar.gz: dce15b38e52af3e5acc274418ef7cdeb9ea1e5b454ebd1ae0e4045182a4585694b23e33ae61876e28f65e8d57ae7100609d70e2abbca7309876a9782a5ea2576
|
data/lib/rbbt/hpc.rb
CHANGED
@@ -18,8 +18,8 @@ module Marenostrum
|
|
18
18
|
singularity = options.delete :singularity
|
19
19
|
contain = options.delete :contain
|
20
20
|
sync = options.delete :sync
|
21
|
+
user_group = options.delete :user_group
|
21
22
|
contain_and_sync = options.delete :contain_and_sync
|
22
|
-
group = options.delete :user_group
|
23
23
|
wipe_container = options.delete :wipe_container
|
24
24
|
copy_image = options.delete :copy_image
|
25
25
|
exclusive = options.delete :exclusive
|
@@ -142,7 +142,7 @@ mkdir -p "$SINGULARITY_RUBY_INLINE"
|
|
142
142
|
|
143
143
|
if contain
|
144
144
|
user = ENV['USER'] || `whoami`.strip
|
145
|
-
group = File.basename(File.dirname(ENV['HOME']))
|
145
|
+
group = File.basename(File.dirname(ENV['HOME']))
|
146
146
|
scratch_group_dir = File.join('/gpfs/scratch/', group)
|
147
147
|
projects_group_dir = File.join('/gpfs/projects/', group)
|
148
148
|
|
@@ -173,8 +173,16 @@ echo "user_scratch: $CONTAINER_DIR/scratch/#{user}/{PKGDIR}/{TOPLEVEL}/{SUBPATH}
|
|
173
173
|
|
174
174
|
[[ -a "$CONTAINER_DIR/projects" ]] || ln -s '#{projects_group_dir}' "$CONTAINER_DIR/projects"
|
175
175
|
[[ -a "$CONTAINER_DIR/scratch" ]] || ln -s '#{scratch_group_dir}' "$CONTAINER_DIR/scratch"
|
176
|
-
|
177
|
-
|
176
|
+
EOF
|
177
|
+
|
178
|
+
if group != user_group
|
179
|
+
env +=<<-EOF
|
180
|
+
|
181
|
+
# Add user_group search_path
|
182
|
+
echo "#{user_group}: /gpfs/projects/#{user_group}/{PKGDIR}/{TOPLEVEL}/{SUBPATH}" >> $CONTAINER_DIR/.rbbt/etc/search_paths
|
183
|
+
EOF
|
184
|
+
end
|
185
|
+
|
178
186
|
if inputs_dir
|
179
187
|
env +=<<-EOF
|
180
188
|
|
@@ -213,6 +221,7 @@ EOF
|
|
213
221
|
-B ~/git:"$CONTAINER_DIR/git":ro \
|
214
222
|
-B ~/.rbbt/software/opt/:"/opt/":ro \
|
215
223
|
-B ~/.rbbt:"$CONTAINER_DIR/home/":ro \
|
224
|
+
#{ group != user_group ? "-B /gpfs/projects/#{user_group}" : "" } \
|
216
225
|
-B #{scratch_group_dir} \
|
217
226
|
-B #{projects_group_dir} \
|
218
227
|
"$SINGULARITY_IMG")
|