To create your Hub Executor, you just need to run this command in your terminal:
jina hub new
When you run the command above, a wizard will ask you some questions about the Executor. For the basic configuration, you will be asked two things: The Executor’s name and where it should be saved. The wizard will ask if you want to have a more advanced configuration, but it is unnecessary for most of use cases.
After running the command, a project with the following structure will be generated:
MyExecutor/ ├── Dockerfile # Advanced configuration will generate this file ├── manifest.yml ├── config.yml ├── README.md ├── requirements.txt └── executor.py
manifest.ymlshould contain the annotations of the Executor for getting better appealing on Jina Hub.
config.ymlis the config file of your Executor. You can define init arguments using with keyword in this config file.
requirements.txtdescribes the Python dependencies of the Executor.
executor.pyshould contain the main logic of your Executor.
README.mdshould describe the usage of the Executor.
manifest.yml is optional.
manifest.yml annotates your image so that it can be better managed by the Hub portal. To get better appealing on Jina Hub, you may want to
manifest.yml to the correct values.
||The version of the manifest protocol||
||Human-readable title of the Executor||None|
||Human-readable description of the Executor||None|
||URL to find more information on the Executor, normally it should be the GitHub repo URL||None|
||A list of strings help user to filter and locate your package||None|