fix singularity

This commit is contained in:
panda 2020-03-14 14:46:51 +01:00
parent a4f6ca0be1
commit 2e7b7c48b4
2 changed files with 47 additions and 24 deletions

19
debug/test.yml Normal file
View file

@ -0,0 +1,19 @@
- hosts: all
hosts: thismachine
connection: local
tasks:
- name: debug through ansible.env
debug: var=ansible_env.HOME
- name: ansible_os_family is
debug: var=ansible_os_family
- name: ansible_distribution is
debug: var=ansible_distribution
- name: ansible_distribution_release is
debug: var=ansible_distribution_release
- name: ansible_distribution_version is
debug: var=ansible_distribution_version

View file

@ -12,38 +12,42 @@
- libssl-dev
- build-essential
- name:
shell: mkdir singularity_build
- name: create workfolder {{ ansible_env.HOME }}/singularity_build
shell: mkdir {{ ansible_env.HOME }}/singularity_build
- name:
shell: cd singularity_build
#- name:
# shell: cd {{ ansible_env.HOME }}/singularity_build
- name:
shell: wget https://dl.google.com/go/go{{ singularity_go_ver }}.linux-amd64.tar.gz
- name: download go
shell: wget -O {{ ansible_env.HOME }}/singularity_build/go{{ singularity_go_ver }}.linux-amd64.tar.gz https://dl.google.com/go/go{{ singularity_go_ver }}.linux-amd64.tar.gz
- name:
shell: tar -C /usr/local -xzf go{{ singularity_go_ver }}.linux-amd64.tar.gz
- name: decompress go in /usr/local
shell: tar -C /usr/local -xzf {{ ansible_env.HOME }}/singularity_build/go{{ singularity_go_ver }}.linux-amd64.tar.gz
- name:
shell: wget https://github.com/sylabs/singularity/releases/download/v{{ singularity_ver }}/singularity-{{ singularity_ver }}.tar.gz
- name: download singularity
shell: wget -O {{ ansible_env.HOME }}/singularity_build/singularity-{{ singularity_ver }}.tar.gz https://github.com/sylabs/singularity/releases/download/v{{ singularity_ver }}/singularity-{{ singularity_ver }}.tar.gz
- name:
shell: tar -xvzf singularity-{{ singularity_ver }}.tar.gz
- name: decompress singularity
shell: tar -C {{ ansible_env.HOME }}/singularity_build/ -xvzf {{ ansible_env.HOME }}/singularity_build/singularity-{{ singularity_ver }}.tar.gz
- name:
shell: cd singularity/
#- name:
# shell: cd {{ ansible_env.HOME }}/singularity_build/singularity/
- name:
shell: PATH=$PATH:/usr/local/go/bin/
#- name:
# shell: PATH=$PATH:/usr/local/go/bin/
- name:
shell: ./mconfig -s --without-network -p /opt/singularity-{{ singularity_ver }}/
- name: configure singularity for build
shell: "PATH=$PATH:/usr/local/go/bin/ && cd /root/singularity_build/singularity/ && {{ ansible_env.HOME }}/singularity_build/singularity/./mconfig -s --without-network -p /opt/singularity-{{ singularity_ver }}/"
- name:
shell: cd builddir/
#- name:
# shell: cd {{ ansible_env.HOME }}/singularity_build/singularity/builddir/
- name:
shell: make
- name: build singularity
shell: make -C {{ ansible_env.HOME }}/singularity_build/singularity/builddir/
- name: install singularity
shell: make install -C {{ ansible_env.HOME }}/singularity_build/singularity/builddir/
- name: link singularity in /bin/singularity
shell: ln -s /opt/singularity-{{ singularity_ver }}/bin/singularity /bin/singularity
- name:
shell: make install