You will need a Linux system to run SingularityCE natively. Options for using SingularityCE on Mac and Windows machines, along with alternate Linux installation options, are discussed in the installation section of the admin guide.
If you have an existing version of SingularityCE installed from source, which you wish to upgrade or remove / uninstall, see the installation section of the admin guide.
For further information, read the SingularityCE User Guide.
You must first install development tools and libraries to your host.
On Debian-based systems, including Ubuntu:
sudo apt-get update
sudo apt-get install -y \
autoconf \
automake \
cryptsetup \
fuse2fs \
git \
fuse \
libfuse-dev \
libglib2.0-dev \
libseccomp-dev \
libtool \
pkg-config \
runc \
squashfs-tools \
squashfs-tools-ng \
uidmap \
wget \
zlib1g-dev
- Update Ubuntu package list To update the package list, use the following command:
sudo apt-get update
- Install GCC on Ubuntu We now install GCC with the following command.
sudo apt-get install -y gcc build-essential
If GCC is already installed on your system, the command will list the version installed.
You have installed also GCC with the build-essential package. This will install GCC as well as other popular packages such as make, which is often used with GCC to automate the compilation process of bigger software.
SingularityCE is written in Go, and may require a newer version of Go than is available in the repositories of your distribution. We recommend installing the latest version of Go from the official binaries (https://golang.org/dl/)
export VERSION=1.22.1 OS=linux ARCH=amd64 && \
cd /tmp && \
wget https://dl.google.com/go/go$VERSION.$OS-$ARCH.tar.gz && \
sudo tar -C /usr/local -xzvf go$VERSION.$OS-$ARCH.tar.gz && \
rm go$VERSION.$OS-$ARCH.tar.gz
Set the Environment variable PATH to point to Go:
echo 'export PATH=/usr/local/go/bin:${PATH}' >> ~/.bashrc
source ~/.bashrc
You can download SingularityCE from one of the releases. To see a full list, visit the GitHub release page (https://github.com/sylabs/singularity/releases).
After deciding on a release to install, you can run the following commands to proceed with the installation.
mkdir -p ${HOME}/softwares && \
cd ${HOME}/softwares && \
export VERSION=4.1.2 && \
wget https://github.com/sylabs/singularity/releases/download/v${VERSION}/singularity-ce-${VERSION}.tar.gz
tar -xzf singularity-ce-${VERSION}.tar.gz && \
cd singularity-ce-${VERSION}
Now you are ready to build SingularityCE. Dependencies will be automatically downloaded. You can build SingularityCE using the following commands:
./mconfig && \
make -C builddir && \
sudo make -C builddir install
It is strongly recommended that you don't use the Docker container for running Singularity images, only for creating them, since the Singularity command runs within the container as the root user.
For further information, read the SingularityCE User Guide.