From 2f34d00d3cc953453a2a0ca21c71c3ae07ddcc1a Mon Sep 17 00:00:00 2001 From: Angel Misevski Date: Fri, 16 Feb 2024 10:33:50 -0500 Subject: [PATCH] Add support for podman in the demo script --- demos/sprint-24w6-demo.sh | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/demos/sprint-24w6-demo.sh b/demos/sprint-24w6-demo.sh index f97fb681..34dffbdf 100755 --- a/demos/sprint-24w6-demo.sh +++ b/demos/sprint-24w6-demo.sh @@ -22,6 +22,15 @@ 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 @@ -44,7 +53,7 @@ pe "./jmm build ../examples/onnx -t localhost:5050/test-repo:test-tag" pe "./jmm models" # run a local registry -pe "docker run --name registry --rm -d -p 5050:5050 -e REGISTRY_HTTP_ADDR=:5050 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 "./jmm push localhost:5050/test-repo:test-tag --http"