Ubuntu16.04 singularity安装

参考

  1. Ubuntu singularity安装
  2. Singularity官方文档

系统要求

安装环境为Ubuntu 16.04
140MB硬盘空间

安装依赖

sudo apt-get update && sudo apt-get install -y \
    build-essential \
    uuid-dev \
    libgpgme-dev \
    squashfs-tools \
    libseccomp-dev \
    wget \
    pkg-config \
    git \
    cryptsetup-bin

GO 安装

singularity使用Go编写,需要安装Go
在https://golang.org/dl/ 下载合适版本的Go至 /usr/local。singularity3.0以上的版本需要下载Go 1.13以上的版本。下载完成后:

cd /usr/local
sudo tar -C /usr/local -xzf go$VERSION.$OS-$ARCH.tar.gz
export PATH=$PATH:/usr/local/go/bin
source $HOME/.profile

验证Go安装

创建hello.go文件,写一个hello world

package main
import "fmt"
func main() {
     
    fmt.Printf("hello, go\n")
}

编译之后运行:

$ go build hello.go
$ ./hello

hello, go

安装成功。

下载singularity

export VERSION=3.5.2 && # adjust this as necessary \
    wget https://github.com/sylabs/singularity/releases/download/v${VERSION}/singularity-${VERSION}.tar.gz && \
    tar -xzf singularity-${VERSION}.tar.gz && \
    cd singularity

或者通过git安装

git clone https://github.com/sylabs/singularity.git && \
    cd singularity && \
    git checkout v3.5.2

编译

$ ./mconfig && \
    make -C ./builddir && \
    sudo make -C ./builddir install

$ ./mconfig --prefix=/opt/singularity

验证

singularity --help

Linux container platform optimized for High Performance Computing
(HPC) and Enterprise Performance Computing (EPC)

Usage: singularity [global options…]

Description: Singularity containers provide an application
virtualization layer enabling mobility of compute via both
application and environment portability. With Singularity one is
capable of building a root file system that runs on any other Linux
system where Singularity is installed.

Options: -d, --debug print debugging information (highest
verbosity) -h, --help help for singularity
–nocolor print without color output (default False) -q, --quiet suppress normal output -s, --silent only print errors -v, --verbose print additional information
–version version for singularity

Available Commands: build Build a Singularity image cache
Manage the local cache capability Manage Linux capabilities for
users and groups config Manage various singularity
configuration (root user only) delete Deletes requested image
from the library exec Run a command within a container help
Help about any command inspect Show metadata for an image
instance Manage containers running as services key Manage
OpenPGP keys oci Manage OCI containers plugin Manage
Singularity plugins pull Pull an image from a URI push
Upload image to the provided URI remote Manage singularity
remote endpoints run Run the user-defined default command
within a container run-help Show the user-defined help for an
image search Search a Container Library for images shell
Run a shell within a container sif siftool is a program for
Singularity Image Format (SIF) file manipulation sign Attach
a cryptographic signature to an image test Run the
user-defined tests within a container verify Verify
cryptographic signatures attached to an image version Show the
version for Singularity

Examples: $ singularity help [] $
singularity help build $ singularity help instance start

For additional help or support, please visit
https://www.sylabs.io/docs/

成功

你可能感兴趣的:(环境配置,ubuntu,singularity)