forked from lima-vm/lima
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apptainer.yaml
39 lines (38 loc) · 1.48 KB
/
apptainer.yaml
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
# Example to use Apptainer instead of containerd & nerdctl
# $ limactl start ./apptainer.yaml
# $ limactl shell apptainer apptainer run -u -B $HOME:$HOME docker://alpine
# Fedora provides Apptainer in the default dnf.
# Ubuntu does not seem to provide Apptainer in the default apt.
images:
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/37/Cloud/x86_64/images/Fedora-Cloud-Base-37-1.7.x86_64.qcow2"
arch: "x86_64"
digest: "sha256:b5b9bec91eee65489a5745f6ee620573b23337cbb1eb4501ce200b157a01f3a0"
- location: "https://download.fedoraproject.org/pub/fedora/linux/releases/37/Cloud/aarch64/images/Fedora-Cloud-Base-37-1.7.aarch64.qcow2"
arch: "aarch64"
digest: "sha256:cc8b0f49bc60875a16eef65ad13e0e86ba502ba3585cc51146f11f4182a628c0"
mounts:
- location: "~"
- location: "/tmp/lima"
writable: true
containerd:
system: false
user: false
provision:
- mode: system
script: |
#!/bin/bash
set -eux -o pipefail
command -v apptainer >/dev/null 2>&1 && exit 0
dnf -y install apptainer
# See https://fedoraproject.org/wiki/Features/tmp-on-tmpfs
echo "APPTAINER_TMPDIR=/var/tmp" > /etc/profile.d/apptainer.sh
echo "export APPTAINER_TMPDIR" >> /etc/profile.d/apptainer.sh
probes:
- script: |
#!/bin/bash
set -eux -o pipefail
if ! timeout 30s bash -c "until command -v apptainer >/dev/null 2>&1; do sleep 3; done"; then
echo >&2 "apptainer is not installed yet"
exit 1
fi
hint: See "/var/log/cloud-init-output.log" in the guest