mashengwei的个人博客分享 http://blog.sciencenet.cn/u/mashengwei

博文

conda与docker、singularity的联动

已有 1158 次阅读 2023-7-4 14:34 |系统分类:科研笔记

conda在生物信息学中应用非常广泛,很多软件的安装问题得以解决。但有时候还是不能解决环境配置问题。

尽管conda可以新建一个环境,但这个方法不是万能的,尤其是有些软件依赖系统级的库的时候。

conda创新新环境并安装软件的示例命令如下:

conda create --n myenv python=3.8

如果还是解决不了软件安装问题,可以试试将conda环境打包成镜像,做法如下:

首先在conda 中搜索目标软件信息

conda search -c bioconda cuttlefish

返回信息如下:

# Name                       Version           Build  Channel             
cuttlefish                     1.0.0      h2e03b76_0  bioconda            
cuttlefish                     1.0.0      h2e03b76_1  bioconda            
cuttlefish                     2.0.0      h95f258a_0  bioconda            
cuttlefish                     2.0.0      hf1761c0_1  bioconda            
cuttlefish                     2.1.0      hf1761c0_0  bioconda            
cuttlefish                     2.1.1      hf1761c0_0  bioconda            
cuttlefish                     2.2.0      h6a68c12_1  bioconda            
cuttlefish                     2.2.0      h6a68c12_2  bioconda            
cuttlefish                     2.2.0      hf1761c0_0  bioconda            
cuttlefish                     2.2.0      hf1761c0_1  bioconda

再次根据上述返回的Version、Build信息,pull镜像的命令如下:

docker

docker pull quay.io/biocontainers/cuttlefish:2.1.0--hf1761c0_0

singularity

singularity pull ./cuttlefish.sif docker://quay.io/biocontainers/cuttlefish:2.1.0--hf1761c0_0

至此,安装完毕。




https://blog.sciencenet.cn/blog-1094241-1393992.html

上一篇:十几万组装一个小麦基因组
下一篇:使用python在word的指定位置插入excel关键字段
收藏 IP: 59.50.41.*| 热度|

0

该博文允许注册用户评论 请点击登录 评论 (0 个评论)

数据加载中...

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-4-28 04:14

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部