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)

Now I want to try run this demo using libtorch https://github.com/iamhankai/cpp-pytorch 26
But I am always RECEIVING ERROR!
This is CMakeLists.txt:
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(custom_ops)

find_package(Torch REQUIRED)

find_package( OpenCV REQUIRED)
include_directories( ${OpenCV_INCLUDE_DIRS} )

add_executable(example-app example-app.cpp)
target_link_libraries(example-app ${TORCH_LIBRARIES} ${OpenCV_LIBS})
set_property(TARGET example-app PROPERTY CXX_STANDARD 11)