Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Try adding singularity #23

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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: _galaxy_jobs_singularity
- 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 @@ -11,6 +11,8 @@ roles:
version: 1.2.0
- src: geerlingguy.docker
version: 6.1.0
- src: usegalaxy_eu.apptainer
version: 0.0.2

collections:
- name: community.general
Expand Down
26 changes: 26 additions & 0 deletions templates/galaxy/config/job_conf.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,32 @@ execution:
docker_destination_id: docker_local
default_destination_id: local

singularity:
singularity_volumes: "$galaxy_root:ro,$tool_directory:ro,$working_directory:rw,$job_directory:rw,{{ galaxy_mutable_data_dir }}:rw"
runner: local_runner
singularity_enabled: true
container_resolvers:
- 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/"
env:
# Ensuring a consistent collation environment is good for reproducibility.
- name: LC_ALL
value: C
# The cache directory holds the docker containers that get converted
- name: APPTAINER_CACHEDIR
value: /tmp/singularity
# Apptainer uses a temporary directory to build the squashfs filesystem
- name: APPTAINER_TMPDIR
value: /tmp

tools:
- class: local # these special tools that aren't parameterized for remote execution - expression tools, upload, etc
environment: local_env
2 changes: 1 addition & 1 deletion vars/src_galaxy_vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ _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_singularity: "{{ src_galaxy_jobs_singularity | default(false, 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 }}"

# Build the final lists of tool and workflow installation files
_galaxy_tool_files: "{{ src_galaxy_tool_files | default('', true) | split(',') | select() + _galaxy_default_tool_files_list }}" # select() necessary because split on the default '' yields ['']
Expand Down
Loading