-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
47 lines (35 loc) · 1.25 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
export PIPELINE_NAME = fifa-predictior-pipeline
export IMAGE_NAME = localhost:5000/$(PIPELINE_NAME):$(TAG)
export KF_PIPELINES_ENDPOINT = http://192.168.0.150.nip.io/
install:
pip install -r requirements.txt
install-dev:
pip install -r requirements.txt
pip install -r requirements-dev.txt
format:
isort .
black -l 120 src
check-format:
isort . --check
black -l 120 --check src
lint:
flake8 src
clean:
rm -rf models/*
rm -f *.yaml
create-model: clean
python src/train.py
kfp-compile: clean
python pipelines/dsl.py
build:
docker build -t $(IMAGE_NAME) .
push:
docker push $(IMAGE_NAME)
forward-kubernetes:
kubectl port-forward svc/istio-ingressgateway -n istio-system --address 0.0.0.0 8080:80 &
deploy-function:
kubectl apply -f pipelines/serve/authorization-policy-istio.yml
kubectl apply -f pipelines/serve/fifa-predictior-inferenceservice.yml
call-model:
TOKEN=$(kubectl create token default-editor -n kubeflow-user-example-com --audience=istio-ingressgateway.istio-system.svc.cluster.local --duration=24h)
curl -v -H "Host: fifa-predictior-predictor.kubeflow-user-example-com.example.com" -H "Authorization: Bearer ${TOKEN}" -H "Content-Type: application/json" http://localhost:8080/v1/models/fifa-predictior:predict -d @example-input/input.json