export CMAKE_PREFIX_PATH="$(dirname $(which conda))/../" # [anaconda root directory] # Install basic dependencies conda install numpy pyyaml mkl mkl-include setuptools cmake cffi typing conda install -c mingfeima mkldnn # Add LAPACK support for the GPU conda install -c pytorch magma-cuda80 # or [magma-cuda80 | magma-cuda91] depending on your cuda version
git clone --recursive https://github.com/pytorch/pytorch cd pytorch
python setup.py install //下载最新的源码安装版本的不会出现问题,最新为pytorch1.0
注:
如果在conda环境当中进行安装,需要在conda环境中自行配置cuda和cudnn,否则就算编译完了也会出现caffe2 not GPU support
例如我安装的为cuda8.0和cudnn6.0.21
则在相应的conda环境中,使用
conda install cudnn=6.0.21 即可在conda环境中下载cuda和cudnn
detectron安装过程安装官网的来就行了
不过中间安装cocoapi 有个坑
要先安装pip install cython 否则编译会出错