Singularity(二)| 安装singularity工具
以默认安装 Ubuntu 22.04 (jammy) 发行版的 WSL 2 (Windows Subsystem for Linux 2) 为例:
参考:官方快速安装向导
-
安装系统依赖项
首先在主机上安装开发工具和库,在基于 debian 的系统上,包括 Ubuntu:
# Ensure repositories are up-to-date
sudo apt-get update
# Install debian packages for dependencies
sudo apt-get install -y \
wget \
build-essential \
libseccomp-dev \
libglib2.0-dev \
pkg-config \
squashfs-tools \
cryptsetup \
runc -
安装 Go
SingularityCE 是用 Go 语言编写的,建议从官方二进制文件中安装最新版本的 Go。
参考 Go 安装的官方说明:https://golang.org/dl/
# Remove any previous Go installation
sudo rm -rf /usr/local/go
sudo tar -C /usr/local -xzf go1.20.5.linux-amd64.tar.gz
# Add /usr/local/go/bin to the PATH environment variable.
echo 'export PATH=/usr/local/go/bin:$PATH' >> ~/.bashrc && \
source ~/.bashrc -
利用
apt
安装 SingularityCE从 Github 直接下载 SingularityCE 适用于特定 Linux 发行版的最新版本(singularity-ce_3.11.3-jammy_amd64.deb)后运行:
# 切换root账号
sudo su
# 从本地安装
apt install ./singularity-ce_3.11.3-jammy_amd64.deb
# 测试
singularity help
安装成功后显示:
$ 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
-q, --quiet suppress normal output
-s, --silent only print errors
-t, --tokenfile string path to the file holding your sylabs
authentication token (default
"/home/david/.singularity/sylabs-token")
-v, --verbose print additional information
Available Commands:
build Build a new Singularity container
capability Manage Linux capabilities on containers
exec Execute a command within container
help Help about any command
inspect Display metadata for container if available
instance Manage containers running in the background
keys Manage OpenPGP key stores
pull Pull a container from a URI
push Push a container to a Library URI
run Launch a runscript within container
run-help Display help for container if available
search Search the library
shell Run a Bourne shell within container
sign Attach cryptographic signatures to container
test Run defined tests for this particular container
verify Verify cryptographic signatures on container
version Show application version
Examples:
$ singularity help <command>
Additional help for any Singularity subcommand can be seen by appending
the subcommand name to the above command.
For additional help or support, please visit https://www.sylabs.io/docs/
扫码关注微信公众号【生信F3】获取文章完整内容,分享生物信息学最新知识。
本文由 mdnice 多平台发布