-
Notifications
You must be signed in to change notification settings - Fork 70
/
Copy pathsprint-24w6-demo.sh
executable file
·70 lines (50 loc) · 1.45 KB
/
sprint-24w6-demo.sh
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
#!/usr/bin/env bash
source ./.demo-magic/demo-magic.sh
########################
# Configure the options
########################
#
# speed at which to simulate typing. bigger num = faster
#
TYPE_SPEED=25
#
# custom prompt
#
# see http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/bash-prompt-escape-sequences.html for escape sequences
#
DEMO_PROMPT="${GREEN}➜ ${CYAN}\W ${COLOR_RESET}"
# text color
# DEMO_CMD_COLOR=$BLACK
if command -v docker; then
DOCKER=docker
elif command -v podman; then
DOCKER=podman
else
echo "You need docker or podman installed for this demo"
exit 1
fi
# hide the evidence
clear
pe "./kit version"
# Let's check if there are any model kits locally
pe "./kit list"
# clean the local model kits and check again
pe "rm -rf ~/.kitops"
pe "./kit list"
pe "./kit build --help"
# Let's build the onnx model
pe "./kit build ../examples/onnx -t localhost:5050/test-repo:test-tag"
# Let's check if the model kit is built
pe "./kit list"
# run a local registry
pe "$DOCKER run --name registry --rm -d -p 5050:5050 -e REGISTRY_HTTP_ADDR=:5050 registry"
# Let's push the model to the local registry
pe "./kit push localhost:5050/test-repo:test-tag --http"
# Let's check if the model is pushed
pe "./kit list localhost:5050/test-repo --http"
# clean the local models and check again
pe "rm -rf ~/.kitops"
pe "./kit list"
# Let's pull the model kit to the local registry
pe "./kit pull localhost:5050/test-repo:test-tag --http"
pe "./kit list"