mirror of
https://github.com/onepanelio/onepanel.git
synced 2025-10-05 13:46:51 +08:00
f99260fa93c98e55b35bf6e466559ff23ebe8b9a
Database migrations
Install goose
:
go get -u github.com/pressly/goose/cmd/goose
Note: Up migration are automatically executed when the application is run.
goose -dir db create <name> sql # Create migration in db folder
goose -dir db postgres "${DB_DATASOURCE_NAME}" up # Migrate the DB to the most recent version available
goose -dir db postgres "${DB_DATASOURCE_NAME}" down # Roll back the version by 1
goose help # See all available commands
gRPC installation
Install gRPC:
go get -u google.golang.org/grpc
Download pre-compiled binaries for your platform(protoc--.zip) from here: https://github.com/google/protobuf/releases
On macOS or Linux:
- Unzip
protoc-<version>-<platform>.zip
- Move
bin/protoc
to/usr/local/bin/
- Move
include/google
to/usr/local/include
Then use go get -u
to download the following packages:
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway
go get -u github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger
go get -u github.com/golang/protobuf/protoc-gen-go
This will place three binaries in your $GOBIN
;
protoc-gen-grpc-gateway
protoc-gen-swagger
protoc-gen-go
Make sure that your $GOBIN
is in your $PATH
.
gRPC Code generation
Generate Go, HTTP reverse-proxy and Swagger files:
protoc -I/usr/local/include \
-Iapi/third_party/googleapis \
-Iapi/ \
api/*.proto \
--go_out=plugins=grpc:api \
--grpc-gateway_out=logtostderr=true:api \
--swagger_out=logtostderr=true:api
Description
The open source, end-to-end computer vision platform. Label, build, train, tune, deploy and automate in a unified platform that runs on any cloud and on-premises.
aiaiopsannotationcomputer-visiondeeplearningetlhyperparameter-tuninginferencejupyterlablabelingmachinelearningmlopspipelinespytorchtensorboardtensorflowtrainingworkflows
Readme
Apache-2.0
31 MiB
Languages
Go
99.5%
Makefile
0.3%
Dockerfile
0.2%