Skip to content

Commit

Permalink
a bit more docker automation
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Apr 23, 2024
1 parent 2b6c846 commit 6d3696e
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions scripts/docker-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 6d3696e

Please sign in to comment.