在安装Graphvite之前,请确保你已经下载了graphvite源码,并且安装好CUDA(只使用CPU可以不需要)以及安装好了faiss。
Graphvite 源码地址:https://github.com/DeepGraphLearning/graphvite
faiss 安装教程请参考上一篇博客:(一)Graphvite源码编译安装——faiss 源码安装
-----------------------------分割线--------------------------------------------------------------------------------------
安装步骤:
1、下载graphvite v0.1.0 版本并解压
nohup wget https://github.com/DeepGraphLearning/graphvite/archive/v0.1.0.tar.gz > a.log 2>&1 &
tar -xvf v0.1.0.tar.gz
2、安装配置环境
cd graphvite-0.1.0
conda install -y --file conda/requirements.txt
3、创建build 文件进行编译
mkdir build && cd build
4、修改cmake/FindGFlags.cmake与FindGlog.cmake文件,指定conda install 安装的gflags 与 glog (可以不修改)
cmake ..
vim ./cmake/FindGFlags.cmake
vim ./cmake/FindGlog.cmake
if(WIN32)
find_path(GFLAGS_INCLUDE_DIR gflags/gflags.h
PATHS ${GFLAGS_ROOT_DIR}/src/windows)
else()
find_path(GFLAGS_INCLUDE_DIR gflags/gflags.h
PATHS ${GFLAGS_ROOT_DIR}
/home/deng/anaconda3/envs/graphvite/include) # add gflags include
endif()
4、编译(修改3)
cmake -DFAISS_PATH=/home/deng/usr/local/faiss_gpu/lib -DCMAKE_INSTALL_PREFIX=$HOME/usr/local/graphvite_gpu ..
make
存在的warning :
[ 33%] Building CUDA object src/CMakeFiles/graphvite.dir/graphvite.cu.o
/home/deng/anaconda3/envs/graphvite/include/python3.7m/pybind11/cast.h(1003): warning: pointless comparison of unsigned integer with zero
detected during:
instantiation of "__nv_bool pybind11::detail::type_caster<T, pybind11::detail::enable_if_t<<expression>, void>>::load(pybind11::handle, __nv_bool) [with T=pybind11::detail::intrinsic_t<pybind11::detail::conditional_t<false, pybind11::detail::void_type, const size_t &>>]"
(1927): here
instantiation of "__nv_bool pybind11::detail::argument_loader<Args...>::load_impl_sequence(pybind11::detail::function_call &, pybind11::detail::index_sequence<Is...>) [with Args=<pybind11::detail::value_and_holder &, std::vector<int, std::allocator<int>>, int, size_t>, Is=<0UL, 1UL, 2UL, 3UL>]"
(1907): here
instantiation of "__nv_bool pybind11::detail::argument_loader<Args...>::load_args(pybind11::detail::function_call &) [with Args=<pybind11::detail::value_and_holder &, std::vector<int, std::allocator<int>>, int, size_t>]"
/home/deng/anaconda3/envs/graphvite/include/python3.7m/pybind11/pybind11.h(141): here
instantiation of "void pybind11::cpp_function::initialize(Func &&, Return (*)(Args...), const Extra &...) [with Func=lambda [](pybind11::detail::value_and_holder &, std::vector<int, std::allocator<int>>, int, size_t)->void, Return=void, Args=<pybind11::detail::value_and_holder &, std::vector<int, std::allocator<int>>, int, size_t>, Extra=<pybind11::name, pybind11::is_method, pybind11::sibling, pybind11::detail::is_new_style_constructor, pybind11::no_gil, pybind11::arg_v, pybind11::arg_v, pybind11::arg_v>]"
/hom