-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
51 lines (46 loc) · 1.82 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: 'load UWLCM Singularity image'
description: 'set env var SI to point to the image location'
inputs:
path:
description: 'Where to put the image'
required: true
tag:
description: 'Image tag'
required: true
default: 'ubuntu_20_04_cuda_11_4'
runs:
using: "composite"
steps:
- name: Install Singularity
#when installed from this action, .SIF is always converted to sandbox (could be related to: https://githubmemory.com/repo/hpcng/singularity/issues/6065)
uses: eWaterCycle/setup-singularity@v7
with:
singularity-version: 3.8.3
#apt installation following https://sylabs.io/guides/3.0/user-guide/installation.html, but this is a too old version and uninstalls python-is-python3
# run: |
# wget -O- http://neuro.debian.net/lists/focal.de-fzj.libre | sudo tee /etc/apt/sources.list.d/neurodebian.sources.list
# sudo apt-key adv --recv-keys --keyserver hkps://keyserver.ubuntu.com 0xA5D32F012649A5A9
# sudo apt-get update
# sudo apt-get install -y singularity-container
- name: Cache UWLCM Singularity image
id: cache_singularity
uses: actions/cache@v4
with:
path: '${{ inputs.path }}/uwlcm_${{ inputs.tag }}.sif'
key: '${{ inputs.tag }}'
- name: Download UWLCM Singularity image
shell: bash
# if: steps.cache_singularity.outputs.cache-hit != 'true'
run: |
[ "${{steps.cache_singularity.outputs.cache-hit}}" != "true" ] && \
{
mkdir '${{ inputs.path }}';
singularity pull --disable-cache --dir '${{ inputs.path }}' library://pdziekan/default/uwlcm:${{ inputs.tag }};
} \
|| \
true
# disable Singularity cache, we cache manually
- name: Set friendly Singularity image name
uses: allenevans/[email protected]
with:
SI: '${{ inputs.path }}/uwlcm_${{ inputs.tag }}.sif'