• This repository has been archived on 01/Sep/2021
  • Stars
    star
    103
  • Rank 333,046 (Top 7 %)
  • Language
    Python
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated about 3 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

An open-registry for hosting Jina executors via container images

Jina banner

Jina's one-stop registry for hosting Pods and enabling easy neural search on the cloud

Docs โ€ข Examples โ€ข Contribute โ€ข Jobs โ€ข Website โ€ข Slack

Use Hub Image in Flow API

# my_image_tag is the built image name

from jina import Flow
with Flow().add(uses='docker://' + my_image_tag):
    pass

Create a new Hub Pod/App

Prerequisites

  • Install Docker.
  • pip install "jina[hub]"

๐Ÿ“ฆ Create a new Executor

jina hub new --type pod

It will start a wizard in CLI to guide you create your first executor. The resulted file structure should look like the following:

MyAwesomeExecutor/
โ”œโ”€โ”€ Dockerfile
โ”œโ”€โ”€ manifest.yml
โ”œโ”€โ”€ config.yml
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ __init__.py
โ””โ”€โ”€ tests/
    โ”œโ”€โ”€ test_MyAwesomeExecutor.py
    โ””โ”€โ”€ __init__.py

Link to the documentation for creating a containerized pod is here.

Create a new App

jina hub new --type app

It will start a wizard in CLI to guide you create your app.

Upload your Image to Jina Hub

Build your Docker image using our naming conventions:

jina hub build -t jinahub/type.kind.jina-image-name:image_version-jina_version <your_folder>

Push to Jina Hub:

jina hub login, then copy/paste the token into GitHub to verify your account

jina hub push jinahub/type.kind.jina-image-name:image-jina_version 

Use py_modules to import multiple files

By default, jina hub new --pod creates a Python module structure and guides you to write MyAwesomeExecutor class into __init__.py. If you have some other files that need to be imported for MyAwesomeExecutor, say helper.py, you can change metas.pymodules in config.yml to import those files. Note, you have to write the dependencies in reverse order. That is, if __init__.py depends on A.py, which again depends on B.py, then you need to write:

!MyAwesomeExecutor
with:
  ...
metas:
  py_modules:
    - B.py
    - A.py
    - __init__.py

Legacy Hub Pod structure

This is also a valid structure, it works but not recommended:

- MyAwesomeExecutor/
    |
    |- Dockerfile
    |- manifest.yml
    |- README.md
    |- requirements.txt
    |- MyAwesomeExecutor.py
    |- helper.py
    |- config.yml
        |- metas.py_modules
            |- helper.py
            |- MyAwesomeExecutor.py

Please note that:

  • Here MyAwesomeExecutor directory is not a python module, as it lacks __init__.py under the root;
  • to import foo.py, you must to use from jinahub.foo import bar, where jinahub is the common namespace for all external modules;
  • in config.yml:metas.py_modules, helper.py needs to be put before MyAwesomeExecutor.py.

Test a Pod/App locally

jina hub build /MyAwesomeExecutor/

More Hub CLI usage can be found via jina hub build --help

Work with your own repository

  1. Create a new repository
  2. pip install "jina[hub]" && jina hub new --type pod
git checkout -b feat-new-executor
git add .
git commit -m "feat: add new executor"
git push
  1. Add the Hub Updater and Hub Builder Github Actions to the Github workflow of your hub-type repo.
  2. Make a Pull Request on feat-new-executor -> master

Reference

manifest.yml Schema

manifest.yml must exist if you want to publish your Pod image to Jina Hub.

manifest.yml annotates your image so that it can be managed by Jina Hub. To get better appealing on Jina Hub, you should carefully set manifest.yml to the correct values.

Key Description Default
manifest_version The version of the manifest protocol 1
type The type of the image Required
kind The kind of the executor Required
name Human-readable title of the image (must match with ^[a-zA-Z_$][a-zA-Z_\s\-$0-9]{3,30}$) Required
description Human-readable description of the software packaged in the image Required
author Contact details of the people or organization responsible for the image (string) Jina AI Dev-Team ([email protected])
url URL to find more information on the image (string) https://jina.ai
documentation URL to get documentation on the image (string) https://docs.jina.ai
version Version of the image, it should be Semantic versioning-compatible 0.0.0
vendor The name of the distributing entity, organization or individual (string) Jina AI Limited
license License under which contained software is distributed, it should be in this list apache-2.0
avatar A picture that personalizes and distinguishes your image None
platform A list of CPU architectures that your image built on, each item should be in this list [linux/amd64]
keywords A list of strings help user to filter and locate your package None

Naming conventions

All apps and executors should follow the naming convention:

jinahub/type.kind.jina_image_name:image_version-jina_version

For example:

jinahub/pod.encoder.transformertfencoder:0.0.16-0.9.33
Text Meaning
jinahub/ Push to jinahub Docker repo
app Type
encoder Kind
transformertfencoder Pod name
0.0.16 Pod version
0.9.33 Jina version

From Jina 0.4.10 onwards, Jina Hub is referred as a Git Submodule in jina-ai/jina.

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.

Contributors โœจ

All Contributors

Community

  • Code of conduct - play nicely with the Jina community
  • Slack workspace - join #general on our Slack to meet the team and ask questions
  • YouTube channel - subscribe to the latest video tutorials, release demos, webinars and presentations.
  • LinkedIn - get to know Jina AI as a company and find job opportunities
  • Twitter Follow - follow and interact with us using hashtag #JinaSearch
  • Company - know more about our company and how we are fully committed to open-source.

Open Governance

As part of our open governance model, we host Jina's Engineering All Hands in public. This Zoom meeting recurs monthly on the second Tuesday of each month, at 14:00-15:30 (CET). Everyone can join in via the following calendar invite.

The meeting will also be live-streamed and later published to our YouTube channel.

Join us

Jina is an open-source project. We are hiring full-stack developers, evangelists, and PMs to build the next neural search ecosystem in open source.

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.

More Repositories

1

jina

โ˜๏ธ Build multimodal AI applications with cloud-native stack
Python
20,716
star
2

clip-as-service

๐Ÿ„ Scalable embedding, reasoning, ranking for images and sentences with CLIP
Python
12,150
star
3

reader

Convert any URL to an LLM-friendly input with a simple prefix https://r.jina.ai/
TypeScript
6,640
star
4

dalle-flow

๐ŸŒŠ A Human-in-the-Loop workflow for creating HD images from text
Python
2,831
star
5

dev-gpt

Your Virtual Development Team
Python
1,756
star
6

langchain-serve

โšก Langchain apps in production using Jina & FastAPI
Python
1,601
star
7

finetuner

๐ŸŽฏ Task-oriented embedding tuning for BERT, CLIP, etc.
Python
1,455
star
8

thinkgpt

Agent techniques to augment your LLM and push it beyong its limits
Python
1,402
star
9

auto-gpt-web

Set Your Goals, AI Achieves Them.
TypeScript
749
star
10

agentchain

Chain together LLMs for reasoning & orchestrate multiple large models for accomplishing complex tasks
Python
583
star
11

docarray

The data structure for unstructured data
Python
522
star
12

vectordb

A Python vector database you just need - no more, no less.
Python
519
star
13

jcloud

Simplify deploying and managing Jina projects on Jina Cloud
Python
294
star
14

jina-video-chat

Python
266
star
15

jinabox.js

A lightweight, customizable omnibox in Javascript, for use with a Jina backend.
JavaScript
219
star
16

annlite

โšก A fast embedded library for approximate nearest neighbor search
Python
216
star
17

rungpt

An open-source cloud-native of large multi-modal models (LMMs) serving framework.
Python
147
star
18

fastapi-serve

FastAPI to the Cloud, Batteries Included! โ˜๏ธ๐Ÿ”‹๐Ÿš€
Python
139
star
19

dashboard

Interactive UI for analyzing Jina logs, designing Flows and viewing Hub images
TypeScript
100
star
20

GoldRetriever

Create and host retrieval plugins for ChatGPT in one click
Python
63
star
21

jinaai-py

Python
48
star
22

example-multimodal-fashion-search

Input text or image, get back matching image fashion results, using Jina, DocArray, and CLIP
Python
45
star
23

streamlit-jina

Streamlit component for Jina neural search
Python
37
star
24

docs

Jina V1 Official Documentation. For the latest one, please check out https://docs.jina.ai
HTML
35
star
25

jinaai-js

TypeScript
28
star
26

executors

internal-only
Python
28
star
27

jerboa

LLM finetuning
Python
27
star
28

jina-ai.github.io

Homepage of Jina AI Limited
HTML
27
star
29

example-meme-search

Meme search engine built with Jina neural search framework. Search with captions or image files to find matching memes.
Python
23
star
30

example-app-store

App store search example, using Jina as backend and Streamlit as frontend
Python
21
star
31

docsQA-ui

Web UI for docsQA. Main branch: https://jina-docqa-ui.netlify.app/
TypeScript
20
star
32

example-speech-to-image

An example of building a speech to image generation pipeline with Jina, Whisper and StableDiffusion
Python
20
star
33

workshops

Jupyter Notebook
19
star
34

jina-hubble-sdk

Python API for authentication, resource management with Hubble
Python
19
star
35

product-recommendation-redis-docarray

Python
18
star
36

career

Find out job opportunities at Jina AI
17
star
37

executor-3d-encoder

An executor that wraps 3D mesh models and encodes 3D content documents to d-dimension vector.
Python
16
star
38

client-go

Golang Client for Jina (https://github.com/jina-ai/jina)
Go
16
star
39

benchmark

Benchmark environment and results of different versions of Jina.
Python
14
star
40

action-hub-builder

Simple interface for building & validating Jina Hub executors.
Python
12
star
41

inference-client

Python
12
star
42

executor-hnsw-postgres

A production-ready, scalable Indexer for the Jina neural search framework, based on HNSW and PSQL
Python
12
star
43

now

Python
11
star
44

cookiecutter-jina

Cookiecutter template for a Jina project
Python
10
star
45

simple-jina-examples

Python
9
star
46

executor-simpleindexer

Simple Indexer
Python
9
star
47

executor-clip-encoder

Encoder that embeds documents using either the CLIP vision encoder or the CLIP text encoder, depending on the content type of the document.
Python
9
star
48

cloud-ops

Python
8
star
49

good-first-issues

Issues that don't fit under Jina's other repos!
8
star
50

api

API schema of Jina command line interface exposed as JSON and YAML files.
HTML
8
star
51

inference-client-js

TypeScript
7
star
52

executor-text-transformers-dprreader-ranker

DPRReaderRanker
Python
7
star
53

executor-video-loader

Python
7
star
54

executor-image-clip-encoder

CLIPImageEncoder is an image encoder that wraps the image embedding functionality using the CLIP
Python
7
star
55

.github

This repository stores github actions templates as described https://docs.github.com/en/actions/learn-github-actions/sharing-workflows-with-your-organization
7
star
56

GSoC

Google Summer of Code
7
star
57

example-wikipedia-recommendation

An example of graph embeddings for wikipedia page recommendations
Jupyter Notebook
6
star
58

executor-U100KIndexer

An Indexer that works out-of-the-box when you have less than 100K stored Documents
Python
6
star
59

devrel-heartmaker

Heart mosaics of your GitHub contributors
Python
6
star
60

executor-text-transformers-torch-encoder

**TransformerTorchEncoder** wraps the torch-version of transformers from huggingface. It encodes text data into dense vectors.
Python
6
star
61

executor-cases

Summarize all Executor patterns for Hubble
Python
5
star
62

executor-normalizer

Jina executor package normalizer
Python
5
star
63

auth

deprecated, use `jina-hubble-sdk`
Python
5
star
64

jina-commons

A collection of shared function for Jina Executor
Python
5
star
65

tutorial-notebooks

Jupyter Notebook
5
star
66

jina-paddle-hackathon

ๆž็บณ x ็™พๅบฆ้ฃžๆกจ ้ป‘ๅฎข้ฉฌๆ‹‰ๆพ
Python
5
star
67

executor-image-preprocessor

An executor that performs standard pre-processing and normalization on images.
Python
5
star
68

jina-hackathon

Support repo for Jina X Hackathon - Sep 2020
5
star
69

executor-featurehasher

FeatureHasher
Python
4
star
70

jina-sagemaker

Jina Embedding Models on AWS SageMaker
Jupyter Notebook
4
star
71

stress-test

A collection of stress tests of Jina infrastructure
Python
4
star
72

executor-image-clip-classifier

Python
4
star
73

executor-text-transformerqa

**TransformerQAExecutor* wraps a question-answering model from huggingface and return relevant answers given questions and contexts/paragraphs.
Python
4
star
74

executor-faissindexer

A similarity search indexer based on Faiss. https://hub.jina.ai/executor/8gsd0tts
Python
4
star
75

hub-integration

Integration test for hub
Python
4
star
76

example-audio-search

Python
3
star
77

example-video-qa

This is an example of building a video QA with jina
TypeScript
3
star
78

jinad

Management of Jina on remote
Python
3
star
79

executor-indexers

Indexer Executors for Jina
Python
3
star
80

executor-text-dpr-encoder

Encode text into embeddings using the DPR model.
Python
3
star
81

legacy-examples

Unmaintained examples for Jina
Python
3
star
82

executor-clip-image

Executor for the pre-trained clip model. https://openai.com/blog/clip/
Python
3
star
83

executor-weaviate-indexer

Python
3
star
84

executor-doc2query

Python
3
star
85

executor-image-paddle-encoder

Python
3
star
86

jupyter-notebooks

Jupyter Notebook
3
star
87

executor-evaluator-ranking

Python
3
star
88

executor-yolov5

Python
3
star
89

executor-lightgbm-ranker

Python
3
star
90

terraform-jina-jinad-aws

Module for deploying JinaD on AWS
HCL
3
star
91

encoder-image-torch

The ImageTorchEncoder encodes Document content from a ndarray to an d-dimensional vector.
Python
3
star
92

example-odqa

Roff
2
star
93

executor-text-clip-encoder

Encode text into embeddings using the CLIP model.
Python
2
star
94

jina-ui

Monorepo for JinaJS and frontend projects
TypeScript
2
star
95

executor-audio-clip-encoder

Wraps the AudioCLIP model for generating embeddings for audio data for the Jina framework
Python
2
star
96

executor-matchmerger

**MatchMerger** Merges the results of shards by appending all matches.
Python
2
star
97

executor-image-niireader

Python
2
star
98

executor-image-normalizer

Executor that reads, resizes, crops and normalizes images.
Python
2
star
99

executor-vgg-audio-encoder

Python
2
star
100

executor-image-hasher

An executor to encode images using comparable hashing techniques. Useful for duplicate detection
Python
2
star