Skip to content

Commit 716d979

Browse files
authored
Merge pull request #1001 from EESSI/ocaisa-patch-1
Update install_apptainer_ubuntu.sh to fix ci
2 parents 01b2e0f + ffc1005 commit 716d979

File tree

1 file changed

+7
-24
lines changed

1 file changed

+7
-24
lines changed

install_apptainer_ubuntu.sh

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,13 @@
22

33
set -e
44

5-
# see https://github.com/apptainer/singularity/issues/5390#issuecomment-899111181
6-
sudo apt-get install alien
7-
alien --version
8-
epel_subdir="pub/epel/8"
9-
apptainer_rpm=$(curl --silent -L https://dl.fedoraproject.org/${epel_subdir}/Everything/x86_64/Packages/a/ | grep 'apptainer-[0-9]' | sed 's/.*\(apptainer[0-9._a-z-]*.rpm\).*/\1/g')
10-
curl -OL https://dl.fedoraproject.org/${epel_subdir}/Everything/x86_64/Packages/a/${apptainer_rpm}
11-
sudo alien -d ${apptainer_rpm}
12-
sudo apt install ./apptainer*.deb
13-
# No unpriviledged user name spaces in Ubuntu 23.10+
14-
ubuntu_version=$(lsb_release -r | awk '{print $2}')
15-
if [[ $(echo -e "$ubuntu_version\n23.10" | sort -V | head -n 1) == "23.10" ]]; then
16-
sudo tee /etc/apparmor.d/apptainer << 'EOF'
17-
# Permit unprivileged user namespace creation for apptainer starter
18-
abi <abi/4.0>,
19-
include <tunables/global>
20-
profile apptainer /usr/libexec/apptainer/bin/starter{,-suid}
21-
flags=(unconfined) {
22-
userns,
23-
# Site-specific additions and overrides. See local/README for details.
24-
include if exists <local/apptainer>
25-
}
26-
EOF
27-
sudo systemctl reload apparmor
28-
fi
5+
sudo apt update
6+
sudo apt install -y software-properties-common
7+
8+
sudo add-apt-repository -y ppa:apptainer/ppa
9+
sudo apt update
10+
sudo apt install -y apptainer-suid
11+
2912
apptainer --version
3013
# also check whether 'singularity' command is still provided by Apptainer installation
3114
singularity --version

0 commit comments

Comments
 (0)