From e82ece9fd8d9543f430e3e469a0f9b6c58af0d74 Mon Sep 17 00:00:00 2001 From: Bel LaPointe Date: Mon, 14 Nov 2022 08:38:42 -0700 Subject: [PATCH] docker push --- .gitignore | 1 + snowboy-2022/build.sh | 18 ++++++++++++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index 24ae5cb..3526bde 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ snowboy-2022/snowboy **/*.git.d **/*.wav +snowboy-2022/Dockerfile diff --git a/snowboy-2022/build.sh b/snowboy-2022/build.sh index d1cca09..5693ed3 100644 --- a/snowboy-2022/build.sh +++ b/snowboy-2022/build.sh @@ -66,6 +66,20 @@ if false; then else resources="$(realpath snowboy.git.d/resources/common.res)" hotword="$(realpath ./model/hotword.pmdl)" - go build -o snowboy - ./snowboy -model "$hotword" -resources "$resources" -sensitivity 0.5 + GOPROXY= go build -o snowboy + if [ -z "$PUSH" ]; then + ./snowboy -model "$hotword" -resources "$resources" -sensitivity 0.5 + else + echo ' +FROM registry-app.eng.qops.net:5001/imported/alpine:3.16 +WORKDIR /main/ +COPY ./snowboy.git.d/resources/common.res ./ +COPY ./model/hotword.pmdl ./ +COPY ./snowboy ./ +ENTRYPOINT ["sh", "-c", "true; echo copying /main/ to /mnt/; cp /main/* /mnt/"] +CMD [] + ' > Dockerfile + docker build -t registry-app.eng.qops.net:5001/breel/snowboy:latest . + docker push registry-app.eng.qops.net:5001/breel/snowboy:latest + fi fi