1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: Apache-2.0
5 - name: Install Singularity dependencies
14 - name: Create Singularity build directory
16 ansible.builtin.tempfile:
19 prefix: singularity-build-
20 register: singularity_build
22 - name: Clone Singularity
25 repo: "{{ compute_singularity_url }}"
26 dest: "{{ singularity_build.path }}"
27 version: "v{{ compute_singularity_version }}"
29 - name: Create Singularity VERSION file
33 {{ compute_singularity_version }}
34 dest: "{{ singularity_build.path }}/VERSION"
39 ansible.builtin.unarchive:
40 src: "https://storage.googleapis.com/golang/go{{ compute_go_version }}.linux-amd64.tar.gz"
41 dest: "{{ singularity_build.path }}"
44 - name: Build Singularity
46 ansible.builtin.command:
48 chdir: "{{ singularity_build.path }}"
50 GOPATH: "{{ singularity_build.path }}/GOPATH"
51 PATH: "{{ singularity_build.path }}/go/bin:{{ ansible_env.PATH }}"
53 - ./mconfig --prefix=/opt/singularity
54 - env -C builddir make
56 - name: Install Singularity
57 ansible.builtin.command:
59 chdir: "{{ singularity_build.path }}/builddir"
61 - name: Clean Singularity build directory
63 path: "{{ singularity_build.path }}"
66 - name: Add Singularity commands to PATH
69 src: "/opt/singularity/bin/{{ item }}"
70 dest: "/usr/local/bin/{{ item }}"
75 - name: Configure Singularity mksquashfs mem
76 ansible.builtin.lineinfile:
78 path: /opt/singularity/etc/singularity/singularity.conf
79 regexp: "^ *mksquashfs +mem *="
80 line: "mksquashfs mem = {{ compute_mksquashfs_mem }}"
81 when: compute_mksquashfs_mem is defined