forked from bentoml/BentoML
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
72 lines (65 loc) · 2.97 KB
/
Makefile
File metadata and controls
72 lines (65 loc) · 2.97 KB
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
64
65
66
67
68
69
70
71
72
.DEFAULT_GOAL := help
help: ## Show all Makefile targets
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
# General Development
test: ## Run all unit tests with current Python version and env
@./ci/unit_tests.sh || (echo "Error running tests... You may need to run 'make install-test-deps'"; exit 1)
format: ## Format code to adhere to BentoML style
./dev/format.sh
lint: format ## Lint code
./dev/lint.sh
install-local: ## Install BentoML from current directory in editable mode
pip install --editable .
bentoml --version
install-test-deps: ## Install all test dependencies
@echo Ensuring test dependencies...
@pip install -e ".[test]"
# Protos
gen-protos: ## Build protobuf for Python and Node
@./dev/generate-protos-docker.sh
# Docs
watch-docs: ## Build and watch documentation
@./docs/watch.sh || (echo "Error building... You may need to run 'make install-watch-deps'"; exit 1)
OS := $(shell uname)
install-docs-deps: ## Install documentation dependencies
@echo Installing docs dependencies...
@pip install -e ".[doc_builder]"
ifeq ($(OS),Darwin)
install-watch-deps: ## Install MacOS dependencies for watching docs
brew install fswatch
else
install-watch-deps: ## Install Debian-based OS dependencies for watching docs
sudo apt install inotify-tools
endif
OS := $(shell uname)
ifeq ($(OS),Darwin)
install-spellchecker-deps: ## Install MacOS dependencies for spellchecker
brew install enchant
pip install sphinxcontrib-spelling
else
install-spellchecker-deps: ## Install Debian-based dependencies for spellchecker
sudo apt install libenchant-dev
endif
spellcheck-doc: ## Spell check documentation
sphinx-build -b spelling ./docs/source ./docs/build || (echo "Error running spellchecker.. You may need to run 'make install-spellchecker-deps'"; exit 1)
# YataiService gRPC
start-yatai-debug: ## Start YataiService in debug mode
bentoml yatai-service-start --debug || (echo "Error starting... You may need to run 'make install-yatai-deps'"; exit 1)
start-grpcui: ## Start gPRC Web UI
grpcui -plaintext localhost:50051 || (echo "Error starting... You may need to run 'make install-yatai-deps'"; exit 1)
install-yatai-deps: ## Install dependencies to debug YataiService
pip install -e ".[dev]"
go get github.com/fullstorydev/grpcui
go install github.com/fullstorydev/grpcui/cmd/grpcui@latest
# BentoML Web UI
watch-yatai-web-ui: ## Start BentoML Web UI server in dev mode
bentoml yatai-service-start --no-ui & \
cd bentoml/yatai/web && yarn dev 127.0.0.1:50051 3000 . 127.0.0.1:50052
build-yatai-web-ui: ## Build BentoML Web UI server and frontend
cd bentoml/yatai/web && yarn build
run-yatai-web-ui: ## Run production BentoML Web UI server and frontend
bentoml yatai-service-start --no-ui & \
cd bentoml/yatai/web && yarn start 127.0.0.1:50051 3000 . 127.0.0.1:50052
install-web-deps: ## Install dependencies to run web server and frontend
cd bentoml/yatai/web && yarn install
cd bentoml/yatai/web/client && yarn install