Skip to content

Commit

Permalink
add vermeer
Browse files Browse the repository at this point in the history
  • Loading branch information
Skittles258 committed Aug 23, 2024
1 parent 20cb885 commit fbf8260
Show file tree
Hide file tree
Showing 263 changed files with 74,611 additions and 0 deletions.
3 changes: 3 additions & 0 deletions vermeer/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*data*
*test*
*.git*
85 changes: 85 additions & 0 deletions vermeer/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
# Golang #
######################
# `go test -c` 生成的二进制文件
*.test

# go coverage 工具
*.out
*.prof
*.cgo1.go
*.cgo2.c
_cgo_defun.c
_cgo_gotypes.go
_cgo_export.*

# 编译文件 #
###################
*.com
*.class
#*.dll
*.exe
#*.o
#*.so
main
vermeer

# 压缩包 #
############
# Git 自带压缩,如果这些压缩包里有代码,建议解压后 commit
*.7z
*.dmg
*.gz
*.iso
*.jar
*.rar
*.tar
*.zip

# 日志文件和数据库 #
######################
*.log
*.sqlite
*.db

# 临时文件 #
######################
tmp/
.tmp/
data/
result/
vermeer_data/

# 系统生成文件 #
######################
.DS_Store
.DS_Store?
.AppleDouble
.LSOverride
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
.TemporaryItems
.fseventsd
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# IDE 和编辑器 #
######################
.idea/
/go_build_*
out/
#.vscode/
.vscode/settings.json
*.sublime*
__debug_bin
.project

# 前端工具链 #
######################
.sass-cache/*
node_modules/
/output/
/bin/*
!/bin/*.sh
16 changes: 16 additions & 0 deletions vermeer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM golang:1.18-alpine AS builder
COPY ./ /src/
WORKDIR /src/
ENV CGO_ENABLED="0"
RUN go build -o /go/bin/app

FROM alpine
EXPOSE 8080
COPY --from=builder /go/bin/app /go/bin/app
COPY --from=builder /src/config/ /go/bin/config/
COPY --from=builder /usr/local/go/lib/time/zoneinfo.zip /
ENV TZ=Asia/Shanghai
ENV ZONEINFO=/zoneinfo.zip

WORKDIR /go/bin/
ENTRYPOINT ["/go/bin/app"]
50 changes: 50 additions & 0 deletions vermeer/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# 图计算平台

### grpc protobuf 依赖项安装

````
go install google.golang.org/protobuf/cmd/[email protected] \
go install google.golang.org/grpc/cmd/[email protected]
````

---

### protobuf build

````
../../tools/protoc/osxm1/protoc *.proto --go-grpc_out=. --go_out=.
````

---

### 交叉编译

````
linux: GOARCH=amd64 GOOS=linux go build
CC=x86_64-linux-musl-gcc CGO_ENABLED=1 GOOS=linux GOARCH=amd64 go build -buildmode=plugin
````

---

### 运行

```
master: ./vermeer --env=master
worker: ./vermeer --env=worker01
# 参数env是指定使用config文件夹下的配置文件名
or
./vermeer.sh start master
./vermeer.sh start worker
# 配置项在vermeer.sh中指定
```

---

## supervisord

配置文件参考 config/supervisor.conf

````
# 启动 run as daemon
./supervisord -c supervisor.conf -d
````
22 changes: 22 additions & 0 deletions vermeer/algorithms/algorithms.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. See the NOTICE file distributed with this
work for additional information regarding copyright ownership. The ASF
licenses this file to You 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.
*/

package algorithms

import "vermeer/apps/compute"

var Algorithms []compute.AlgorithmMaker
Loading

0 comments on commit fbf8260

Please sign in to comment.