先激活虚拟环境
$ cd env/share/python-wheels
在此找到对应的版本:https://download.pytorch.org/whl/cu100/torch_stable.html
找到对应版本的torch链接(36对应python版本3.6):
$ wget https://download.pytorch.org/whl/cu100/torch-1.1.0-cp36-cp36m-linux_x86_64.whl
找到对应版本的torchvision链接:
$ wget https://download.pytorch.org/whl/cu100/torchvision-0.3.0-cp36-cp36m-linux_x86_64.whl
安装
$ pip install torch-1.1.0-cp36-cp36m-linux_x86_64.whl torchvision-0.3.0-cp36-cp36m-linux_x86_64.whl
$ python
>>> import torch
>>>print(torch.version.cuda)
10.0.1