To create your
jina hub new
For basic configuration (advanced configuration is optional but rarely necessary), you will be asked for:
Your Executor’s name
The path to the folder where it should be saved
After running the command, a project with the following structure will be generated:
MyExecutor/ ├── executor.py ├── config.yml ├── README.md ├── requirements.txt └── Dockerfile
executor.pycontains your Executor’s main logic.
config.ymlis the Executor’s configuration file, where you can define
__init__arguments using the
withkeyword. You can also define meta annotations relevant to the Executor, for getting better exposure on Executor Hub.
requirements.txtdescribes the Executor’s Python dependencies.
README.mddescribes how to use your Executor.
Dockerfileis only generated if you choose advanced configuration.
jina hub newCLI to create an Executor
To create an Executor, always use this command and follow the instructions. This ensures the correct file structure.
You don’t need to manually write a Dockerfile
The build system automatically generates an optimized Dockerfile according to your Executor package.
jina hub new wizard you can choose from four Dockerfile templates:
If you push your Executor to the Executor Hub, you don’t need to bump the Jina version
Hub Executors are version-agnostic. When you pull an Executor from Executor Hub, it will select the right Jina version for you. You don’t need to upgrade your version of Jina.
Fill in metadata of your Executor correctly
Information you include under the
config.ymlis displayed on Executor Hub.
The specification can be found here<config.yml>.