Apptainer 1.4.1 (1.4.0 introduces the feature, but contains a bug for ARM64 which is not v8 for docker-derived containrs) apptainer build now supports the --arch arm64 option, allowing for trivial creation of aarch64 container definition files.
This is not striclty required due to the availability of fakeroot, but may be useful in some cases (i.e. when apptainer 1.4.0 is installed on Bede).
This could/should be added to the aarch64 apptianer docs page.
With:
apptainer >= 1.4.1
binfmt_misc (via qemu-user-static on debian/ubuntu)
- on an x86_64 host
A docker image such as nvcr.io/nvidia/pytorch:25.04-py3 (i.e. the April 2025 nvidia pytorch image) which provides x86_64 and aarch64 images can be converted to an apptainer image file on x86
$ apptainer build --arch arm64 pytorch-25.04-aarch64.sif docker://nvcr.io/nvidia/pytorch:25.04-py3
This may require exporting APPTAINER_TMPDIR to a location other than /tmp on systems with (relatively) small /tmp.
Once converted (which will take a while), the image file can be copied onto Bede via scp or similar (which may also take a while as the image will be 10GB in this example)
$ scp pytorch-25.04-aarch64.sif bede.dur.ac.uk:/nobackup/<PROJECT>/
and then used on a gh node.
$ apptainer exec --nv pytorch-25.04-aarch64.sif python3 -c "import torch;print(torch.__version__); print(torch.cuda.is_available());print(torch.cuda.get_arch_list());"
2.7.0a0+79aa17489c.nv25.04
True
['sm_80', 'sm_86', 'sm_90', 'sm_100', 'sm_120', 'compute_120']
Apptainer 1.4.1 (1.4.0 introduces the feature, but contains a bug for ARM64 which is not v8 for docker-derived containrs)
apptainer buildnow supports the--arch arm64option, allowing for trivial creation of aarch64 container definition files.This is not striclty required due to the availability of fakeroot, but may be useful in some cases (i.e. when apptainer 1.4.0 is installed on Bede).
This could/should be added to the aarch64 apptianer docs page.
With:
apptainer>= 1.4.1binfmt_misc(viaqemu-user-staticon debian/ubuntu)A docker image such as
nvcr.io/nvidia/pytorch:25.04-py3(i.e. the April 2025 nvidia pytorch image) which provides x86_64 and aarch64 images can be converted to an apptainer image file on x86$ apptainer build --arch arm64 pytorch-25.04-aarch64.sif docker://nvcr.io/nvidia/pytorch:25.04-py3This may require exporting
APPTAINER_TMPDIRto a location other than/tmpon systems with (relatively) small/tmp.Once converted (which will take a while), the image file can be copied onto Bede via
scpor similar (which may also take a while as the image will be 10GB in this example)$ scp pytorch-25.04-aarch64.sif bede.dur.ac.uk:/nobackup/<PROJECT>/and then used on a gh node.