How to install singularity on Almalinux 9, Centos Stream 9 and Rocky Linux

Singularity is an open-source containerization framework for packaging and running portable and reproducible apps and workflows. It is especially beneficial in high-performance computing (HPC) contexts where users must run scientific programs on clusters, grids, and cloud infrastructures.

To install Singularity on Linux, you can follow these simple steps:

NOTE: These steps were tested on AlmaLinux 9. They might also work on version 8 and Centos 7.

  1. First, make sure your system is up to date:
    # yum -y update

  2. Install the necessary dependencies.
    # yum groupinstall -y 'Development Tools'
    # yum install -y openssl-devel libuuid-devel libseccomp-devel wget squashfs-tools cryptsetup

  3. Install GO.
  4. Go is required if you want to build Singularity from source.

    To install GO, follow these simple steps:

    a) Open the link below and download the latest version of GO:
    https://go.dev/doc/install
    This command will download go1.20.2

    # wget https://go.dev/dl/go1.20.2.linux-amd64.tar.gz

    b) Extract the tar archive to /usr/local:

    # tar xzf go1.20.2.linux-amd64.tar.gz -C /usr/local/

    c) Edit /etc/profile file and add "export PATH=$PATH:/usr/local/go/bin" to the end of the file. To do this, simply run below command:

    # echo "export PATH=\$PATH:/usr/local/go/bin" >> /etc/profile

    d) Logout, then login again.

    e) Verify go is installed.

    # go version

  5. Install Singularity.
    The easiest way to install Singularity is to install it from the Epel Repository.
    
      # yum install -y epel-release
      # yum update -y
      # yum install -y singularity
      

  6. Test Singularity by executing a simple container from the Sylabs Cloud library.
    
    [root@zmatech ~]# singularity exec library://alpine cat /etc/alpine-release
    INFO:    Downloading library image
    2.7MiB / 2.7MiB [=====================================================] 100 % 
    3.15.5
    

  7. That's it, Singularity is installed.

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*

©2025 ZMATECH: Innovative solutions for your IT challenges.

Log in with your credentials

Forgot your details?