Skip to content

Instantly share code, notes, and snippets.

@Unbinilium
Created February 3, 2020 05:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Unbinilium/3aaa25c63f0c21fc9723605e97871190 to your computer and use it in GitHub Desktop.
Save Unbinilium/3aaa25c63f0c21fc9723605e97871190 to your computer and use it in GitHub Desktop.
Build PyTorch and PyTorch Vision
  • Install dependencies
sudo apt-get install -y libopenblas-dev libblas-dev m4 cmake cython python3-dev python3-yaml python3-setuptools libavutil-dev libavcodec-dev libavformat-dev libswscale-dev
  • Build PyTorch from the source
git clone --recursive https://github.com/pytorch/pytorch
pushd pytorch
git submodule update --remote third_party/protobuf
python3 setup.py build
sudo python3 setup.py install
  • Build PyTorch Vision from the source
git clone --recursive https://github.com/pytorch/vision
cd vision
python3 setup.py build
sudo python3 setup.py install
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment