Skip to content

Commit

Permalink
allow interactive tools on normal workers for oubb training
Browse files Browse the repository at this point in the history
  • Loading branch information
mira-miracoli authored Sep 9, 2024
1 parent 305c60e commit 656cc9d
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions files/galaxy/tpv/interactive_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,14 @@ tools:
- if: not user
fail: |
Interactive tools require registration. Please log-in or register on https://usegalaxy.eu/login
- if: user is not None
execute: |
training_roles = [r.name for r in user.all_roles() if not r.deleted and "training" in r.name]
training_expr = " || ".join(['(GalaxyGroup == "%s")' % role for role in training_roles])
training_labels = '"' + ", ".join(training_roles) + '"'
entity.params['requirements'] = '(GalaxyGroup == "compute") || (%s)' % training_expr if oubb in training_expr else '(GalaxyGroup == "interactive")'
entity.params['+Group'] = training_labels
entity.params['accounting_group_user'] = str(user.id)
interactive_tool_gpu:
cores: 1
Expand Down

0 comments on commit 656cc9d

Please sign in to comment.