Skip to content

Commit

Permalink
Try adding singularity
Browse files Browse the repository at this point in the history
  • Loading branch information
dometto committed Oct 1, 2024
1 parent 1936fce commit 974471c
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 2 deletions.
2 changes: 2 additions & 0 deletions galaxysrv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
roles:
- role: geerlingguy.docker
when: not _molecule_active and _galaxy_jobs_docker
- role: usegalaxy_eu.apptainer
when:
- role: uusrc.general.nginx_reverse_proxy
vars:
nginx_reverse_proxy_locations: "{{ galaxy_nginx_vhost_config }}"
Expand Down
2 changes: 2 additions & 0 deletions requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ roles:
version: 1.1.2
- src: galaxyproject.postgresql_objects
version: 1.2.0
- src: usegalaxy_eu.apptainer
version: 0.0.2
- src: geerlingguy.docker
version: 6.1.0

Expand Down
10 changes: 10 additions & 0 deletions templates/galaxy/config/container_resolvers_conf.yml.j2
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
- type: cached_explicit_singularity
cache_directory: "{{ galaxy_mutable_data_dir }}/cache/singularity/explicit/"
- type: cached_mulled_singularity
cache_directory: "{{ galaxy_mutable_data_dir }}/cache/singularity/mulled/"
- type: mulled_singularity
auto_install: False
cache_directory: "{{ galaxy_mutable_data_dir }}/cache/singularity/mulled/"
- type: build_mulled_singularity
auto_install: False
cache_directory: "{{ galaxy_mutable_data_dir }}/cache/singularity/built/"
16 changes: 14 additions & 2 deletions templates/galaxy/config/job_conf.xml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,17 @@
<param id="pulsar_config">/srv/galaxy/config/pulsar_app.yml</param>
</plugin>
</plugins>
<destinations default="{{ 'docker_dispatch' if _galaxy_jobs_docker else 'local' }}">
<destinations default="{{ _galaxy_jobs_default }}">
<destination id="local" runner="local"/>
{% if _galaxy_jobs_singularity %}
<destination id="singularity" runner="local">
<param id="singularity_volumes">$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$job_directory:rw,{{ galaxy_data_dir }}:rw</param>
<param id="singularity_enabled">true</param>
<env id="LC_ALL">C</env>
<env id="APPTAINER_CACHEDIR">/tmp/singularity</env>
<env id="APPTAINER_TMPDIR">/tmp</env>
</destination>
{% endif %}
{% if _galaxy_jobs_docker %}
<destination id="docker_local" runner="{{ 'pulsar' if _galaxy_jobs_pulsar_embedded else 'local' }}">
<param id="docker_enabled">true</param>
Expand All @@ -22,11 +31,14 @@
<env id="REQUESTS_CA_BUNDLE">/etc/ssl/certs/ca-certificates.crt</env>
{% endif %}
</destination>
{% endif %}
<destination id="docker_dispatch" runner="dynamic">
<param id="type">docker_dispatch</param>
<param id="docker_destination_id">docker_local</param>
<param id="default_destination_id">local</param>
</destination>
{% endif %}
</destinations>
<tools>
<tool class="local" destination="local" />
</tools>
</job_conf>
3 changes: 3 additions & 0 deletions vars/galaxy_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ galaxy_config_templates:
dest: "{{ galaxy_config_dir }}/job_conf.xml"
- src: templates/galaxy/config/pulsar_app.yml.j2
dest: "{{ galaxy_config_dir }}/pulsar_app.yml"
- src: templates/galaxy/config/container_resolvers_conf.yml.j2
dest: "{{ galaxy_config_dir }}/container_resolvers_conf.yml"
postgresql_objects_users:
- name: galaxy
password: null
Expand All @@ -43,6 +45,7 @@ galaxy_configuration:
job_config_file: "{{ galaxy_config_dir }}/job_conf.xml"
tool_config_file: "{{ galaxy_config_dir }}/tool_conf.xml"
user_preferences_extra_conf_path: "{{ galaxy_config_dir }}/user_preferences_extra_conf.yml"
container_resolvers_config_file: "{{ galaxy_config_dir }}/container_resolvers_conf.yml"
interactivetools_enable: "{{ _galaxy_use_interactive_tools }}"
interactivetools_map: "{{ _galaxy_use_interactive_tools | ternary(gie_proxy_sessions_path, omit) }}"
galaxy_infrastructure_url: "{{ _galaxy_local_address }}"
Expand Down
3 changes: 3 additions & 0 deletions vars/src_galaxy_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@ _galaxy_custom_repo_branch: "{{ src_galaxy_custom_repo_branch | default('main',
_galaxy_api_exposed: "{{ src_galaxy_api_exposed | default(true, true) }}"
_galaxy_use_interactive_tools: "{{ src_galaxy_interactive_tools | default(true, true) | bool }}"
_galaxy_server_fqdn: "{{ workspace_fqdn | default('localhost', true) }}"

_galaxy_jobs_default: "{{ src_galaxy_jobs_default | default('local', true) }}"
_galaxy_jobs_singularity: "{{ src_galaxy_jobs_singularity | default(true, false) | bool ) }}"
_galaxy_jobs_docker: "{{ _galaxy_use_interactive_tools or (src_galaxy_jobs_docker | default(true, false) | bool ) }}"
_galaxy_jobs_pulsar_embedded: "{{ src_galaxy_pulsar_embedded | default(_galaxy_use_interactive_tools, true) | bool }}"

Expand Down

0 comments on commit 974471c

Please sign in to comment.