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