美文网首页singularity基因组组装
singularity安装与使用,安装需要root

singularity安装与使用,安装需要root

作者: 曹草BioInfo | 来源:发表于2022-04-07 03:38 被阅读0次

经过一段时间的调研,必须要有root才能用apt安装一些依赖包。缺了它们无法正常使用。

一、安装

1. 安装依赖

conda install -y build uuid squashfs libseccomp  cryptsetup

这里只是能安装的依赖包,有些安装不上。

如果有root的话


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

2. 安装 GO 语言

wget https://golang.org/dl/go1.14.12.linux-amd64.tar.gz

tar -C /pub/software -xzvf go1.14.12.linux-amd64.tar.gz

rm go1.14.12.linux-amd64.tar.gz

我是翻墙之后直接访问https://golang.org/dl/go1.14.12.linux-amd64.tar.gz下载,再Filezila回来解压的。

添加环境变量等等

3. 下载 singularity

wget https://github.com/hpcng/singularity/releases/

download/v3.7.2/singularity-3.7.2.tar.gz

 tar -xzf singularity-3.7.2.tar.gz

 cd singularity

apt安装不上最新版本,不过无所谓,没有root也用不成apt

4. 安装 singularity

 ./mconfig

 cd builddir

 make

sudo make install

./mconfig --prefix=/PATH/   

加上具体路径可以安装,否则会默认到一个什么乱七八糟的地方,后期不利于管理。

二、使用

1.下载image

singularity pull --arch amd64 library://library/default/ubuntu:20.04

singularity pull docker://ncbi/blast
singularity pull blast.tif docker-deamon:blast

可以从https://cloud.sylabs.io/library里面找,也可以去Docker Hub里面找images,接下来把docker本地镜像转换成singularity

2.运营沙箱

singularity build --sandbox blast ubuntu_20.04.sif

singularity shell -w -f blast/

singularity build blast/sif blast

singularity会自动挂载home和pwd目录,这点非常顺手。
shell进入交互界面 -w进入可写模式 -f成为fakeroot
容器的优势是你之前下载好的image里面已经有pipeline所需的环境了,如果还需要另外安装的话需要以上套路。

3.运行容器

singularity exec blast.sif blastp -h

$ singularity shell blast_latest.sif bash
Singularity> id
uid=1491(ug1051) gid=1001(VIP) groups=1001(VIP)
Singularity> exit
exit
$ singularity shell -f blast_latest.sif bash
INFO:    Converting SIF file to temporary sandbox...
Singularity> id
uid=0(root) gid=0(root) groups=0(root)

exec直接运行sandbox里面的命令,不需要进入

相关文章

  • singularity安装与使用,安装需要root

    经过一段时间的调研,必须要有root才能用apt安装一些依赖包。缺了它们无法正常使用。 一、安装 1. 安装依赖 ...

  • singularity

    singularity 安装 安装依赖 在ubuntu上 在centos上 安装Go Singularity 3....

  • singularity

    一、singularity 安装 通过以下命令可以安装singularity git clone https://...

  • Python3

    安装 python 模块 在 crontab 中使用 python, 需要使用 root 账号或者 sudo 安装...

  • Singularity入门之安装

    下载 编译rpm包 Singularity 提供了几种安装方式,这里选择使用编译 rpm 包的方式来安装。 安装 测试

  • Mac 安装 Mysql

    使用 brew 安装mysql 由于 HomeBrew 安装的 mysql 默认root账户没有设置密码。因此需要...

  • Nebula Graph学习笔记

    安装 su到root 需要root权限 使用docker构建 参考https://docs.nebula-gra...

  • CentOS快速安装docker

    docker官方提供了方便的docker安装脚本,我们直接使用即可快速安装docker。执行安装脚本需要以root...

  • 隐私合规检测工具Camille使用

    前置条件 需要root手机(替代方案,使用模拟器) 需要安装python 一、环境配置 安装 frida[http...

  • Linux下Git服务器搭建

    1、首先需要安装Git,可以使用yum源在线安装: [root@localhost Desktop]# yum i...

网友评论

    本文标题:singularity安装与使用,安装需要root

    本文链接:https://www.haomeiwen.com/subject/yshjsrtx.html