我的安装环境是Ubuntu 16.04 cuda9.0
官网步骤
git clone https://github.com/torch/distro.git ~/torch --recursive
cd ~/torch
bash install-deps
./install.sh
第一步就下载不下来。这里从网上找了资源,放在这里:
链接: https://pan.baidu.com/s/1RQf3cn2Rq3VqcxgFSQJJMQ 提取码: sc92 复制这段内容后打开百度网盘手机App,操作更方便哦
这个资源最高只适用于cuda9.0,更高的cuda的从这里clone
git clone https://github.com/nagadomi/distro.git ~/torch --recursive
克隆完成后bash遇到依赖问题
python-dev : 依赖:libpython-dev(=2.7.5-5ubuntu3)但是它将不会被安装
这通常代表的意思是Ubuntu自生安装的软件包版本高,而所安装软件的依赖包版本低的原因。
解决方案
sudo apt-get install aptitude
使用aptitude安装
sudo aptitude install python-dev
出来第一次让你选择 y/n ,此时仍然是Ubuntu当前版本的软件包,选择 n
接下来会给出降低版本的解决方案, y/n 选择 y
第二个问题
git报错 failed: The TLS connection was non-properly terminated
git clone超时可以换个链接下载
例如OpenLLAS报错,有四个链接,修改install-deps文件中的clone位置
问题解决
第三个问题,./install.sh遇到
nvcc fatal : Unsupported gpu architecture 'compute_75'
这是因为我的GPU 为2080Ti算力为7.5,cuda9.0只支持7.0最高,使用下面命令
export TORCH_CUDA_ARCH_LIST="7.0"
export TORCH_NVCC_FLAGS="-D__CUDA_NO_HALF_OPERATORS__"
之后运行就可以了