/LimaVM_nf-core_apptainer

A virtual machine for Lima to run nf-core/Nextflow/Apptainer on a macOS host.

MIT LicenseMIT

nf-core header

LimaVM: nf-core/apptainer

A virtual machine for Lima to run nf-core/Nextflow/Apptainer on a macOS host.



About

Systems that are used for processing sensitive genomic information are typically restricted from freely accessing the internet for security concerns. This means that pipelines and their required dependencies need to be downloaded on a different computer and must subsequently be transferred. Ideally, both systems would share the same architecture and operating system, but in practice this is not guaranteed. For example, this virtual machine has been created to allow building containers for a Rocky Linux x86_64 system while using a macOS aarch64 laptop.

The virtual machine image in this repository can be run with Lima. It is primarily intended to be used on a macOS host, yet Lima also supports other container engines (Docker, Podman, Kubernetes, etc.) and non-macOS hosts (Linux, NetBSD, etc.).

In addition to the Ubuntu base image, this machine already comes with some additional software that is required to work with nf-core properly:

Installation and initial start

To run this virtual machine, you need to install Lima and Qemu first. Assuming you have installed Homebrew on your macOS already, you can run

brew install qemu lima

to install both.

Subsequently, you can use the nf-core_apptainer.yaml from this repository to create a virtual machine. Since the architecture of a virtual machine can't be changed after instantiation, ensure that you are happy with the choice. By default, this image uses the x86_64 architecture, but you can easily change it to aarch64 if you like. Performance is significantly better if it matches your host architecture, but Lima/Qemu can accommodate foreign architectures as well.

To build and start the virtual machine, run

limactl start nf-core_apptainer.yaml

The initial configuration and download of the dependencies will take several minutes to complete.

Usage

After the machine has been instantiated, you can boot it with

limactl start nf-core_apptainer

To get shell access to the guest system, run

limactl shell nf-core_apptainer

To shutdown the machine, use

limactl stop nf-core_apptainer

In case you wish to delete the machine, you can type

limactl delete nf-core_apptainer

Please refer to the nf-core documentation for the available commands and arguments.

Customization

To customize the image, edit nf-core_apptainer.yaml accordingly. This example explains the available commands.