Singularity 练习

#download ubuntu singularity
singularity pull --arch amd64 library://library/default/ubuntu:20.04
singularity build --sandbox blast ubuntu_20.04.sif

#install software
singularity shell --writable blast/
#singularity shell --writable --fakeroot blast

Singularity> cp ncbi-blast-2.10.1+-x64-linux.tar.gz /opt/
Singularity> cd /opt/
Singularity> tar -zxf ncbi-blast-2.10.1+-x64-linux.tar.gz
Singularity> cd ncbi-blast-2.10.1+/bin/
Singularity> cd ../..
Singularity> rm ncbi-blast-2.10.1+-x64-linux.tar.gz
Singularity> exit
vim blast/environment
    export PATH=/opt/ncbi-blast-2.10.1+/bin:$PATH

#build
singularity build blast.sif blast
#test use
singularity exec blast.sif blastp -help

#use singularity software to analysis a simple blast
singularity exec blast.sif makeblastdb -dbtype prot -in PRAD.fasta -out genome
singularity exec blast.sif blastp -query input.fa -db genome -out blast.out -outfmt 7

#copy sig to a shared container doc
mkdir /opt/software/container
cp blast.sif /opt/software/container/
singularity exec /opt/software/container/blast.sif blastp -query input.fa -db genome -out blast.out -outfmt 7

#load file
singularity shell --bind /opt/software/:/mnt blast.sif
Singularity> ls /mnt/
Singularity> exit

singularity shell --bind /opt/software/ blast.sif
Singularity> ls /opt/
Singularity> ls /mnt/
Singularity> exit
此条目发表在Container分类目录。将固定链接加入收藏夹。

发表评论

邮箱地址不会被公开。 必填项已用*标注

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

Protected with IP Blacklist CloudIP Blacklist Cloud