Skip to content

Jina Hub Builder is an app for building UGC images, testing and pushing them to docker hub

License

Notifications You must be signed in to change notification settings

antonkurenkov/hub-builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jina Hub Builder (beta)

CI CD Hub Image Jina Jina Docs We are hiring tweet button

Jina Hub Builder is an app for building user generated pod images, testing and publishing them on Docker Hub.

Installing dependencies

To build images with this builder app, first you have to install some required dependencies and repos.

➜ git clone https://github.com/jina-ai/hub-builder ./builder // installing the builder core
➜ git clone https://github.com/jina-ai/jina-hub ./builder/hub // installing hub containing current stable images
➜ git clone https://github.com/jina-ai/jina ./builder/src/jina // installing jina core
➜ git clone https://github.com/jina-ai/hub-status ./builder/status // installing status path
➜ cd builder
➜ pip install -r builder/requirements.txt
➜ pip install jina[devel]

Building images

For building single image:

➜ python app.py --target=hub/examples/mwu_encoder

For building all images:

➜ python app.py --update-strategy=force

Flags:

  • --bleach-first: to remove all existing docker instances before build
  • --target: is a path to single image to be builded
  • --push: to push successfully builded image to docker hub. Credentials as DOCKERHUB_DEVBOT_USER and DOCKERHUB_DEVBOT_USER as env variables are required.
  • --test: to test images with docker run, jina pod, and Jina Flow.
  • --reason: to set a reason for current build (would be added to status readme)
  • --check-targets: to check if some images-related files were modified but with no rebuild
  • --update-strategy: is a level of current rebuild importance. If specified to force, rebuilds all images. More detailed description regarding update policy is here.

If you wish your Mongo database to track build history, you should add database connection on app call. Execute MONGODB_CREDENTIALS={user:password} app.py ... instead of using app.py ....

When you start the app, you may lines like this: Found target file /Users/user/builder/hub/hub/executors/encoders/image/torchvision-mobilenet_v2/Dockerfile This means the file was modified from it's last git-committed state. All images having proper update field specified in their manifest.yml will be updated according to selected --update-strategy on the app.py run. More detailed description regarding update policy is here.

Outputs

When the image build is finished, you will see message like

Successfully built image hub.executors.encoders.nlp.transformers-pytorch

This means you image is successfully built. Otherwise, you see an error description in your terminal output. If you have --push option on application run, all successfully built images will be pushed to docker hub.

When the app run is finished (only if you built multiple targets and did not specified --target flag), you will see lines like

Hub readme updated successfully on path /Users/user/hub-builder/status/README.md
Hub badge updated successfully on path /Users/user/hub-builder/status/hub-stat.svg

This means the app has just updated status Readme.md and hub badge.

If you run the app with database connection (with MONGODB_CREDENTIALS specified), you will see a message:

Hub history updated successfully on database

The next lines:

Package api updated on path /Users/user/hub-builder/api/hub/package
Status api updated on path /Users/user/hub-builder/api/hub/status

mean that the app produced fresh json tracks which could be used for status and building state analysis. See here for more details.

Contributing

We welcome all kinds of contributions from the open-source community, individuals and partners. Without your active involvement, Jina won't be successful.

Please first read the contributing guidelines before the submission.

License

Copyright (c) 2020 Jina AI Limited. All rights reserved.

Jina is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

About

Jina Hub Builder is an app for building UGC images, testing and pushing them to docker hub

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages