Singularity配置Pytorch0.4.1 + Anaconda3(Python3.5) + CUDA9.0 + CUDNN7.0

4 篇文章 0 订阅
2 篇文章 0 订阅

Singularity Recipe

Bootstrap: docker
From:nvidia/cuda:9.0-cudnn7-devel-ubuntu16.04
   
%post
# recipe
	echo 'nameserver 8.8.8.8' >> /etc/resolv.conf
    apt-get update
    apt-get install -y wget vim git cmake unzip unar libsm6 libxext6 libxrender-dev

	# anaconda3
	wget https://mirrors.tuna.tsinghua.edu.cn/anaconda/archive/Anaconda3-4.2.0-Linux-x86_64.sh -O /opt/anaconda3.sh
	bash /opt/anaconda3.sh -b -p /opt/anaconda3
	rm /opt/anaconda3.sh
	/opt/anaconda3/bin/pip install -i https://pypi.tuna.tsinghua.edu.cn/simple msgpack argparse
	/opt/anaconda3/bin/pip install --upgrade pip
	/opt/anaconda3/bin/pip install -i https://pypi.tuna.tsinghua.edu.cn/simple protobuf future tqdm sklearn pillow xmltodict dicttoxml

	/opt/anaconda3/bin/pip install -i https://pypi.tuna.tsinghua.edu.cn/simple torch torchvision
	/opt/anaconda3/bin/pip install -i https://pypi.tuna.tsinghua.edu.cn/simple opencv-python albumentations gluoncv-torch pretrainedmodels
 
%environment
	export PATH=/opt/anaconda3/bin:$PATH
	export LC_ALL=C.UTF-8

  # 制作成只读压缩格式squashfs的容器供服务器用
  singularity build pytorchv1.simg recipe.def
  # ll -h pytorchv1.simg -> 3.0Gb
  • 使用root账户制作。
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 3
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值