From 6d3696e4768326116838548f02f56d32aa58a1ad Mon Sep 17 00:00:00 2001 From: Michal Moskal Date: Tue, 23 Apr 2024 22:34:51 +0000 Subject: [PATCH] a bit more docker automation --- scripts/docker-build.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/scripts/docker-build.sh b/scripts/docker-build.sh index 4be9cbcb..3c47b1f4 100755 --- a/scripts/docker-build.sh +++ b/scripts/docker-build.sh @@ -9,6 +9,14 @@ else sudo chmod g+w target fi +if test -f target/dist/README.md ; then + : +else + echo "Run ./scripts/release.sh first (in dev docker container)" + exit 1 +fi + +set -x rm -f target/vllm.tar.gz ( cd py/vllm/vllm; \ find . -name '*.py' -print0 | tar -czf - --null -T - ) > target/vllm.tar.gz @@ -17,3 +25,16 @@ ls -l target/vllm.tar.gz DOCKER_BUILDKIT=1 \ docker build . -f .devcontainer/Dockerfile-prod-vllm \ --tag aici/vllm-openai + +if [ "X$DOCKER_PUSH" != X ] ; then + if test -z "$DOCKER_TAG" ; then + DOCKER_TAG=v$(date '+%Y%m%d-%H%M') + fi + docker tag aici/vllm-openai $DOCKER_PUSH:$DOCKER_TAG + docker push $DOCKER_PUSH:$DOCKER_TAG + + set +x + echo + echo "Pushed $DOCKER_PUSH:$DOCKER_TAG" + echo +fi