Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
70109864
milvus
项目概览
BaiXuePrincess
/
milvus
与 Fork 源项目一致
Fork自
milvus / milvus
通知
7
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
70109864
编写于
11月 13, 2019
作者:
Z
Zhiru Zhu
浏览文件
操作
浏览文件
下载
差异文件
merge change from another pr
上级
85e76aad
ff7452a2
变更
4
显示空白变更内容
内联
并排
Showing
4 changed file
with
25 addition
and
34 deletion
+25
-34
ci/scripts/build.sh
ci/scripts/build.sh
+10
-3
core/build.sh
core/build.sh
+11
-11
core/src/index/cmake/ThirdPartyPackagesCore.cmake
core/src/index/cmake/ThirdPartyPackagesCore.cmake
+3
-19
core/src/index/thirdparty/versions.txt
core/src/index/thirdparty/versions.txt
+1
-1
未找到文件。
ci/scripts/build.sh
浏览文件 @
70109864
...
@@ -15,6 +15,7 @@ CORE_BUILD_DIR="${MILVUS_CORE_DIR}/cmake_build"
...
@@ -15,6 +15,7 @@ CORE_BUILD_DIR="${MILVUS_CORE_DIR}/cmake_build"
BUILD_TYPE
=
"Debug"
BUILD_TYPE
=
"Debug"
BUILD_UNITTEST
=
"OFF"
BUILD_UNITTEST
=
"OFF"
INSTALL_PREFIX
=
"/opt/milvus"
INSTALL_PREFIX
=
"/opt/milvus"
FAISS_ROOT
=
""
BUILD_COVERAGE
=
"OFF"
BUILD_COVERAGE
=
"OFF"
USE_JFROG_CACHE
=
"OFF"
USE_JFROG_CACHE
=
"OFF"
RUN_CPPLINT
=
"OFF"
RUN_CPPLINT
=
"OFF"
...
@@ -22,7 +23,7 @@ GPU_VERSION="OFF"
...
@@ -22,7 +23,7 @@ GPU_VERSION="OFF"
WITH_MKL
=
"OFF"
WITH_MKL
=
"OFF"
CUDA_COMPILER
=
/usr/local/cuda/bin/nvcc
CUDA_COMPILER
=
/usr/local/cuda/bin/nvcc
while
getopts
"o:t:b:gulcjmh"
arg
while
getopts
"o:t:b:
f:
gulcjmh"
arg
do
do
case
$arg
in
case
$arg
in
o
)
o
)
...
@@ -34,6 +35,9 @@ do
...
@@ -34,6 +35,9 @@ do
b
)
b
)
CORE_BUILD_DIR
=
$OPTARG
# CORE_BUILD_DIR
CORE_BUILD_DIR
=
$OPTARG
# CORE_BUILD_DIR
;;
;;
f
)
FAISS_ROOT
=
$OPTARG
# FAISS ROOT PATH
;;
g
)
g
)
GPU_VERSION
=
"ON"
;
GPU_VERSION
=
"ON"
;
;;
;;
...
@@ -60,6 +64,7 @@ parameter:
...
@@ -60,6 +64,7 @@ parameter:
-o: install prefix(default: /opt/milvus)
-o: install prefix(default: /opt/milvus)
-t: build type(default: Debug)
-t: build type(default: Debug)
-b: core code build directory
-b: core code build directory
-f: faiss root path
-g: gpu version
-g: gpu version
-u: building unit test options(default: OFF)
-u: building unit test options(default: OFF)
-l: run cpplint, clang-format and clang-tidy(default: OFF)
-l: run cpplint, clang-format and clang-tidy(default: OFF)
...
@@ -69,7 +74,7 @@ parameter:
...
@@ -69,7 +74,7 @@ parameter:
-h: help
-h: help
usage:
usage:
./build.sh -o
\$
{INSTALL_PREFIX} -t
\$
{BUILD_TYPE} -b
\$
{CORE_BUILD_DIR} [-u] [-l] [-c] [-j] [-m] [-h]
./build.sh -o
\$
{INSTALL_PREFIX} -t
\$
{BUILD_TYPE} -b
\$
{CORE_BUILD_DIR}
-f
\$
{FAISS_ROOT}
[-u] [-l] [-c] [-j] [-m] [-h]
"
"
exit
0
exit
0
;;
;;
...
@@ -94,8 +99,10 @@ CMAKE_CMD="cmake \
...
@@ -94,8 +99,10 @@ CMAKE_CMD="cmake \
-DBUILD_UNIT_TEST=
${
BUILD_UNITTEST
}
\
-DBUILD_UNIT_TEST=
${
BUILD_UNITTEST
}
\
-DBUILD_COVERAGE=
${
BUILD_COVERAGE
}
\
-DBUILD_COVERAGE=
${
BUILD_COVERAGE
}
\
-DUSE_JFROG_CACHE=
${
USE_JFROG_CACHE
}
\
-DUSE_JFROG_CACHE=
${
USE_JFROG_CACHE
}
\
-DBUILD_FAISS_WITH_MKL=
${
WITH_MKL
}
\
-DFAISS_ROOT=
${
FAISS_ROOT
}
\
-DFAISS_WITH_MKL=
${
WITH_MKL
}
\
-DArrow_SOURCE=AUTO
\
-DArrow_SOURCE=AUTO
\
-DFAISS_SOURCE=AUTO
\
${
MILVUS_CORE_DIR
}
"
${
MILVUS_CORE_DIR
}
"
echo
${
CMAKE_CMD
}
echo
${
CMAKE_CMD
}
${
CMAKE_CMD
}
${
CMAKE_CMD
}
...
...
core/build.sh
浏览文件 @
70109864
...
@@ -14,16 +14,10 @@ CUSTOMIZATION="OFF" # default use ori faiss
...
@@ -14,16 +14,10 @@ CUSTOMIZATION="OFF" # default use ori faiss
CUDA_COMPILER
=
/usr/local/cuda/bin/nvcc
CUDA_COMPILER
=
/usr/local/cuda/bin/nvcc
GPU_VERSION
=
"OFF"
#defaults to CPU version
GPU_VERSION
=
"OFF"
#defaults to CPU version
WITH_MKL
=
"OFF"
WITH_MKL
=
"OFF"
FAISS_ROOT
=
""
FAISS_SOURCE
=
"BUNDLED"
CUSTOMIZED_FAISS_URL
=
"
${
FAISS_URL
:-
NONE
}
"
while
getopts
"p:d:t:f:ulrcgjhxzm"
arg
wget
-q
--method
HEAD
${
CUSTOMIZED_FAISS_URL
}
if
[
$?
-eq
0
]
;
then
CUSTOMIZATION
=
"ON"
else
CUSTOMIZATION
=
"OFF"
fi
while
getopts
"p:d:t:ulrcgjhxzm"
arg
do
do
case
$arg
in
case
$arg
in
p
)
p
)
...
@@ -35,6 +29,10 @@ do
...
@@ -35,6 +29,10 @@ do
t
)
t
)
BUILD_TYPE
=
$OPTARG
# BUILD_TYPE
BUILD_TYPE
=
$OPTARG
# BUILD_TYPE
;;
;;
f
)
FAISS_ROOT
=
$OPTARG
FAISS_SOURCE
=
"AUTO"
;;
u
)
u
)
echo
"Build and run unittest cases"
;
echo
"Build and run unittest cases"
;
BUILD_UNITTEST
=
"ON"
;
BUILD_UNITTEST
=
"ON"
;
...
@@ -73,6 +71,7 @@ parameter:
...
@@ -73,6 +71,7 @@ parameter:
-p: install prefix(default:
$(
pwd
)
/milvus)
-p: install prefix(default:
$(
pwd
)
/milvus)
-d: db data path(default: /tmp/milvus)
-d: db data path(default: /tmp/milvus)
-t: build type(default: Debug)
-t: build type(default: Debug)
-f: faiss root path(default: empty)
-u: building unit test options(default: OFF)
-u: building unit test options(default: OFF)
-l: run cpplint, clang-format and clang-tidy(default: OFF)
-l: run cpplint, clang-format and clang-tidy(default: OFF)
-r: remove previous build directory(default: OFF)
-r: remove previous build directory(default: OFF)
...
@@ -84,7 +83,7 @@ parameter:
...
@@ -84,7 +83,7 @@ parameter:
-h: help
-h: help
usage:
usage:
./build.sh -p
\$
{INSTALL_PREFIX} -t
\$
{BUILD_TYPE} [-u] [-l] [-r] [-c] [-z] [-j] [-g] [-m] [-h]
./build.sh -p
\$
{INSTALL_PREFIX} -t
\$
{BUILD_TYPE}
-f
\$
{FAISS_ROOT}
[-u] [-l] [-r] [-c] [-z] [-j] [-g] [-m] [-h]
"
"
exit
0
exit
0
;;
;;
...
@@ -109,13 +108,14 @@ CMAKE_CMD="cmake \
...
@@ -109,13 +108,14 @@ CMAKE_CMD="cmake \
-DBUILD_UNIT_TEST=
${
BUILD_UNITTEST
}
\
-DBUILD_UNIT_TEST=
${
BUILD_UNITTEST
}
\
-DCMAKE_INSTALL_PREFIX=
${
INSTALL_PREFIX
}
-DCMAKE_INSTALL_PREFIX=
${
INSTALL_PREFIX
}
-DCMAKE_BUILD_TYPE=
${
BUILD_TYPE
}
\
-DCMAKE_BUILD_TYPE=
${
BUILD_TYPE
}
\
-DFAISS_ROOT=
${
FAISS_ROOT
}
\
-DFAISS_SOURCE=
${
FAISS_SOURCE
}
\
-DCMAKE_CUDA_COMPILER=
${
CUDA_COMPILER
}
\
-DCMAKE_CUDA_COMPILER=
${
CUDA_COMPILER
}
\
-DBUILD_COVERAGE=
${
BUILD_COVERAGE
}
\
-DBUILD_COVERAGE=
${
BUILD_COVERAGE
}
\
-DMILVUS_DB_PATH=
${
DB_PATH
}
\
-DMILVUS_DB_PATH=
${
DB_PATH
}
\
-DMILVUS_ENABLE_PROFILING=
${
PROFILING
}
\
-DMILVUS_ENABLE_PROFILING=
${
PROFILING
}
\
-DUSE_JFROG_CACHE=
${
USE_JFROG_CACHE
}
\
-DUSE_JFROG_CACHE=
${
USE_JFROG_CACHE
}
\
-DCUSTOMIZATION=
${
CUSTOMIZATION
}
\
-DCUSTOMIZATION=
${
CUSTOMIZATION
}
\
-DFAISS_URL=
${
CUSTOMIZED_FAISS_URL
}
\
-DMILVUS_GPU_VERSION=
${
GPU_VERSION
}
\
-DMILVUS_GPU_VERSION=
${
GPU_VERSION
}
\
-DFAISS_WITH_MKL=
${
WITH_MKL
}
\
-DFAISS_WITH_MKL=
${
WITH_MKL
}
\
../"
../"
...
...
core/src/index/cmake/ThirdPartyPackagesCore.cmake
浏览文件 @
70109864
...
@@ -225,28 +225,12 @@ foreach (_VERSION_ENTRY ${TOOLCHAIN_VERSIONS_TXT})
...
@@ -225,28 +225,12 @@ foreach (_VERSION_ENTRY ${TOOLCHAIN_VERSIONS_TXT})
set
(
${
_LIB_NAME
}
"
${
_LIB_VERSION
}
"
)
set
(
${
_LIB_NAME
}
"
${
_LIB_VERSION
}
"
)
endforeach
()
endforeach
()
if
(
CUSTOMIZATION
)
if
(
DEFINED ENV{FAISS_SOURCE_URL}
)
execute_process
(
COMMAND wget -q --method HEAD
${
FAISS_URL
}
RESULT_VARIABLE return_code
)
set
(
FAISS_SOURCE_URL
"$ENV{FAISS_SOURCE_URL}"
)
message
(
STATUS
"Check the remote cache file
${
FAISS_URL
}
. return code =
${
return_code
}
"
)
if
(
NOT return_code EQUAL 0
)
MESSAGE
(
FATAL_ERROR
"Can't access to
${
FAISS_URL
}
"
)
else
()
set
(
FAISS_SOURCE_URL
${
FAISS_URL
}
)
# set(FAISS_MD5 "a589663865a8558205533c8ac414278c")
# set(FAISS_MD5 "57da9c4f599cc8fa4260488b1c96e1cc") # commit-id 6dbdf75987c34a2c853bd172ea0d384feea8358c branch-0.2.0
# set(FAISS_MD5 "21deb1c708490ca40ecb899122c01403") # commit-id 643e48f479637fd947e7b93fa4ca72b38ecc9a39 branch-0.2.0
# set(FAISS_MD5 "072db398351cca6e88f52d743bbb9fa0") # commit-id 3a2344d04744166af41ef1a74449d68a315bfe17 branch-0.2.1
# set(FAISS_MD5 "c89ea8e655f5cdf58f42486f13614714") # commit-id 9c28a1cbb88f41fa03b03d7204106201ad33276b branch-0.2.1
# set(FAISS_MD5 "87fdd86351ffcaf3f80dc26ade63c44b") # commit-id 841a156e67e8e22cd8088e1b58c00afbf2efc30b branch-0.2.1
# set(FAISS_MD5 "f3b2ce3364c3fa7febd3aa7fdd0fe380") # commit-id 694e03458e6b69ce8a62502f71f69a614af5af8f branch-0.3.0
# set(FAISS_MD5 "bb30722c22390ce5f6759ccb216c1b2a") # commit-id d324db297475286afe107847c7fb7a0f9dc7e90e branch-0.3.0
set
(
FAISS_MD5
"2293cdb209c3718e3b19f3edae8b32b3"
)
# commit-id a13c1205dc52977a9ad3b33a14efa958604a8bff branch-0.3.0
endif
()
else
()
else
()
set
(
FAISS_SOURCE_URL
"https://github.com/JinHai-CN/faiss/archive/
1.6.0
.tar.gz"
)
set
(
FAISS_SOURCE_URL
"https://github.com/JinHai-CN/faiss/archive/
${
FAISS_VERSION
}
.tar.gz"
)
set
(
FAISS_MD5
"b02c1a53234f5acc9bea1b0c55524f50"
)
set
(
FAISS_MD5
"b02c1a53234f5acc9bea1b0c55524f50"
)
endif
()
endif
()
message
(
STATUS
"FAISS URL =
${
FAISS_SOURCE_URL
}
"
)
if
(
DEFINED ENV{KNOWHERE_ARROW_URL}
)
if
(
DEFINED ENV{KNOWHERE_ARROW_URL}
)
set
(
ARROW_SOURCE_URL
"$ENV{KNOWHERE_ARROW_URL}"
)
set
(
ARROW_SOURCE_URL
"$ENV{KNOWHERE_ARROW_URL}"
)
...
...
core/src/index/thirdparty/versions.txt
浏览文件 @
70109864
...
@@ -3,5 +3,5 @@ BOOST_VERSION=1.70.0
...
@@ -3,5 +3,5 @@ BOOST_VERSION=1.70.0
GTEST_VERSION=1.8.1
GTEST_VERSION=1.8.1
LAPACK_VERSION=v3.8.0
LAPACK_VERSION=v3.8.0
OPENBLAS_VERSION=v0.3.6
OPENBLAS_VERSION=v0.3.6
FAISS_VERSION=
branch-0.3
.0
FAISS_VERSION=
1.6
.0
MKL_VERSION=2019.5.281
MKL_VERSION=2019.5.281
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录