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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/rbbt/hpc.rb +13 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7930503c8e4d7eec13b822a566fb5787a1d0ed01d06a5a2eb930f16b17677d6c
4
- data.tar.gz: 5426ee8f3b7327de2d0dc670eca81785b8f6890572ace5b7e547b411e55cd8bd
3
+ metadata.gz: 1c25e0ed9f390b6cfe9f13d8a25f9818f01ebeb18721bffe457f2addf13519c3
4
+ data.tar.gz: 5ef61ec1c11a6993a37043004306c4a85a96d27dd6e391fdb0a32ecf882fb695
5
5
  SHA512:
6
- metadata.gz: f8385922836329838ef344bdb1c7b1113e74e7ae468c168fc5490cf6b6c1fd805a16f90e36da3580ea5037400aeced8651cc19053fe145835634d4bae5d4f863
7
- data.tar.gz: ecaadd61bb9e58e62431d148a6309a0d477ead2a6f0e6beee2554caf4072da01b2b4895e2676e5e88995c62edba9c273383ad024cedd4ad76bf3dc3d9579d854
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'])) if group.nil?
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
- EOF
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")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.26.99
4
+ version: 5.26.101
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez