Exercise 1: Installation Process Apptainer not successful
JannisAnderson opened this issue · comments
I am using Ubuntu (Ubuntu 22.04.1 LTS) via WSL on my windows laptop. After repeating the steps to install Apptainer in the system_setup.ipynb Notebook several times, I am still unable to successfully run the lolcow test case.
I am able to pull the test file with apptainer pull docker://ghcr.io/apptainer/lolcow
but running it leads to the following:
jannisand@JannYoga:~/apptainer$ apptainer run lolcow_latest.sif
WARNING: failed to set O_CLOEXEC flags on image
WARNING: failed to set O_CLOEXEC flags on image
ERROR : Failed to set securebits: Invalid argument
Using sudo
leads to another issue:
jannisand@JannYoga:~/apptainer$ sudo apptainer run lolcow_latest.sif
WARNING: failed to set O_CLOEXEC flags on image
WARNING: failed to set O_CLOEXEC flags on image
FATAL: container creation failed: mount hook function failure: hook function for tag sessiondir returns error: while mounting /usr/local/var/apptainer/mnt/session/mountinfo to /proc/self/mountinfo: no such file or directory
Using the windows file explorer, I have confirmed that /usr/local/var/apptainer/mnt/session/mountinfo
exists, though its size is 0 KB. The /proc/self/mountinfo
file, however, does not exist. Creating a copy of the existing file to the missing directory does not fix the issue. I have tried updating everything, including Ubuntu (sudo apt update
, sudo apt upgrade
, sudo apt dist-upgrade
, sudo do-release-upgrade
) but to no avail.
I have found following solution microsoft/WSL#4278 (comment) online, however I am not sure what script User Eddiiie is suggesting to edit to CAPSH=/bin/bash
and have therefore not been able to test it.
Hi Jannis,
thanks for reporting this issue. Running Singularity/Apptainer on WSL requires WSL 2. Can you check your WSL version?
Best, Andre
Hi Andre,
That solved the issue! I set the version of the WSL to 2, which required enabling the virtual machine platform with dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
, installing the Linux kernel update package, and enabling virtualization in the BIOS (as described in the link).
Thanks!
Jannis
Great that you made it work and thanks for reporting the detailed steps of your solution!