How To Install singularity-container on Ubuntu 18.04

In this tutorial we learn how to install singularity-container on Ubuntu 18.04. singularity-container is container platform focused on supporting Mobility of Compute

Introduction

In this tutorial we learn how to install singularity-container on Ubuntu 18.04.

What is singularity-container

singularity-container is:

Mobility of Compute encapsulates the development to compute model where developers can work in an environment of their choosing and creation and when the developer needs additional compute resources, this environment can easily be copied and executed on other platforms. Additionally as the primary use case for Singularity is targeted towards computational portability, many of the barriers to entry of other container solutions do not apply to Singularity making it an ideal solution for users (both computational and non-computational) and HPC centers.

There are three methods to install singularity-container on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install singularity-container Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install singularity-container using apt-get by running the following command:

sudo apt-get -y install singularity-container

Install singularity-container Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install singularity-container using apt by running the following command:

sudo apt -y install singularity-container

Install singularity-container Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install singularity-container using aptitude by running the following command:

sudo aptitude -y install singularity-container

How To Uninstall singularity-container on Ubuntu 18.04

To uninstall only the singularity-container package we can use the following command:

sudo apt-get remove singularity-container

Uninstall singularity-container And Its Dependencies

To uninstall singularity-container and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove singularity-container

Remove singularity-container Configurations and Data

To remove singularity-container configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge singularity-container

Remove singularity-container configuration, data, and all of its dependencies

We can use the following command to remove singularity-container configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge singularity-container

References

Summary

In this tutorial we learn how to install singularity-container package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.