https://caffe2.ai/docs/getting-started.html?platform=ubuntu&configuration=compile
依赖库
sudo apt-get update sudo apt-get install -y --no-install-recommends \ build-essential \ git \ libgoogle-glog-dev \ libgtest-dev \ libiomp-dev \ libleveldb-dev \ liblmdb-dev \ libopencv-dev \ libopenmpi-dev \ libsnappy-dev \ libprotobuf-dev \ openmpi-bin \ openmpi-doc \ protobuf-compiler \ python-dev \ python-pip pip install --user \ future \ numpy \ protobuf \ typing \ hypothesis
依赖库2
# for Ubuntu 14.04 sudo apt-get install -y --no-install-recommends \ libgflags2 \ cmake3 # for Ubuntu 16.04 sudo apt-get install -y --no-install-recommends \ libgflags-dev \ cmake
下载构建
it clone https://github.com/pytorch/pytorch.git && cd pytorch git submodule update --init --recursive python setup.py install