Skip to content

Instantly share code, notes, and snippets.

@Puzer
Created December 6, 2019 11:41
Show Gist options
  • Save Puzer/4d23935e570db1936a0b17ba6cd72be0 to your computer and use it in GitHub Desktop.
Save Puzer/4d23935e570db1936a0b17ba6cd72be0 to your computer and use it in GitHub Desktop.
Compile PyTorch from sources
# Assuming that conda enviroment installed and activated
sudo apt install gcc build-essential
conda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi
git clone --recursive https://github.com/pytorch/pytorch
export USE_CUDA=0
export USE_DISTRIBUTED=0
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
python setup.py install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment