1st trial:
using pip3.6 install to install pytorch1.0 and download libtorch zip file.
cannot use it with opencv, throwing error of undefined error imread
2nd trial
build from source! Always report this:
Install the project...
-- Install configuration: "Release"
-- Set runtime path of "/data/lvjc/pytorch/torch/lib/tmp_install/lib/libmkldnn.so.0.17.0" to "$ORIGIN:/data/lvjc/envs/anaconda2/lib"
-- Set runtime path of "/data/lvjc/pytorch/torch/lib/tmp_install/lib/libc10.so" to "$ORIGIN"
-- Set runtime path of "/data/lvjc/pytorch/torch/lib/tmp_install/lib/libc10_cuda.so" to "$ORIGIN"
-- Set runtime path of "/data/lvjc/pytorch/torch/lib/tmp_install/lib/libcaffe2.so" to "$ORIGIN:/data/lvjc/envs/anaconda2/lib:/usr/local/cuda/lib64"
-- Set runtime path of "/data/lvjc/pytorch/torch/lib/tmp_install/lib/libcaffe2_gpu.so" to "$ORIGIN:/data/lvjc/envs/anaconda2/lib:/usr/local/cuda/lib64"
-- Set runtime path of "/data/lvjc/pytorch/torch/lib/tmp_install/lib/libtorch.so.1" to "$ORIGIN:/usr/local/cuda/lib64:/data/lvjc/envs/anaconda2/lib"
-- Set runtime path of "/data/lvjc/pytorch/torch/lib/tmp_install/lib/libcaffe2_module_test_dynamic.so" to "$ORIGIN:/data/lvjc/envs/anaconda2/lib"
ls: cannot access 'build.ninja': No such file or directory
I have tried soooo hard to build again and again. I will show you.
Setups:
Docker version 18.06.1-ce, build e68fc7a
CUDA 9.0
Anaconda 3
CMAKE 3.11.1 (conda)
GCC G++ 5.4
Build PyTorch from source
Download LibTorch from official site(tried from source but receive error ls: cannot access 'build.ninja': No such file or directory)
OpenCV3.4.1 from conda install opencv (have tried build version 4.0.0 from source but received error target opencv_ts; Makefile:162: recipe for target 'all' failed; make: *** [all] Error 2)
Thanks for the info.
As far as I know you won’t be able to include OpenCV in your C++ application by using the conda version, but would need to build it.
It looks currently as if your issue is related to OpenCV.
To get a better error message, you might run the build with make VERBOSE=1.