Skip to content

Commit fbf8260

Browse files
author
Skittles258
committed
add vermeer
1 parent 20cb885 commit fbf8260

File tree

263 files changed

+74611
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

263 files changed

+74611
-0
lines changed

vermeer/.dockerignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
*data*
2+
*test*
3+
*.git*

vermeer/.gitignore

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Golang #
2+
######################
3+
# `go test -c` 生成的二进制文件
4+
*.test
5+
6+
# go coverage 工具
7+
*.out
8+
*.prof
9+
*.cgo1.go
10+
*.cgo2.c
11+
_cgo_defun.c
12+
_cgo_gotypes.go
13+
_cgo_export.*
14+
15+
# 编译文件 #
16+
###################
17+
*.com
18+
*.class
19+
#*.dll
20+
*.exe
21+
#*.o
22+
#*.so
23+
main
24+
vermeer
25+
26+
# 压缩包 #
27+
############
28+
# Git 自带压缩,如果这些压缩包里有代码,建议解压后 commit
29+
*.7z
30+
*.dmg
31+
*.gz
32+
*.iso
33+
*.jar
34+
*.rar
35+
*.tar
36+
*.zip
37+
38+
# 日志文件和数据库 #
39+
######################
40+
*.log
41+
*.sqlite
42+
*.db
43+
44+
# 临时文件 #
45+
######################
46+
tmp/
47+
.tmp/
48+
data/
49+
result/
50+
vermeer_data/
51+
52+
# 系统生成文件 #
53+
######################
54+
.DS_Store
55+
.DS_Store?
56+
.AppleDouble
57+
.LSOverride
58+
._*
59+
.Spotlight-V100
60+
.Trashes
61+
ehthumbs.db
62+
Thumbs.db
63+
.TemporaryItems
64+
.fseventsd
65+
.VolumeIcon.icns
66+
.com.apple.timemachine.donotpresent
67+
68+
# IDE 和编辑器 #
69+
######################
70+
.idea/
71+
/go_build_*
72+
out/
73+
#.vscode/
74+
.vscode/settings.json
75+
*.sublime*
76+
__debug_bin
77+
.project
78+
79+
# 前端工具链 #
80+
######################
81+
.sass-cache/*
82+
node_modules/
83+
/output/
84+
/bin/*
85+
!/bin/*.sh

vermeer/Dockerfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
FROM golang:1.18-alpine AS builder
2+
COPY ./ /src/
3+
WORKDIR /src/
4+
ENV CGO_ENABLED="0"
5+
RUN go build -o /go/bin/app
6+
7+
FROM alpine
8+
EXPOSE 8080
9+
COPY --from=builder /go/bin/app /go/bin/app
10+
COPY --from=builder /src/config/ /go/bin/config/
11+
COPY --from=builder /usr/local/go/lib/time/zoneinfo.zip /
12+
ENV TZ=Asia/Shanghai
13+
ENV ZONEINFO=/zoneinfo.zip
14+
15+
WORKDIR /go/bin/
16+
ENTRYPOINT ["/go/bin/app"]

vermeer/README.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
# 图计算平台
2+
3+
### grpc protobuf 依赖项安装
4+
5+
````
6+
go install google.golang.org/protobuf/cmd/[email protected] \
7+
go install google.golang.org/grpc/cmd/[email protected]
8+
````
9+
10+
---
11+
12+
### protobuf build
13+
14+
````
15+
../../tools/protoc/osxm1/protoc *.proto --go-grpc_out=. --go_out=.
16+
````
17+
18+
---
19+
20+
### 交叉编译
21+
22+
````
23+
linux: GOARCH=amd64 GOOS=linux go build
24+
CC=x86_64-linux-musl-gcc CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -buildmode=plugin
25+
````
26+
27+
---
28+
29+
### 运行
30+
31+
```
32+
master: ./vermeer --env=master
33+
worker: ./vermeer --env=worker01
34+
# 参数env是指定使用config文件夹下的配置文件名
35+
or
36+
./vermeer.sh start master
37+
./vermeer.sh start worker
38+
# 配置项在vermeer.sh中指定
39+
```
40+
41+
---
42+
43+
## supervisord
44+
45+
配置文件参考 config/supervisor.conf
46+
47+
````
48+
# 启动 run as daemon
49+
./supervisord -c supervisor.conf -d
50+
````

vermeer/algorithms/algorithms.go

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
Licensed to the Apache Software Foundation (ASF) under one or more
3+
contributor license agreements. See the NOTICE file distributed with this
4+
work for additional information regarding copyright ownership. The ASF
5+
licenses this file to You under the Apache License, Version 2.0 (the
6+
"License"); you may not use this file except in compliance with the License.
7+
You may obtain a copy of the License at
8+
9+
http://www.apache.org/licenses/LICENSE-2.0
10+
11+
Unless required by applicable law or agreed to in writing, software
12+
distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
License for the specific language governing permissions and limitations
15+
under the License.
16+
*/
17+
18+
package algorithms
19+
20+
import "vermeer/apps/compute"
21+
22+
var Algorithms []compute.AlgorithmMaker

0 commit comments

Comments
 (0)