Installing OpenCV3.4 on Ubuntu 18.04 ML in a Box Public Template


#1

I am trying to run the code given in https://github.com/facebookresearch/R2Plus1D. To do this, I am installing all the dependencies first given in https://github.com/facebookresearch/VMZ/blob/master/tutorials/Installation_guide.md#ubuntu. I am unable to install opencv3.4 version properly.
When I try to make -j8, I get this issue:

/usr/bin/ranlib ../../lib/libopencv_perf_cudafeatures2d_pch_dephelp.a
make[2]: Leaving directory '/home/paperspace/opencv-3.4.0/build'
[ 13%] Built target opencv_perf_cudafeatures2d_pch_dephelp
make[1]: Leaving directory '/home/paperspace/opencv-3.4.0/build'
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2```

I tried to install OpenCV using https://github.com/milq/milq/blob/master/scripts/bash/install-opencv.sh but the error remains the same.

What can be the possible issue for this and how can I install OpenCV 3.4 on this machine?