Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
BaiXuePrincess
milvus
提交
b0f1ab7e
milvus
项目概览
BaiXuePrincess
/
milvus
与 Fork 源项目一致
从无法访问的项目Fork
通知
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,发现更多精彩内容 >>
未验证
提交
b0f1ab7e
编写于
11月 15, 2019
作者:
J
Jin Hai
提交者:
GitHub
11月 15, 2019
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #359 from youny626/0.6.0
Update build.sh and install.md
上级
140a7a59
817be9a6
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
95 addition
and
88 deletion
+95
-88
CHANGELOG.md
CHANGELOG.md
+1
-0
core/build.sh
core/build.sh
+85
-84
install.md
install.md
+9
-4
未找到文件。
CHANGELOG.md
浏览文件 @
b0f1ab7e
...
@@ -22,6 +22,7 @@ Please mark all change in change log and use the ticket from JIRA.
...
@@ -22,6 +22,7 @@ Please mark all change in change log and use the ticket from JIRA.
-
\#
314 - add Find FAISS in CMake
-
\#
314 - add Find FAISS in CMake
-
\#
310 - Add Q&A for 'protocol https not supported or disable in libcurl' issue
-
\#
310 - Add Q&A for 'protocol https not supported or disable in libcurl' issue
-
\#
322 - Add option to enable / disable prometheus
-
\#
322 - Add option to enable / disable prometheus
-
\#
358 - Add more information in build.sh and install.md
## Task
## Task
...
...
core/build.sh
浏览文件 @
b0f1ab7e
...
@@ -18,64 +18,65 @@ FAISS_ROOT="" #FAISS root path
...
@@ -18,64 +18,65 @@ FAISS_ROOT="" #FAISS root path
FAISS_SOURCE
=
"BUNDLED"
FAISS_SOURCE
=
"BUNDLED"
WITH_PROMETHEUS
=
"ON"
WITH_PROMETHEUS
=
"ON"
while
getopts
"p:d:t:f:ulrcgjhxzme"
arg
while
getopts
"p:d:t:f:ulrcgjhxzme"
arg
;
do
do
case
$arg
in
case
$arg
in
p
)
p
)
INSTALL_PREFIX
=
$OPTARG
INSTALL_PREFIX
=
$OPTARG
;;
;;
d
)
d
)
DB_PATH
=
$OPTARG
DB_PATH
=
$OPTARG
;;
;;
t
)
t
)
BUILD_TYPE
=
$OPTARG
# BUILD_TYPE
BUILD_TYPE
=
$OPTARG
# BUILD_TYPE
;;
;;
f
)
f
)
FAISS_ROOT
=
$OPTARG
FAISS_ROOT
=
$OPTARG
FAISS_SOURCE
=
"AUTO"
FAISS_SOURCE
=
"AUTO"
;;
;;
u
)
u
)
echo
"Build and run unittest cases"
echo
"Build and run unittest cases"
;
BUILD_UNITTEST
=
"ON"
BUILD_UNITTEST
=
"ON"
;
;;
;;
l
)
l
)
RUN_CPPLINT
=
"ON"
RUN_CPPLINT
=
"ON"
;;
;;
r
)
r
)
if
[[
-d
${
BUILD_OUTPUT_DIR
}
]]
;
then
if
[[
-d
${
BUILD_OUTPUT_DIR
}
]]
;
then
rm
./
${
BUILD_OUTPUT_DIR
}
-r
rm
./
${
BUILD_OUTPUT_DIR
}
-r
MAKE_CLEAN
=
"ON"
MAKE_CLEAN
=
"ON"
fi
fi
;;
;;
c
)
c
)
BUILD_COVERAGE
=
"ON"
BUILD_COVERAGE
=
"ON"
;;
;;
z
)
z
)
PROFILING
=
"ON"
PROFILING
=
"ON"
;;
;;
j
)
j
)
USE_JFROG_CACHE
=
"ON"
USE_JFROG_CACHE
=
"ON"
;;
;;
x
)
x
)
CUSTOMIZATION
=
"OFF"
# force use ori faiss
CUSTOMIZATION
=
"OFF"
# force use ori faiss
;;
;;
g
)
g
)
GPU_VERSION
=
"ON"
GPU_VERSION
=
"ON"
;;
;;
m
)
m
)
WITH_MKL
=
"ON"
WITH_MKL
=
"ON"
;;
;;
e
)
e
)
WITH_PROMETHEUS
=
"OFF"
WITH_PROMETHEUS
=
"OFF"
;;
;;
h
)
# help
h
)
# help
echo
"
echo
"
parameter:
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)
-f: FAISS root path(default: empty). The path should be an absolute path
containing the pre-installed lib/ and include/ directory of FAISS. If they can't be found,
we will build the original FAISS from source instead.
-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,30 +85,30 @@ parameter:
...
@@ -84,30 +85,30 @@ parameter:
-j: use jfrog cache build directory(default: OFF)
-j: use jfrog cache build directory(default: OFF)
-g: build GPU version(default: OFF)
-g: build GPU version(default: OFF)
-m: build with MKL(default: OFF)
-m: build with MKL(default: OFF)
-e: build without prometheus
-e: build without prometheus
(default: OFF)
-h: help
-h: help
usage:
usage:
./build.sh -p
\$
{INSTALL_PREFIX} -t
\$
{BUILD_TYPE} -f
\$
{FAISS_ROOT} [-u] [-l] [-r] [-c] [-z] [-j] [-g] [-m] [-e] [-h]
./build.sh -p
\$
{INSTALL_PREFIX} -t
\$
{BUILD_TYPE} -f
\$
{FAISS_ROOT} [-u] [-l] [-r] [-c] [-z] [-j] [-g] [-m] [-e] [-h]
"
"
exit
0
exit
0
;;
;;
?
)
?
)
echo
"ERROR! unknown argument"
echo
"ERROR! unknown argument"
exit
1
exit
1
;;
;;
esac
esac
done
done
if
[[
!
-d
${
BUILD_OUTPUT_DIR
}
]]
;
then
if
[[
!
-d
${
BUILD_OUTPUT_DIR
}
]]
;
then
mkdir
${
BUILD_OUTPUT_DIR
}
mkdir
${
BUILD_OUTPUT_DIR
}
fi
fi
cd
${
BUILD_OUTPUT_DIR
}
cd
${
BUILD_OUTPUT_DIR
}
# remove make cache since build.sh -l use default variables
# remove make cache since build.sh -l use default variables
# force update the variables each time
# force update the variables each time
make rebuild_cache
>
/dev/null 2>&1
make rebuild_cache
>
/dev/null 2>&1
CMAKE_CMD
=
"cmake
\
CMAKE_CMD
=
"cmake
\
-DBUILD_UNIT_TEST=
${
BUILD_UNITTEST
}
\
-DBUILD_UNIT_TEST=
${
BUILD_UNITTEST
}
\
...
@@ -129,25 +130,25 @@ echo ${CMAKE_CMD}
...
@@ -129,25 +130,25 @@ echo ${CMAKE_CMD}
${
CMAKE_CMD
}
${
CMAKE_CMD
}
if
[[
${
MAKE_CLEAN
}
==
"ON"
]]
;
then
if
[[
${
MAKE_CLEAN
}
==
"ON"
]]
;
then
make clean
make clean
fi
fi
if
[[
${
RUN_CPPLINT
}
==
"ON"
]]
;
then
if
[[
${
RUN_CPPLINT
}
==
"ON"
]]
;
then
# cpplint check
# cpplint check
make lint
make lint
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
echo
"ERROR! cpplint check failed"
echo
"ERROR! cpplint check failed"
exit
1
exit
1
fi
fi
echo
"cpplint check passed!"
echo
"cpplint check passed!"
# clang-format check
# clang-format check
make check-clang-format
make check-clang-format
if
[
$?
-ne
0
]
;
then
if
[
$?
-ne
0
]
;
then
echo
"ERROR! clang-format check failed"
echo
"ERROR! clang-format check failed"
exit
1
exit
1
fi
fi
echo
"clang-format check passed!"
echo
"clang-format check passed!"
# # clang-tidy check
# # clang-tidy check
# make check-clang-tidy
# make check-clang-tidy
...
@@ -158,11 +159,11 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
...
@@ -158,11 +159,11 @@ if [[ ${RUN_CPPLINT} == "ON" ]]; then
# echo "clang-tidy check passed!"
# echo "clang-tidy check passed!"
else
else
# strip binary symbol
# strip binary symbol
if
[[
${
BUILD_TYPE
}
!=
"Debug"
]]
;
then
if
[[
${
BUILD_TYPE
}
!=
"Debug"
]]
;
then
strip src/milvus_server
strip src/milvus_server
fi
fi
# compile and build
# compile and build
make
-j
8
install
||
exit
1
make
-j
8
install
||
exit
1
fi
fi
install.md
浏览文件 @
b0f1ab7e
...
@@ -29,10 +29,15 @@ $ ./build.sh -t Release
...
@@ -29,10 +29,15 @@ $ ./build.sh -t Release
```
```
By default, it will build CPU version. To build GPU version, add
`-g`
option
By default, it will build CPU version. To build GPU version, add
`-g`
option
```
```
shell
$
./build.sh
-g
$
./build.sh
-g
```
```
If you want to know the complete build options, run
```
shell
$.
/build.sh
-h
```
When the build is completed, all the stuff that you need in order to run Milvus will be installed under
`[Milvus root path]/core/milvus`
.
When the build is completed, all the stuff that you need in order to run Milvus will be installed under
`[Milvus root path]/core/milvus`
.
## Launch Milvus server
## Launch Milvus server
...
@@ -43,13 +48,13 @@ $ cd [Milvus root path]/core/milvus
...
@@ -43,13 +48,13 @@ $ cd [Milvus root path]/core/milvus
Add
`lib/`
directory to
`LD_LIBRARY_PATH`
Add
`lib/`
directory to
`LD_LIBRARY_PATH`
```
```
shell
$
export
LD_LIBRARY_PATH
=
$LD_LIBRARY_PATH
:[Milvus root path]/core/milvus/lib
$
export
LD_LIBRARY_PATH
=
$LD_LIBRARY_PATH
:[Milvus root path]/core/milvus/lib
```
```
Then start Milvus server:
Then start Milvus server:
```
```
shell
$
cd
scripts
$
cd
scripts
$
./start_server.sh
$
./start_server.sh
```
```
...
@@ -65,7 +70,7 @@ $ ./stop_server.sh
...
@@ -65,7 +70,7 @@ $ ./stop_server.sh
`protocol https not supported or disabled in libcurl`
.
`protocol https not supported or disabled in libcurl`
.
First, make sure you have
`libcurl4-openssl-dev`
installed in your system.
First, make sure you have
`libcurl4-openssl-dev`
installed in your system.
Then try reinstall CMake from source with
`--system-curl`
option:
Then try reinstall CMake from source with
`--system-curl`
option:
```
```
shell
$
./bootstrap
--system-curl
$
./bootstrap
--system-curl
$
make
$
make
$
sudo
make
install
$
sudo
make
install
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录