Skip to content

Commit

Permalink
refactor(setup): add common install (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
hanxiao authored Mar 2, 2022
1 parent 62c20a9 commit 5ad00c0
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ or via Conda:
```shell
conda install -c conda-forge docarray
```
[Additional features](https://docarray.jina.ai/#install) can be enabled by installing the full dependencies: `pip install "docarray[full]"`.
[Commonly used features](https://docarray.jina.ai/#install) can be enabled via `pip install "docarray[common]"`.

## [Documentation](https://docarray.jina.ai)

Expand Down
29 changes: 23 additions & 6 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@ conda install -c conda-forge docarray
No extra dependency will be installed.
````

````{tab} Full install
````{tab} Common install
```bash
pip install "docarray[full]"
pip install "docarray[common]"
```
The following dependencies will be installed to enable additional features:
The following dependencies will be installed to enable the most common features:
| Package | Used in |
|---|---|
Expand All @@ -44,10 +44,27 @@ The following dependencies will be installed to enable additional features:
| `requests` | push/pull to Jina Cloud |
| `matplotlib` | visualizing image sprites |
| `Pillow` | image data-related IO |
| `rich` | push/pull to Jina Cloud, summary of Document, DocumentArray |
| `av` | video data-related IO |
| `trimesh`| 3D mesh data-related IO |
| `fastapi`| used in embedding projector of DocumentArray|
| `uvicorn`| used in embedding projector of DocumentArray|
````

````{tab} Full install
```bash
pip install "docarray[full]"
```
In addition to `common`, the following dependencies will be installed to enable full features:
| Package | Used in |
|---|---|
| `scipy` | for sparse embedding, tensors |
| `av` | for video processing and IO |
| `trimesh` | for 3D mesh processing and IO |
| `weaviate-client` | for using Weaviate-based document store |
| `pqlite` | for using PQLite-based document store |
| `qdrant-client` | for using Qdrant-based document store |
| `strawberry-graphql` | for GraphQL support |
Alternatively, you can first do basic installation and then install missing dependencies on-demand.
````
Expand Down
9 changes: 9 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,15 @@
install_requires=['numpy', 'rich'],
extras_require={
# req usage, please see https://docarray.jina.ai/#install
'common': [
'protobuf>=3.13.0',
'lz4',
'requests',
'matplotlib',
'Pillow',
'fastapi',
'uvicorn',
],
'full': [
'protobuf>=3.13.0',
'lz4',
Expand Down

0 comments on commit 5ad00c0

Please sign in to comment.