forked from SeldonIO/MLServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
63 lines (49 loc) · 1.42 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
VERSION = $(shell sed 's/^__version__ = "\(.*\)"/\1/' ./mlserver/version.py)
IMAGE_NAME =seldonio/mlserver
.PHONY: install-dev _generate generate run build push-test push test lint fmt version clean licenses
install-dev:
pip install -r requirements-dev.txt
pip install --editable .
pip install --editable ./runtimes/sklearn
pip install --editable ./runtimes/xgboost
pip install --editable ./runtimes/mllib
pip install --editable ./runtimes/lightgbm
_generate: # "private" target to call `fmt` after `generate`
./hack/generate-types.sh
generate: | _generate fmt
run:
mlserver start \
./tests/testdata
build:
docker build . -t ${IMAGE_NAME}:${VERSION}
python setup.py sdist bdist_wheel
python ./runtimes/sklearn/setup.py sdist bdist_wheel
python ./runtimes/xgboost/setup.py sdist bdist_wheel
python ./runtimes/mllib/setup.py sdist bdist_wheel
python ./runtimes/lightgbm/setup.py sdist bdist_wheel
clean:
rm -rf ./dist
push-test:
twine upload --repository-url https://test.pypi.org/legacy/ dist/*
push:
docker push ${IMAGE_NAME}:${VERSION}
twine upload dist/*
test:
tox
lint: generate
flake8 .
mypy .
# Check if something has changed after generation
git \
--no-pager diff \
--exit-code \
.
licenses:
tox --recreate -e licenses
cut -d, -f1,3 ./licenses/license_info.csv \
> ./licenses/license_info.no_versions.csv
fmt:
black . \
--exclude "(mlserver/grpc/dataplane_pb2*)"
version:
@echo ${VERSION}