|
| 1 | +# Submit Your Community Example! |
| 2 | + |
| 3 | +Thanks for your interest in submitting your example! Here are some rules and guidelines: |
| 4 | + |
| 5 | +## Rules |
| 6 | + |
| 7 | +### `jina` in `requirements.txt` |
| 8 | + |
| 9 | +To be eligible for listing, you **must** have `jina==x.x.x` in your `requirements.txt`, where `x.x.x` refers to the semantic version number. |
| 10 | + |
| 11 | +Note: If you're building a front-end that just interfaces with Jina's API and doesn't rely on Jina core itself, there's no need to follow this requirement. |
| 12 | + |
| 13 | +### `jina-` at start of name |
| 14 | + |
| 15 | +Your repo name should be `jina-xxxxxxx`. |
| 16 | + |
| 17 | +### Clear README |
| 18 | + |
| 19 | +- Explain what your example does and how to run it |
| 20 | + |
| 21 | +### Use scripts to get external resources |
| 22 | + |
| 23 | +- **For datasets:** Use a script named `get_data.sh` |
| 24 | +- **For models**: If you use an externally-hosted model, call your script `get_model.sh` or similar |
| 25 | +- **For other assets:** Follow the `get_xxx.sh` pattern |
| 26 | + |
| 27 | +### `.gitignore` and `.dockerignore` |
| 28 | + |
| 29 | +Have a `.gitignore` file and list any directories that should be ignored. The same goes for `.dockerignore` if you have `Dockerfile`: |
| 30 | + |
| 31 | +- `data` directory |
| 32 | +- `workspace` directory |
| 33 | +- virtual environment directories |
| 34 | +- directories that store assets retrieved by [scripts](#use-scripts-to-get-external-resources) |
| 35 | + |
| 36 | +### License |
| 37 | + |
| 38 | +You **must** use an open-source license, specified in `LICENSE` in the root of your repo |
| 39 | + |
| 40 | +## Guidelines |
| 41 | + |
| 42 | +We're more easy-going on these |
| 43 | + |
| 44 | +### One Example Per Repo |
| 45 | + |
| 46 | +To make code more maintainable and easier for end users, please include one example per repo. |
| 47 | + |
| 48 | +### Tests |
| 49 | + |
| 50 | +Please include tests to ensure your app or Pod works correctly. |
| 51 | + |
| 52 | +### File Structure |
| 53 | + |
| 54 | +- Please follow the file structure as created by `jina hub new --type app` |
| 55 | +- Store data in `data` and externally-downloaded models in `models` |
| 56 | + |
| 57 | +### Dockerfile |
| 58 | + |
| 59 | +We highly encourage you to add a `Dockerfile`. |
| 60 | + |
| 61 | +### Docker image |
| 62 | + |
| 63 | +For self-contained apps, we would love to host a Docker image on [Jina Hub](https://github.com/jina-ai/jina-hub) |
0 commit comments