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/

成功

  • 1
    点赞
  • 14
    收藏
    觉得还不错? 一键收藏
  • 4
    评论
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值