Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add "latest" tag to BentoML user-facing docker image #1046

Merged
merged 2 commits into from Sep 2, 2020
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 8 additions & 0 deletions docker/model-server/release.sh
Expand Up @@ -17,6 +17,10 @@ docker build --pull \
-t bentoml/model-server:"$BENTOML_VERSION" \
.
docker push bentoml/model-server:"$BENTOML_VERSION"
echo "Tag and push 'latest'.."
docker tag bentoml/model-server:"$BENTOML_VERSION" bentoml/model-server:latest
docker push bentoml/model-server:latest
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoughts on tagging with latest in the build step? moby/moby#15780

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That way push step can just be docker push bentoml/model-server and it will figure out which tags need to be pushed on its own

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea!

Do you know how does docker push bentoml/model-server figure out which tags needs to be pushed? I may have other tags that are used only for local development and want to avoid pushing those to docker hub.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok turns out docker push without a specified tag will push all local dev images too so that may not be ideal. I guess we can just leave it at docker push bentoml/model-server:latest && docker push bentoml/model-server:"$BENTOML_VERSION"
image

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense, thanks for confirming!



PYTHON_MAJOR_VERSIONS=(3.6 3.7 3.8)
echo "Building slim docker base images for ${PYTHON_MAJOR_VERSIONS[*]}"
Expand All @@ -32,6 +36,10 @@ do
.

docker push bentoml/model-server:$BENTOML_VERSION-slim-py${version//.}
echo "Tag and push 'latest'.."
docker tag bentoml/model-server:$BENTOML_VERSION-slim-py${version//.} bentoml/model-server:latest-slim-py${version//.}
docker push bentoml/model-server:latest-slim-py${version//.}


done
echo "Done"
4 changes: 4 additions & 0 deletions docker/yatai-service/release.sh
Expand Up @@ -18,3 +18,7 @@ docker build --pull \
.

docker push bentoml/yatai-service:"$BENTOML_VERSION"

echo "Tag and push 'latest'.."
docker tag bentoml/yatai-service:"$BENTOML_VERSION" bentoml/yatai-service:latest
docker push bentoml/yatai-service:latest