This repository has been archived by the owner on Dec 2, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
/
Makefile
45 lines (38 loc) · 1.78 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
TAG ?= master
build:
bazel build -c opt --define=grpc_no_ares=true //...
run:
bazel run --define=grpc_no_ares=true //server -- --logtostderr --mysql_service_port=3306 --mysql_service_user=root --mlmd_db_name=metadb --mysql_service_password=%password%
.PHONY: test
test:
bazel test -c opt --define=grpc_no_ares=true //...
.PHONY: unittest
unittest:
bash test/scripts/unittests.sh
update:
bazel run //:gazelle -- update-repos -from_file=go.mod
# TODO: use bazel to compile the protos instead of local protoc.
mlmd-proto:
rm -rf /tmp/ml-metadata && \
git clone --branch $(TAG) https://github.com/google/ml-metadata.git /tmp/ml-metadata && \
rm -rf ml_metadata/proto && \
mkdir -p ml_metadata/proto && \
cp /tmp/ml-metadata/ml_metadata/proto/*.proto ml_metadata/proto && \
protoc -I . ml_metadata/proto/*.proto --go_out=plugins=grpc:. && \
mv ml_metadata/proto/*.go ml_metadata/
metadata-docker-image:
docker build -t gcr.io/kubeflow-images-public/metadata .
metadata-docker-image-aarch64:
docker build -t metadata-base-aarch64:latest -f ./dockerfiles/Dockerfile-linux-base.aarch64 . && \
docker build -t kubeflow-images-public/metadata --build-arg BASE_IMG=metadata-base-aarch64:latest --build-arg OUTPUT_DIR=linux_arm64_stripped .
swagger-py-client:
mkdir -p /tmp/swagger
wget http://central.maven.org/maven2/org/openapitools/openapi-generator-cli/4.0.1/openapi-generator-cli-4.0.1.jar -O /tmp/swagger/swagger-codegen-cli.jar && \
java -jar /tmp/swagger/swagger-codegen-cli.jar generate \
-i api/service.swagger.json \
-g python \
--package-name kubeflow.metadata.openapi_client \
-o /tmp/swagger && \
rm -rf sdk/python/kubeflow/metadata/swagger_client && \
cp -r /tmp/swagger/kubeflow/metadata/openapi_client sdk/python/kubeflow/metadata && \
rm -rf /tmp/swagger