Publish Your Pod Image to Jina Hub¶
You can publish your custom Executor Pod to Jina Hub by contributing your Pod files to the Jina repository. You can raise a PR with all the relevant Pod files bundled as described below. Jina’s CI/CD pipeline will automatically use the PR to build an image and publish it to Jina Hub.
||describes the dependency setup and exposes the entry point|
||metadata info like image, author, tags, etc. helps the Hub to index and classify the image|
||an instruction guide describing the image usage|
||describes the executor logic written in Python, if applicable|
||a YAML file describes the executor arguments and configs, if you want users to use your config|
Note, large binary files (such as pretrained models, auxiliary data) are not recommended to upload to this repository. You can use
RUN wget ... or
RUN curl inside the
Dockerfile to download it from the web during the build.
File structure and schema for Pods:¶
Pod file bundle needs to follow a structure and certain schema rules for annotating the image successfully.
For instance, your pod is a kind of
awesomeness. The file bundle should be uploaded to the Hub
executors under kind
with the following structure:
hub/ | - executors/ | - encoders/ | - awesomeness/ | |- Dockerfile |- manifest.yml |- README.md |- awesome_ai.py
Your image will be published as
manifest.yml annotates your image so that it can be managed by Jina Hub. To ensure better compatibility with Jina Hub, you should carefully set
manifest.yml to use correct values.
||Human-readable title of the image (must match with
||Human-readable description of the software packaged in the image||Required|
||contact details of the people or organization responsible for the image (string)||
||URL to find more information on the image (string)||
||URL to get documentation on the image (string)||
||version of the image, it should be Semantic versioning-compatible||
||the name of the distributing entity, organization or individual (string)||
||license under which contained software is distributed, it should be in this list||
||a picture that personalizes and distinguishes your image||None|
||a list of CPU architectures that your image is built on, each item should be in this list||
Please refer to hub/examples/mwu_encoder/manifest.yml for the example.
Updating schema of Pods¶
If you have made code changes to a Pod, you must update the appropriate fields like
manifest.yml for updating the schema. With every change,
the version will increment following
semantic versioning. For instance,
0.0.10 on an update
Publish your image¶
All you need to do is to publish your file bundle into the Jina Hub repo. Subsequently, the Docker image building, uploading and tagging are all handled automatically by our CICD pipeline.
Let’s say you organize all files mentioned in here in a folder called
awesomeness. Depending on what you are contributing, you can put it into
Make a Pull Request and commit your changes into this repository, remember to follow the commit lint style.
Wait until the CICD finish and you get at least one reviewer’s approval.
The CICD pipeline will work on building, uploading and tagging the image on the Jina Hub.
The image will be available at
jinaai/hub.executors.indexers.awesomeness:0.0.0 assuming your version number is defined as
You can use the image with the ways described here.
Why does my upload fail on CI/CD?¶
Common causes why your upload could fail:
[ ] Required file
[ ] The required field in
[ ] Some field value is not in the correct format, not passing the sanity check.
[ ] The pod bundle is badly placed.
[ ] The build is success but it fails on three basic usage tests.
Click “Details” and check out the log of the CICD pipeline: