Pegasus平台Pytorch源码编译
# Download PyTorch sources
git clone --recursive --branch <version> http://github.com/pytorch/pytorch
cd pytorch
# Set Build Options
export USE_NCCL=0
export USE_DISTRIBUTED=0
export TORCH_CUDA_ARCH_LIST="5.3;6.2;7.2"
export PYTORCH_BUILD_VERSION=<version> # without the leading 'v', e.g. 1.1.0 for PyTorch v1.1.0
export PYTORCH_BUILD_NUMBER=1
# Build wheel for Python 2.7 (to pytorch/dist)
sudo apt-get install python-pip cmake
pip install -U pip
sudo pip install -U setuptools
sudo pip install -r requirements.txt
pip install scikit-build --user
pip install ninja --user
# 或者使用 python setup.py build直接安装
python setup.py bdist_wheel
# Build wheel for Python 3.6 (to pytorch/dist)
sudo apt-get install python3-pip cmake
sudo pip3 install -U setuptools
sudo pip3 install -r requirements.txt
pip3 install scikit-build --user
pip3 install ninja --user
# 或者使用 python setup.py build直接安装
python3 setup.py bdist_wheel