Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
milvus
milvus
提交
7d920e9c
M
milvus
项目概览
milvus
/
milvus
大约 1 年 前同步成功
通知
261
Star
22476
Fork
2472
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
M
milvus
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
7d920e9c
编写于
7月 08, 2021
作者:
Q
quicksilver
提交者:
GitHub
7月 08, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix compile error on CentOS (#6359)
Signed-off-by:
N
quicksilver
<
zhifeng.zhang@zilliz.com
>
上级
2e927905
变更
16
隐藏空白更改
内联
并排
Showing
16 changed file
with
163 addition
and
43 deletion
+163
-43
.env
.env
+2
-2
.github/workflows/publish-builder.yaml
.github/workflows/publish-builder.yaml
+8
-8
Makefile
Makefile
+0
-3
build/builder.sh
build/builder.sh
+11
-9
build/docker/builder/cpu/centos7/Dockerfile
build/docker/builder/cpu/centos7/Dockerfile
+74
-0
build/docker/builder/cpu/ubuntu18.04/Dockerfile
build/docker/builder/cpu/ubuntu18.04/Dockerfile
+1
-0
build/docker/builder/entrypoint.sh
build/docker/builder/entrypoint.sh
+10
-0
build/docker/openblas/centos7/Dockerfile
build/docker/openblas/centos7/Dockerfile
+17
-0
build/docker/openblas/ubuntu18.04/Dockerfile
build/docker/openblas/ubuntu18.04/Dockerfile
+0
-0
docker-compose.yml
docker-compose.yml
+10
-10
internal/core/src/indexbuilder/CMakeLists.txt
internal/core/src/indexbuilder/CMakeLists.txt
+1
-1
internal/core/src/segcore/CMakeLists.txt
internal/core/src/segcore/CMakeLists.txt
+1
-1
internal/kv/rocksdb/cwrapper/build.sh
internal/kv/rocksdb/cwrapper/build.sh
+8
-1
internal/storage/cwrapper/CMakeLists.txt
internal/storage/cwrapper/CMakeLists.txt
+3
-2
scripts/cwrapper_rocksdb_build.sh
scripts/cwrapper_rocksdb_build.sh
+9
-0
scripts/devcontainer.sh
scripts/devcontainer.sh
+8
-6
未找到文件。
.env
浏览文件 @
7d920e9c
IMAGE_REPO=milvusdb
IMAGE_ARCH=amd64
UBUNTU=
18.04
OS_NAME=ubuntu
18.04
DATE_VERSION=20210624-063026
LATEST_DATE_VERSION=
20210624-063026
LATEST_DATE_VERSION=
ubuntu18.04-latest
MINIO_ADDRESS=minio:9000
PULSAR_ADDRESS=pulsar://pulsar:6650
ETCD_ENDPOINTS=etcd:2379
.github/workflows/publish-builder.yaml
浏览文件 @
7d920e9c
...
...
@@ -16,15 +16,15 @@ on:
jobs
:
publish-builder
:
name
:
AMD64
Ubuntu ${{ matrix.ubuntu
}}
name
:
AMD64
${{ matrix.os
}}
runs-on
:
ubuntu-latest
timeout-minutes
:
60
strategy
:
fail-fast
:
false
matrix
:
ubuntu
:
[
18.04
]
os
:
[
ubuntu
18.04
]
env
:
UBUNTU
:
${{ matrix.ubuntu
}}
OS_NAME
:
${{ matrix.os
}}
steps
:
-
name
:
Checkout
uses
:
actions/checkout@v2
...
...
@@ -34,12 +34,12 @@ jobs:
-
name
:
Docker Pull
shell
:
bash
run
:
|
docker-compose pull --ignore-pull-failures ubuntu
DATE_VERSION=${{matrix.os}}-latest docker-compose pull --ignore-pull-failures builder
-
name
:
Docker Build
shell
:
bash
run
:
|
DATE_VERSION=${{
steps.extracter.outputs.version }} docker-compose build ubuntu
DATE_VERSION=
latest docker-compose build ubuntu
DATE_VERSION=${{
matrix.os}}-latest docker-compose build builder
DATE_VERSION=
${{matrix.os}}-${{ steps.extracter.outputs.version }} docker-compose build builder
-
name
:
Docker Push
if
:
success() && github.event_name == 'push' && github.repository == 'milvus-io/milvus'
continue-on-error
:
true
...
...
@@ -47,5 +47,5 @@ jobs:
run
:
|
docker login -u ${{ secrets.DOCKERHUB_USER }} \
-p ${{ secrets.DOCKERHUB_TOKEN }}
DATE_VERSION=${{
steps.extracter.outputs.version }} docker-compose push ubuntu
DATE_VERSION=
latest docker-compose push ubuntu
DATE_VERSION=${{
matrix.os}}-latest docker-compose push builder
DATE_VERSION=
${{matrix.os}}-${{ steps.extracter.outputs.version }} docker-compose push builder
Makefile
浏览文件 @
7d920e9c
...
...
@@ -100,10 +100,7 @@ build-cpp:
@
(
env
bash
$(PWD)
/scripts/core_build.sh
-f
"
$(CUSTOM_THIRDPARTY_PATH)
"
)
@
(
env
bash
$(PWD)
/scripts/cwrapper_build.sh
-t
Release
-f
"
$(CUSTOM_THIRDPARTY_PATH)
"
)
@
(
env
bash
$(PWD)
/scripts/cwrapper_dablooms_build.sh
-t
Release
-f
"
$(CUSTOM_THIRDPARTY_PATH)
"
)
@
go
env
-w
CGO_CFLAGS
=
"-I
$(PWD)
/internal/kv/rocksdb/cwrapper/output/include"
@
go
env
-w
CGO_LDFLAGS
=
"-L
$(PWD)
/internal/kv/rocksdb/cwrapper/output/lib -l:librocksdb.a -lstdc++ -lm -lz"
@
(
env
bash
$(PWD)
/scripts/cwrapper_rocksdb_build.sh
-t
Release
-f
"
$(CUSTOM_THIRDPARTY_PATH)
"
)
@
go get github.com/tecbot/gorocksdb
build-cpp-with-unittest
:
@
(
env
bash
$(PWD)
/scripts/core_build.sh
-u
-f
"
$(CUSTOM_THIRDPARTY_PATH)
"
)
...
...
build/builder.sh
浏览文件 @
7d920e9c
...
...
@@ -5,11 +5,12 @@ set -euo pipefail
# Absolute path to the toplevel milvus directory.
toplevel
=
$(
dirname
"
$(
cd
"
$(
dirname
"
${
0
}
"
)
"
;
pwd
)
"
)
export
OS_NAME
=
"
${
OS_NAME
:-
ubuntu18
.04
}
"
pushd
"
${
toplevel
}
"
if
[[
"
${
1
-
}
"
==
"pull"
]]
;
then
docker-compose pull
--ignore-pull-failures
ubuntu
# docker-compose pull --ignore-pull-failures gdbserver
docker-compose pull
--ignore-pull-failures
builder
exit
0
fi
...
...
@@ -31,20 +32,21 @@ gid=$(id -g)
[
"
$uid
"
-lt
500
]
&&
uid
=
501
[
"
$gid
"
-lt
500
]
&&
gid
=
$uid
mkdir
-p
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
/amd64-ubuntu18.04-ccache"
mkdir
-p
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
/amd64-ubuntu18.04-go-mod"
mkdir
-p
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
/amd64-ubuntu18.04-thirdparty"
mkdir
-p
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
/amd64-
${
OS_NAME
}
-ccache"
mkdir
-p
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
/amd64-
${
OS_NAME
}
-go-mod"
mkdir
-p
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
/amd64-
${
OS_NAME
}
-thirdparty"
mkdir
-p
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
/amd64-
${
OS_NAME
}
-vscode-extensions"
chmod
-R
777
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
"
docker-compose pull
--ignore-pull-failures
ubuntu
docker-compose pull
--ignore-pull-failures
builder
if
[[
"
${
CHECK_BUILDER
:-}
"
==
"1"
]]
;
then
docker-compose build
ubuntu
docker-compose build
builder
fi
if
[[
"
$(
id
-u
)
"
!=
"0"
]]
;
then
docker-compose run
--rm
-u
"
$uid
:
$gid
"
ubuntu
"
$@
"
docker-compose run
--rm
-u
"
$uid
:
$gid
"
builder
"
$@
"
else
docker-compose run
--rm
--entrypoint
"/tini --
"
ubuntu
"
$@
"
docker-compose run
--rm
--entrypoint
"/tini --
/entrypoint.sh"
builder
"
$@
"
fi
popd
build/docker/builder/cpu/centos7/Dockerfile
0 → 100644
浏览文件 @
7d920e9c
# Copyright (C) 2019-2020 Zilliz. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software distributed under the License
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing permissions and limitations under the License.
FROM
milvusdb/openblas:centos7-20210706
RUN
yum
install
-y
epel-release centos-release-scl-rh
&&
yum
install
-y
wget curl which
&&
\
wget
-qO-
"https://cmake.org/files/v3.14/cmake-3.14.3-Linux-x86_64.tar.gz"
|
tar
--strip-components
=
1
-xz
-C
/usr/local
&&
\
yum
install
-y
git make automake openssl-devel zlib-devel
\
libcurl-devel python3-devel
\
devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran
\
llvm-toolset-7.0-clang llvm-toolset-7.0-clang-tools-extra
\
ccache lcov
&&
\
rm
-rf
/var/cache/yum/
*
&&
\
echo
"source scl_source enable devtoolset-7"
>>
/etc/profile.d/devtoolset-7.sh
&&
\
echo
"source scl_source enable llvm-toolset-7.0"
>>
/etc/profile.d/llvm-toolset-7.sh
ENV
CLANG_TOOLS_PATH="/opt/rh/llvm-toolset-7.0/root/usr/bin"
# Install tbb
RUN
source
/etc/profile.d/devtoolset-7.sh
&&
\
git clone https://github.com/wjakob/tbb.git
&&
\
cd
tbb/build
&&
\
cmake ..
&&
make
-j
&&
make
install
&&
\
cd
../../
&&
rm
-rf
tbb/
# Install boost
RUN
source
/etc/profile.d/devtoolset-7.sh
&&
\
wget
-q
https://boostorg.jfrog.io/artifactory/main/release/1.65.1/source/boost_1_65_1.tar.gz
&&
\
tar
zxf boost_1_65_1.tar.gz
&&
cd
boost_1_65_1
&&
\
./bootstrap.sh
--prefix
=
/usr/local
--with-toolset
=
gcc
--without-libraries
=
python
&&
\
./b2
-j2
--prefix
=
/usr/local
--without-python
toolset
=
gcc
install
&&
\
cd
../
&&
rm
-rf
./boost_1_65_1
*
# Install Go
ENV
GOPATH /go
ENV
GOROOT /usr/local/go
ENV
GO111MODULE on
ENV
PATH $GOPATH/bin:$GOROOT/bin:$PATH
RUN
mkdir
-p
/usr/local/go
&&
wget
-qO-
"https://golang.org/dl/go1.15.2.linux-amd64.tar.gz"
|
tar
--strip-components
=
1
-xz
-C
/usr/local/go
&&
\
mkdir
-p
"
$GOPATH
/src"
"
$GOPATH
/bin"
&&
\
curl
-sSfL
https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh
-s
--
-b
${
GOPATH
}
/bin v1.27.0
&&
\
export
GO111MODULE
=
on
&&
go get github.com/quasilyte/go-ruleguard/cmd/ruleguard@v0.2.1
&&
\
go get
-v
github.com/ramya-rao-a/go-outline
&&
\
go get
-v
golang.org/x/tools/gopls
&&
\
go get
-v
github.com/uudashr/gopkgs/v2/cmd/gopkgs
&&
\
go get
-v
github.com/go-delve/delve/cmd/dlv
&&
\
go get
-v
honnef.co/go/tools/cmd/staticcheck
&&
\
go clean
--modcache
&&
\
chmod
-R
777
"
$GOPATH
"
&&
chmod
-R
a+w
$(
go
env
GOTOOLDIR
)
RUN
echo
'root:root'
| chpasswd
# refer: https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild
RUN
mkdir
-p
/home/milvus/.vscode-server/extensions
\
/home/milvus/.vscode-server-insiders/extensions
\
&&
chmod
-R
777 /home/milvus
COPY
--chown=0:0 build/docker/builder/entrypoint.sh /
RUN
wget
-qO-
"https://github.com/jeffoverflow/autouseradd/releases/download/1.2.0/autouseradd-1.2.0-amd64.tar.gz"
|
tar
xz
-C
/
--strip-components
1
RUN
wget
-O
/tini https://github.com/krallin/tini/releases/download/v0.19.0/tini
&&
\
chmod
+x /tini
ENTRYPOINT
[ "/tini", "--", "autouseradd", "--user", "milvus", "--", "/entrypoint.sh" ]
CMD
["tail", "-f", "/dev/null"]
build/docker/builder/cpu/ubuntu18.04/Dockerfile
浏览文件 @
7d920e9c
...
...
@@ -42,6 +42,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \
RUN
echo
'root:root'
| chpasswd
# refer: https://code.visualstudio.com/docs/remote/containers-advanced#_avoiding-extension-reinstalls-on-container-rebuild
RUN
mkdir
-p
/home/milvus/.vscode-server/extensions
\
/home/milvus/.vscode-server-insiders/extensions
\
&&
chmod
-R
777 /home/milvus
...
...
build/docker/builder/entrypoint.sh
浏览文件 @
7d920e9c
...
...
@@ -20,4 +20,14 @@ if ! whoami &> /dev/null; then
fi
fi
set
+e
if
[
-f
"/etc/profile.d/devtoolset-7.sh"
]
;
then
source
"/etc/profile.d/devtoolset-7.sh"
fi
if
[
-f
"/etc/profile.d/llvm-toolset-7.sh"
]
;
then
source
"/etc/profile.d/llvm-toolset-7.sh"
fi
set
-e
exec
"
$@
"
build/docker/openblas/centos7/Dockerfile
0 → 100644
浏览文件 @
7d920e9c
FROM
centos:centos7
SHELL
["/bin/bash", "-o", "pipefail", "-c"]
RUN
yum
install
-y
epel-release centos-release-scl-rh
&&
yum
install
-y
wget make automake
\
devtoolset-7-gcc devtoolset-7-gcc-c++ devtoolset-7-gcc-gfortran
&&
\
rm
-rf
/var/cache/yum/
*
&&
\
echo
"source scl_source enable devtoolset-7"
>>
/etc/profile.d/devtoolset-7.sh
RUN
source
/etc/profile.d/devtoolset-7.sh
&&
\
wget https://github.com/xianyi/OpenBLAS/archive/v0.3.9.tar.gz
&&
\
tar
zxvf v0.3.9.tar.gz
&&
cd
OpenBLAS-0.3.9
&&
\
make
TARGET
=
CORE2
DYNAMIC_ARCH
=
1
DYNAMIC_OLDER
=
1
USE_THREAD
=
0
USE_OPENMP
=
0
FC
=
gfortran
CC
=
gcc
COMMON_OPT
=
"-O3 -g -fPIC"
FCOMMON_OPT
=
"-O3 -g -fPIC -frecursive"
NMAX
=
"NUM_THREADS=128"
LIBPREFIX
=
"libopenblas"
LAPACKE
=
"NO_LAPACKE=1"
INTERFACE64
=
0
NO_STATIC
=
1
&&
\
make
PREFIX
=
/usr
NO_STATIC
=
1
install
&&
\
cd
..
&&
rm
-rf
OpenBLAS-0.3.9
&&
rm
v0.3.9.tar.gz
ENV
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/lib"
build/docker/openblas/Dockerfile
→
build/docker/openblas/
ubuntu18.04/
Dockerfile
浏览文件 @
7d920e9c
文件已移动
docker-compose.yml
浏览文件 @
7d920e9c
...
...
@@ -8,14 +8,14 @@ x-ccache: &ccache
CCACHE_DIR
:
/ccache
services
:
ubuntu
:
image
:
${IMAGE_REPO}/milvus-env:${IMAGE_ARCH}-
ubuntu${UBUNTU
}-${DATE_VERSION}
builder
:
image
:
${IMAGE_REPO}/milvus-env:${IMAGE_ARCH}-
${OS_NAME
}-${DATE_VERSION}
# Build devcontainer
build
:
context
:
.
dockerfile
:
build/docker/builder/cpu/
ubuntu${UBUNTU
}/Dockerfile
dockerfile
:
build/docker/builder/cpu/
${OS_NAME
}/Dockerfile
cache_from
:
-
${IMAGE_REPO}/milvus-env:${IMAGE_ARCH}-
ubuntu${UBUNTU
}-${LATEST_DATE_VERSION}
-
${IMAGE_REPO}/milvus-env:${IMAGE_ARCH}-
${OS_NAME
}-${LATEST_DATE_VERSION}
# user: {{ CURRENT_ID }}
shm_size
:
2G
environment
:
...
...
@@ -24,15 +24,15 @@ services:
ETCD_ENDPOINTS
:
${ETCD_ENDPOINTS}
MINIO_ADDRESS
:
${MINIO_ADDRESS}
CUSTOM_THIRDPARTY_PATH
:
/tmp/thirdparty
volumes
:
&
ubuntu
-volumes
volumes
:
&
builder
-volumes
-
.:/go/src/github.com/milvus-io/milvus:delegated
-
${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-
ubuntu${UBUNTU
}-ccache:/ccache:delegated
-
${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-
ubuntu${UBUNTU
}-go-mod:/go/pkg/mod:delegated
-
${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-
ubuntu${UBUNTU
}-thirdparty:/tmp/thirdparty:delegated
-
${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-
ubuntu${UBUNTU
}-vscode-extensions:/home/milvus/.vscode-server/extensions:delegated
-
${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-
${OS_NAME
}-ccache:/ccache:delegated
-
${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-
${OS_NAME
}-go-mod:/go/pkg/mod:delegated
-
${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-
${OS_NAME
}-thirdparty:/tmp/thirdparty:delegated
-
${DOCKER_VOLUME_DIRECTORY:-.docker}/${IMAGE_ARCH}-
${OS_NAME
}-vscode-extensions:/home/milvus/.vscode-server/extensions:delegated
working_dir
:
"
/go/src/github.com/milvus-io/milvus"
# Command
command
:
&
ubuntu
-command
>
command
:
&
builder
-command
>
/bin/bash -c "
make check-proto-product && make verifiers && make unittest"
...
...
internal/core/src/indexbuilder/CMakeLists.txt
浏览文件 @
7d920e9c
...
...
@@ -19,7 +19,7 @@ add_library(milvus_indexbuilder SHARED
target_link_libraries
(
milvus_indexbuilder
tbb milvus_utils pthread knowhere log milvus_proto
dl
backtrace
dl
milvus_common
milvus_query
)
...
...
internal/core/src/segcore/CMakeLists.txt
浏览文件 @
7d920e9c
...
...
@@ -36,7 +36,7 @@ add_library(milvus_segcore SHARED
target_link_libraries
(
milvus_segcore
tbb milvus_utils pthread knowhere log milvus_proto
${
OpenMP_CXX_FLAGS
}
dl
backtrace
dl
milvus_common
milvus_query
milvus_utils
...
...
internal/kv/rocksdb/cwrapper/build.sh
浏览文件 @
7d920e9c
...
...
@@ -10,7 +10,14 @@ DIR=$( cd -P $( dirname $SOURCE ) && pwd )
# echo $DIR
CGO_CFLAGS
=
"-I
$(
pwd
)
/output/include"
CGO_LDFLAGS
=
"-L
$(
pwd
)
/output/lib -l:librocksdb.a -lstdc++ -lm -lz"
if
[
-f
"
$(
pwd
)
/output/lib/librocksdb.a"
]
;
then
CGO_LDFLAGS
=
"-L
$(
pwd
)
/output/lib -l:librocksdb.a -lstdc++ -lm -lz"
elif
[
-f
"
$(
pwd
)
/output/lib64/librocksdb.a"
]
;
then
CGO_LDFLAGS
=
"-L
$(
pwd
)
/output/lib64 -l:librocksdb.a -lstdc++ -lm -lz"
else
echo
"No found 'librocksdb.a'."
exit
1
fi
OUTPUT_LIB
=
${
DIR
}
/output
...
...
internal/storage/cwrapper/CMakeLists.txt
浏览文件 @
7d920e9c
...
...
@@ -83,6 +83,7 @@ macro( build_arrow )
file
(
MAKE_DIRECTORY
"
${
UTF8PROC_LOCATION
}
/include"
)
endif
()
include
(
GNUInstallDirs
)
add_library
(
thrift STATIC IMPORTED
)
set_target_properties
(
thrift
...
...
@@ -104,7 +105,7 @@ macro( build_arrow )
set_target_properties
(
arrow
PROPERTIES
IMPORTED_GLOBAL TRUE
IMPORTED_LOCATION
${
INSTALL_DIR
}
/
lib
/libarrow.a
IMPORTED_LOCATION
${
INSTALL_DIR
}
/
${
CMAKE_INSTALL_LIBDIR
}
/libarrow.a
INTERFACE_INCLUDE_DIRECTORIES
${
INSTALL_DIR
}
/include
)
add_dependencies
(
arrow arrow-ep
)
...
...
@@ -112,7 +113,7 @@ macro( build_arrow )
set_target_properties
(
parquet
PROPERTIES
IMPORTED_GLOBAL TRUE
IMPORTED_LOCATION
${
INSTALL_DIR
}
/
lib
/libparquet.a
IMPORTED_LOCATION
${
INSTALL_DIR
}
/
${
CMAKE_INSTALL_LIBDIR
}
/libparquet.a
INTERFACE_INCLUDE_DIRECTORIES
${
INSTALL_DIR
}
/include
)
add_dependencies
(
parquet arrow-ep
)
target_link_libraries
(
parquet INTERFACE arrow thrift utf8proc
)
...
...
scripts/cwrapper_rocksdb_build.sh
浏览文件 @
7d920e9c
...
...
@@ -62,3 +62,12 @@ if [[ ! ${jobs+1} ]]; then
jobs
=
$(
nproc
)
fi
make
-j
${
jobs
}
go
env
-w
CGO_CFLAGS
=
"-I
${
OUTPUT_LIB
}
/include"
if
[
-f
"
${
OUTPUT_LIB
}
/lib/librocksdb.a"
]
;
then
go
env
-w
CGO_LDFLAGS
=
"-L
${
OUTPUT_LIB
}
/lib -l:librocksdb.a -lstdc++ -lm -lz"
else
go
env
-w
CGO_LDFLAGS
=
"-L
${
OUTPUT_LIB
}
/lib64 -l:librocksdb.a -lstdc++ -lm -lz"
fi
go get github.com/tecbot/gorocksdb
scripts/devcontainer.sh
浏览文件 @
7d920e9c
...
...
@@ -8,6 +8,8 @@ while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symli
done
ROOT_DIR
=
"
$(
cd
-P
"
$(
dirname
"
$SOURCE
"
)
/.."
&&
pwd
)
"
export
OS_NAME
=
"
${
OS_NAME
:-
ubuntu18
.04
}
"
unameOut
=
"
$(
uname
-s
)
"
case
"
${
unameOut
}
"
in
Linux
*
)
machine
=
Linux
;;
...
...
@@ -50,15 +52,15 @@ fi
pushd
"
$ROOT_DIR
"
mkdir
-p
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
/amd64-
ubuntu18.04
-ccache"
mkdir
-p
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
/amd64-
ubuntu18.04
-go-mod"
mkdir
-p
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
/amd64-
ubuntu18.04
-thirdparty"
mkdir
-p
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
/amd64-
ubuntu18.04
-vscode-extensions"
mkdir
-p
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
/amd64-
${
OS_NAME
}
-ccache"
mkdir
-p
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
/amd64-
${
OS_NAME
}
-go-mod"
mkdir
-p
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
/amd64-
${
OS_NAME
}
-thirdparty"
mkdir
-p
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
/amd64-
${
OS_NAME
}
-vscode-extensions"
chmod
-R
777
"
${
DOCKER_VOLUME_DIRECTORY
:-
.docker
}
"
if
[
"
${
1
-
}
"
=
"build"
]
;
then
docker-compose
-f
$ROOT_DIR
/docker-compose-devcontainer.yml pull
--ignore-pull-failures
ubuntu
docker-compose
-f
$ROOT_DIR
/docker-compose-devcontainer.yml build
ubuntu
docker-compose
-f
$ROOT_DIR
/docker-compose-devcontainer.yml pull
--ignore-pull-failures
builder
docker-compose
-f
$ROOT_DIR
/docker-compose-devcontainer.yml build
builder
fi
if
[
"
${
1
-
}
"
=
"up"
]
;
then
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录