I am trying to install Facebook's Detectron and so I need to install Caffe2. I followed this instruction.
Basically, I clone the PyTorch repo with
git clone https://github.com/pytorch/pytorch.git && cd pytorch
git submodule update --init --recursive
and when I run the following command python setup.py install
it goes to 84-86% and I get this error.
[ 84%] Built target roi_align_op_gpu_test
Makefile:140: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "setup.py", line 756, in <module>
build_deps()
File "setup.py", line 321, in build_deps
cmake=cmake)
File "/home/milos/pytorch/tools/build_pytorch_libs.py", line 63, in build_caffe2
cmake.build(my_env)
File "/home/milos/pytorch/tools/setup_helpers/cmake.py", line 330, in build
self.run(build_args, my_env)
File "/home/milos/pytorch/tools/setup_helpers/cmake.py", line 143, in run
check_call(command, cwd=self.build_dir, env=env)
File "/usr/lib/python2.7/subprocess.py", line 190, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '12']' returned non-zero exit status 2
Segmentation fault (core dumped)
System info:
Ubuntu 18.04 LTS (Bionic Beaver)
Python 3.6.8 and Python 2.7.15
OpenCV 3.4.0 for both python versions
CUDA 10.2 (Nvidia 430.26)
I've managed to get this working before, but can't remember how.