Repository: pytorch
Issue: WARNING:root:This caffe2 python run does not have GPU support. Will run in CPU only mode. CRITICAL:root:Cannot load caffe2.python. Error: libcaffe2.so: cannot open shared object file: No such file or directory
Labels: caffe2

So I tried to install caffe2  from source because I want to build densepose. I installed cuda and cudnn as well.
Getting above error when I do `from caffe2.python import core`

my cmake output:

**-- ******** Summary ********
-- General:
--   CMake version         : 3.11.4
--   CMake command         : /usr/local/bin/cmake
--   Git version           : v0.1.11-9388-gf33cd36
--   System                : Linux
--   C++ compiler          : /usr/bin/c++
--   C++ compiler version  : 5.4.0
--   BLAS                  : Eigen
--   CXX flags             :  -fvisibility-inlines-hidden -DONNX_NAMESPACE
=onnx_c2 -O2 -fPIC -Wno-narrowing -Wall -Wextra -Wno-missing-field-initial
izers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-sign-co
mpare -Wno-unused-parameter -Wno-unused-variable -Wno-unused-function -Wno
-unused-result -Wno-strict-aliasing -Wno-error=deprecated-declarations
--   Build type            : Release
--   Compile definitions   : 
--   CMAKE_PREFIX_PATH     : 
--   CMAKE_INSTALL_PREFIX  : /usr/local
--   BUILD_CAFFE2          : ON
--   BUILD_ATEN            : OFF
--   BUILD_BINARY          : ON
--   BUILD_CUSTOM_PROTOBUF : ON
--     Link local protobuf : ON
--   BUILD_DOCS            : OFF
--   BUILD_PYTHON          : ON
--     Python version      : 2.7.12
--     Python executable   : /usr/bin/python
--     Pythonlibs version  : 2.7.12
--     Python library      : /usr/lib/python2.7
--     Python includes     : /usr/include/python2.7
--     Python site-packages: lib/python2.7/dist-packages
--   BUILD_SHARED_LIBS     : ON
--   BUILD_TEST            : OFF
--   USE_ASAN              : OFF
--   USE_ATEN              : OFF
--   USE_CUDA              : ON
--     CUDA static link    : OFF
--     USE_CUDNN           : ON
--     CUDA version        : 8.0
--     cuDNN version       : 7.0.5
--     CUDA root directory : /usr/local/cuda-8.0
--     CUDA library        : /usr/lib/x86_64-linux-gnu/libcuda.so
--     cudart library      : /usr/local/cuda-8.0/lib64/libcudart_static.a;-pthread;dl;/usr/lib/x86_64-linux-gnu/librt.so
--     cublas library      : /usr/local/cuda-8.0/lib64/libcublas.so;/usr/local/cuda-8.0/lib64/libcublas_device.a
--     cufft library       : /usr/local/cuda-8.0/lib64/libcufft.so
--     curand library      : /usr/local/cuda-8.0/lib64/libcurand.so
--     cuDNN library       : /usr/lib/x86_64-linux-gnu/libcudnn.so
--     nvrtc               : /usr/local/cuda-8.0/lib64/libnvrtc.so
--     CUDA include path   : /usr/local/cuda-8.0/include
--     NVCC executable     : /usr/local/cuda-8.0/bin/nvcc
--     CUDA host compiler  : /usr/bin/cc
--     USE_TENSORRT        : OFF
--   USE_ROCM              : OFF
--   USE_EIGEN_FOR_BLAS    : ON
--   USE_FFMPEG            : OFF
--   USE_GFLAGS            : ON
--   USE_GLOG              : ON
--   USE_GLOO              : ON
--     USE_GLOO_IBVERBS    : OFF
--   USE_LEVELDB           : ON
--     LevelDB version     : 1.18
--     Snappy version      : 1.1.3
--   USE_LITE_PROTO        : OFF
--   USE_LMDB              : ON
--     LMDB version        : 0.9.17
--   USE_METAL             : OFF
--   USE_MKL               : 
--   USE_MOBILE_OPENGL     : OFF
--   USE_MPI               : ON
--   USE_NCCL              : ON
--     USE_SYSTEM_NCCL     : OFF
--   USE_NERVANA_GPU       : OFF
--   USE_NNPACK            : ON
--   USE_OBSERVERS         : ON
--   USE_OPENCL            : OFF
--   USE_OPENCV            : ON
--     OpenCV version      : 2.4.9.1
--   USE_OPENMP            : OFF
--   USE_PROF              : OFF
--   USE_REDIS             : OFF
--   USE_ROCKSDB           : OFF
--   USE_ZMQ               : OFF
--   Public Dependencies  : Threads::Threads;gflags;glog::glog
--   Private Dependencies : nnpack;cpuinfo;/usr/lib/x86_64-linux-gnu/liblm
db.so;/usr/lib/x86_64-linux-gnu/libleveldb.so;/usr/lib/x86_64-linux-gnu/li
bsnappy.so;/usr/lib/x86_64-linux-gnu/libnuma.so;opencv_core;opencv_highgui
;opencv_imgproc;/usr/lib/openmpi/lib/libmpi_cxx.so;/usr/lib/openmpi/lib/li
bmpi.so;gloo;onnxifi_loader;gcc_s;gcc;dl
-- Configuring done
-- Generating done
-- Build files have been written to: /home/g008kaaraan/pytorch/build**

## System Info
I am doing this on google cloud ubuntu 16.04

### which python:
/usr/bin/python

### echo $PYTHONPATH: 
blank

### echo $PATH:
/usr/local/cuda8.0/bin:/home/g008kaaraan/bin:/home/g008kaaraan/.local/bin:/home/g008kaaraan/anaconda2/bin:/usr/local/cuda8.0/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin

### echo $LD_LIBRARY_PATH:
/usr/local/cuda-8.0/lib64:/usr/local/cuda-8.0/lib64

I suspect this might be because of my default python is in /usr/bin which should not be as per the FAQ from caffe2 offical guide. How to deal with that.

 ## my bashrc:
export COCOAPI="/home/g008kaaraan/cocoapi"
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

If need to modify my bashrc then please tell how ?