Skip to content

Commit

Permalink
allow oubb ITs on training VM and IT VMs
Browse files Browse the repository at this point in the history
  • Loading branch information
mira-miracoli committed Sep 9, 2024
1 parent 656cc9d commit f293115
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions files/galaxy/tpv/interactive_tools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ tools:
params:
docker_volumes: $defaults
container_monitor_result: callback
submit_requirements: 'GalaxyDockerHack == True && GalaxyGroup == "interactive"'
scheduling:
require:
- docker
Expand All @@ -18,12 +17,11 @@ tools:
- 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)
oubb_roles = [r for r in training_roles if "oubb" in r]
if oubb_roles:
# If there is an 'oubb' role, set the submit requirements accordingly
training_expr = 'GalaxyGroup == "%s"' % oubb_roles[0]
params['submit_requirements'] = 'GalaxyDockerHack == True && GalaxyGroup == "interactive" || %s' % training_expr
interactive_tool_gpu:
cores: 1
mem: 4
Expand Down

0 comments on commit f293115

Please sign in to comment.