-
Notifications
You must be signed in to change notification settings - Fork 891
/
Makefile
56 lines (46 loc) · 2.1 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
KSERVE_VERSION ?= 0.12.1
MODELS_WEBAPP_VERSION ?= 0.8.1
MODELS_WEBAPP_RELEASE_VERSION := $(shell echo ${MODELS_WEBAPP_VERSION} | cut -d "." -f1-2)
.PHONY: upgrade-kserve-manifests
upgrade-kserve-manifests: clean-kserve-manifests
curl -sSL 'https://github.com/kserve/kserve/releases/download/v$(KSERVE_VERSION)/kserve_kubeflow.yaml' -o 'kserve/kserve_kubeflow.yaml'
curl -sSL 'https://github.com/kserve/kserve/releases/download/v$(KSERVE_VERSION)/kserve-cluster-resources.yaml' -o 'kserve/kserve-cluster-resources.yaml'
curl -sSL 'https://github.com/kserve/kserve/releases/download/v$(KSERVE_VERSION)/kserve.yaml' -o 'kserve/kserve.yaml'
.PHONY: clean-kserve-manifests
clean-kserve-manifests:
cd kserve && rm -f kserve.yaml kserve-cluster-resources.yaml kserve_kubeflow.yaml
.PHONY: install-kserve
install-kserve:
# Create kubeflow namespace if not exists
kubectl create namespace kubeflow || echo "kubeflow namespace exists"
kubectl apply -k kserve
.PHONY: uninstall-kserve
uninstall-kserve:
kubectl delete -k kserve
.PHONY: test-kserve
test-kserve:
cd tests && pytest .
.PHONY: clean-models-webapp-manifests
clean-models-webapp-manifests:
rm -rf models-web-app
.PHONY: upgrade-models-webapp-manifests
upgrade-models-webapp-manifests: clean-models-webapp-manifests
git clone https://github.com/kserve/models-web-app.git kserve-models-web-app-src
cd kserve-models-web-app-src && git checkout release-${MODELS_WEBAPP_RELEASE_VERSION}
cp -r kserve-models-web-app-src/config ./models-web-app
# cleanup
rm -rf kserve-models-web-app-src
.PHONY: install-models-web-app
install-models-webapp:
# Create kubeflow namespace if not exists
kubectl create namespace kubeflow || echo "kubeflow namespace exists"
kubectl apply -k models-web-app/overlays/kubeflow
.PHONY: uninstall-models-web-app
uninstall-models-webapp:
kubectl delete -k models-web-app/overlays/kubeflow
.PHONY: test-models-webapp
test-models-webapp: install-models-webapp
kubectl wait --for=condition=Available --timeout=300s -n kubeflow deployment/kserve-models-web-app
@echo "Test Passed"
@echo "cleaning up ..."
kubectl delete -k models-web-app/overlays/kubeflow