forked from opendatahub-io/modelmesh-serving
-
Notifications
You must be signed in to change notification settings - Fork 9
137 lines (122 loc) · 4.79 KB
/
fvt-base.yml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: FVT Base
on:
workflow_dispatch:
pull_request:
branches: [master]
paths:
- '**'
- '!.github/**'
- '!.tekton/**'
- '!**.md'
- '!docs/**'
- '.github/workflows/fvt.yml'
jobs:
fvt:
runs-on: ubuntu-latest
steps:
- name: Free up disk space
run: |
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173
# du -sh /* 2> /dev/null | sort -rh 2> /dev/null | head
# du -h -d2 /usr 2> /dev/null | sort -rh 2> /dev/null | head
echo "Check free disk space before cleanup."
df -h
echo "Removing non-essential tools and libraries."
sudo rm -rf "$AGENT_TOOLSDIRECTORY"
sudo rm -rf /opt/ghc
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/share/boost
# delete libraries for Android (12G), PowerShell (1.3G), Swift (1.7G)
sudo rm -rf /usr/local/lib/android
sudo rm -rf /usr/local/share/powershell
sudo rm -rf /usr/share/swift
echo "Check free disk space after cleanup."
df -h
- name: Checkout
uses: actions/checkout@v4
- name: Setup go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Start Minikube
uses: medyagh/[email protected]
id: minikube
with:
minikube-version: 1.32.0
container-runtime: docker
kubernetes-version: v1.26.1
cpus: max
memory: max
- name: Check pods
run: |
sleep 30
kubectl get pods -n kube-system
- name: Set controller image tag
run: |
echo "IMAGE_TAG=$(date +'%Y%m%dT%H%M%S%Z')" >> $GITHUB_ENV
- name: Update configs
# Update the image tag and reduce some resource request amounts to allow FVTs to run
# on reduced resource environments. The RollingUpdate strategy for Runtime deployments
# is also adjusted for these environments.
# Disable the torchserve ServingRuntime for now (insufficient resources to run them all).
run: |
sed -i 's/newTag:.*$/newTag: "'${{ env.IMAGE_TAG }}'"/' config/manager/kustomization.yaml
sed -i '0,/cpu:.*$/s/cpu:.*$/cpu: 100m/' \
config/default/config-defaults.yaml \
config/runtimes/mlserver-1.x.yaml \
config/runtimes/triton-2.x.yaml \
config/runtimes/ovms-1.x.yaml
sed -i 's/memory:.*$/memory: 512Mi/g' \
config/runtimes/mlserver-1.x.yaml \
config/runtimes/triton-2.x.yaml \
config/runtimes/ovms-1.x.yaml
sed -i 's/maxSurge:.*$/maxSurge: 0/' config/internal/base/deployment.yaml.tmpl
sed -i 's/maxUnavailable:.*$/maxUnavailable: 100%/' config/internal/base/deployment.yaml.tmpl
echo -e '\n disabled: true' >> config/runtimes/torchserve-0.x.yaml
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Controller image
env:
DOCKER_BUILDKIT: 1
run: |
eval $(minikube -p minikube docker-env)
make build.develop
./scripts/build_docker.sh --target runtime --tag ${{ env.IMAGE_TAG }}
- name: Install ModelMesh Serving
run: |
export NAMESPACE_SCOPE_MODE=${{ inputs.namespace-scope-mode }}
kubectl create ns modelmesh-serving
./scripts/install.sh --namespace modelmesh-serving --fvt --dev-mode-logging
- name: Prune docker images
run: |
echo "Pruning docker images on GH action runner node"
docker image prune -a -f
docker system df
df -h
- name: Pre-pull runtime images
run: |
eval $(minikube -p minikube docker-env)
docker pull nvcr.io/nvidia/tritonserver:23.04-py3
docker pull seldonio/mlserver:1.3.2
docker pull openvino/model_server:2022.2
# docker pull pytorch/torchserve:0.7.1-cpu
docker pull kserve/modelmesh:latest
docker pull kserve/modelmesh-minio-dev-examples:latest
docker pull kserve/modelmesh-minio-examples:latest
docker pull kserve/modelmesh-runtime-adapter:latest
docker pull kserve/rest-proxy:latest
- name: Check installation
run: |
eval $(minikube -p minikube docker-env)
docker images
kubectl get svc
kubectl get pods
kubectl get clusterservingruntimes 2> /dev/null || :
kubectl get servingruntimes 2> /dev/null || :
- name: Run FVTs
run: |
go install github.com/onsi/ginkgo/v2/ginkgo
export PATH=/root/go/bin/:$PATH
export NAMESPACE=modelmesh-serving
export NAMESPACESCOPEMODE=${{ inputs.namespace-scope-mode }}
make fvt