How to install caffe2, libtorch, and pytorch at once?

Hi,

Now Pytorch repository amazingly hosts Caffe2 and PyTorch.
So, what is the recommended way to install all of them at once including CUDA compat and C++ interface (libtorch, and caffe2 cpp) on Ubuntu 16.04 with CUDA 9.0?

install them as listed in commands on https://pytorch.org
The commands install PyTorch, which includes caffe2 as well.

So, I can use both caffe2 and libtorch if pytorch is installed via conda?

So, I can use both caffe2 and libtorch if pytorch is installed via conda?

yes, you can!

Thanks!

I thought conda or pip installed python pytorch things.

libtorch is included in the package, but if you want libtorch-only package, from the selector on https://pytorch.org choose the C++ option to get libtorch-only.

1 Like