Singularity使用Docker镜像

#test docker -> singularity
docker run -it -v /home/daizao/workspace/container/:/mnt ubuntu bash
root@fcd85ec80ffe:/# cp /mnt/ncbi-blast-2.10.1+-x64-linux.tar.gz /opt/
root@fcd85ec80ffe:/# cd /opt/
root@fcd85ec80ffe:/opt# tar -zxf ncbi-blast-2.10.1+-x64-linux.tar.gz
root@fcd85ec80ffe:/opt# rm ncbi-blast-2.10.1+-x64-linux.tar.gz
root@fcd85ec80ffe:/opt# cp ncbi-blast-2.10.1+/bin/* /usr/local/bin/
root@fcd85ec80ffe:/opt# blastp -h
root@fcd85ec80ffe:/opt# exit
docker images
docker ps -a
#######
#CONTAINER ID   IMAGE     COMMAND       CREATED              STATUS                      PORTS     NAMES
#fcd85ec80ffe   ubuntu    "bash"        About a minute ago   Exited (0) 24 seconds ago             gallant_ganguly

#create images from container(fcd85ec80ffe)
docker commit fcd85ec80ffe blast_docker
docker images
###
#REPOSITORY     TAG       IMAGE ID       CREATED          SIZE
#blast_docker   latest    517957fbf0e3   13 seconds ago   1.43GB
#ubuntu         latest    26b77e58432b   14 hours ago     72.9MB

singularity build blast_docker.sif docker-daemon:blast_docker:latest
singularity exec blast_docker.sif blastp -h

docker ps -a
#######
#CONTAINER ID   IMAGE     COMMAND       CREATED              STATUS                      PORTS     NAMES
#fcd85ec80ffe   ubuntu    "bash"        About a minute ago   Exited (0) 24 seconds ago             gallant_ganguly

#delete container
docker rm fcd85ec80ffe
#delete docker image
docker rmi blast_docker
此条目发表在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