下载镜像:
$ sudo docker pull docker pull kaixhin/cuda-torch:8.0 (https://hub.docker.com/r/kaixhin/cuda-torch/)
安装python相关packages
新建一个requirements,包含以下内容:
- python + numpy + scipy + h5py + sklearn + imageio
$ pip install -r requirements
安装torch-hdf5
参考:https://github.com/deepmind/torch-hdf5/blob/master/doc/usage.md
安装torch.cudnn:
参考:https://stackoverflow.com/questions/45153627/how-to-install-cudnn-torch
准备工作做好之后,我们就得到了一个新的镜像。
如果安装sklearn中出现关于six的错误,则参考:https://www.jianshu.com/p/45fb07007ddc
get_mask_hdf5.py中的scipy.misc.read已经不再使用,换成imageio.imread
如果报错说没有loadcaffe这个module,参考:
https://github.com/karpathy/neuraltalk2/issues/180
如果报错:some variables are set to not found,参考:https://github.com/szagoruyko/loadcaffe/issues/76