Singularity Desktop for macOS (Beta Release)
Singularity Desktop for macOS (Beta Release) allows Linux-based Singularity containers to be designed, built, tested, and signed/verified on macOS. This capability is enabled through two components:
- Singularity itself - a native port of the software to macOS that offers a subset of the functionality currently available under Linux
- The macOS compatibility layer - a pre-built package that provides a binary interface between Singularity and macOS
Singularity Desktop for macOS (Beta Release) is distributed as a DMG file (macOS disk image), namely singularity-desktop-beta-v0.1.dmg. The software should be downloaded, and installed as follows:Download Now (Beta Release v0.1)
- Click on the link to the DMG file (above) to download it
- Locate the downloaded DMG file in your "Downloads" folder, and double click on it
- From the installer window, double click on the package icon (see below) to install the software
Singularity Desktop for macOS (Beta Release) only requires privileged access during the installation process.
The contents of this tarball are installed into the "/usr/local" directory. In fact, use of this directory this is a requirement.
Validating for SIF™ Containers
Armed with this combination of a native port for macOS and its compatibility layer, Singularity Desktop for macOS (Beta Release) can execute Singularity Image Format (SIF) containers available locally or from the Sylabs Cloud.
For a locally stored SIF™ file,
singularity run lolcow_latest.sif
executes the "lolcow_latest.sif" container. The enabling use of the compatibility layer is completely hidden.
For SIF™ files hosted via the Sylabs Cloud, the library bootstrap agent is required as follows:
singularity run library://godlovedc/funny/lolcow
At this point, and as far as SIF™ containers are concerned, the macOS operating environment has been validated for execution of Linux containers in the native format for Singularity.
Validating for OCI Compatible Containers
Singularity can also make use of any OCI compatible container image through a variety of bootstrap agents. As use of images available via the public Docker Hub is common, validating support under macOS will be demonstrated accordingly. Suppose the Docker image "lolcow" is publicly available via the Docker Hub from user "godlovedc"; then, on macOS, this image can be run as follows:
singularity run docker://godlovedc/lolcow
In this example, the Docker image is retrieved and cached locally, converted to SIF, and then executed according to its runscript; although the image remains in the local cache, the SIF™ file is not saved. To retain a copy of the SIF™ file, the image should be pulled as follows:
singularity pull docker://godlovedc/lolcow
In this latter case, "lolcow_latest.sif" is retained locally for reuse.
Singularity Desktop for macOS (Beta Release) allows Linux containers to be designed, built, tested, and signed/verified on macOS. Although the long-term plan is to deliver UX parity on macOS when compared to Linux, the current beta release implementation is the starting point.
From the end user’s perspective, the documentation here provides an excellent starting point for currently supported commands. Administrator-facing documentation is also available, and can be found here.
Singularity for macOS is currently available as an beta release. In this section, known limitations of the port to macOS are identified.
Build command limitations
At the current time, it is only possible to build images for Singularity by making use of the Remote Builder service from the Sylabs Cloud. In other words,
singularity build --remote lolcow_rb.sif docker://godlovedc/lolcow
is a supported means for ultimately producing the SIF™ file "lolcow_rb.sif" locally. The Remote Builder service can also make use of locally stored definition files.
When mounting directories from the host, the directory name of two mounts cannot be the same. For example:
singularity exec -B /tmp -B /var/tmp docker://godlovedc/lolcow
would not work correctly because the last directory name of "tmp" is the same between the two.
Please refer to Contributing for additional details.
The included Singularity binary is released under the same license as Singularity itself. SyOS is released under a separate license which you can read here. Please see this page for information on the OSS packages included.