Create Executor

To create your Hub Executor, you just need to run:

  1. jina hub new

../../../_images/create-new.gif

For the basic configuration, you will be asked two things: The Executor’s name and where it should be saved. A more advanced configuration is optional, but rarely necessary.

After running the command, a project with the following structure will be generated:

  1. MyExecutor/
  2. ├── Dockerfile # Advanced configuration will generate this file
  3. ├── manifest.yml
  4. ├── config.yml
  5. ├── README.md
  6. ├── requirements.txt
  7. └── executor.py
  • manifest.yml should contain the Executor’s annotations for getting better exposure on Jina Hub.

  • config.yml is the Executor’s configuration file, where you can define init arguments using with keyword.

  • requirements.txt describes the Executor’s Python dependencies.

  • executor.py should contain your Executor’s main logic.

  • README.md should describe how to use your Executor.

Fields of manifest.yml

manifest.yml is optional.

manifest.yml annotates your image so that it can be better managed by the Hub portal. To get better exposure on Jina Hub, you may want to carefully set manifest.yml to the correct values:

KeyDescriptionDefault
manifest_versionThe version of the manifest protocol1
nameHuman-readable title of the ExecutorNone
descriptionHuman-readable description of the ExecutorNone
urlURL to find more information about the Executor, normally the GitHub repo URLNone
keywordsA list of strings help users filter and locate your packageNone

See Also

Hub Executor best practices