From ca2b25b7564bc9b18ae38b93f0134e1f9aa0cee7 Mon Sep 17 00:00:00 2001 From: Zihao Jing <1971008968@qq.com> Date: Wed, 20 Dec 2023 12:09:07 +0800 Subject: [PATCH] docs: remove jina self-hosted parts (#942) * docs: remove jc parts * docs: update jina version jina==3.14.1 * docs: black the setup files * docs: update jina version req * docs: black files * docs: update versions * docs: update versions * docs: update versions * docs: version problem * docs: another version try * docs: update versions * docs: jina versions * docs: version problems * docs: version detect * docs: version problem * docs: update openclip version * docs: onnx version fixed * docs: install precommit * docs: revert black --- client/setup.py | 6 +++- docs/hosting/colab.md | 2 +- docs/index.md | 61 +------------------------------------- docs/user-guides/client.md | 3 -- server/setup.py | 8 ++--- 5 files changed, 11 insertions(+), 69 deletions(-) diff --git a/client/setup.py b/client/setup.py index 3aae4c955..0a248fec3 100644 --- a/client/setup.py +++ b/client/setup.py @@ -41,7 +41,11 @@ long_description_content_type='text/markdown', zip_safe=False, setup_requires=['setuptools>=18.0', 'wheel'], - install_requires=['jina>=3.12.0', 'docarray[common]>=0.19.0,<0.30.0', 'packaging'], + install_requires=[ + 'jina>=3.12.0', + 'docarray[common]>=0.19.0,<0.30.0', + 'packaging', + ], extras_require={ 'test': [ 'pytest', diff --git a/docs/hosting/colab.md b/docs/hosting/colab.md index e66cce0b4..8a383dbe4 100644 --- a/docs/hosting/colab.md +++ b/docs/hosting/colab.md @@ -30,7 +30,7 @@ Please follow the walk-through there. Enjoy the free GPU/TPU to build your aweso ```{tip} -Hosing service on Google Colab is not recommended if you server aims to be long-live or permanent. It is often used for quick experiment, demonstration or leveraging its free GPU/TPU. For stable, secure and free hosting of Jina apps, please check out [Jcloud](https://docs.jina.ai/fundamentals/jcloud/). +Hosing service on Google Colab is not recommended if you server aims to be long-live or permanent. It is often used for quick experiment, demonstration or leveraging its free GPU/TPU. For stable, please deploy the CLIP model on your own server. ``` diff --git a/docs/index.md b/docs/index.md index 9b78192fb..aebede013 100644 --- a/docs/index.md +++ b/docs/index.md @@ -1,9 +1,5 @@ # Welcome to CLIP-as-service! -```{include} ../README.md -:start-after: -:end-before: -``` ```{include} ../README.md :start-after: @@ -12,60 +8,6 @@ ## Try it! -You can access to the hosted CLIP service at [Jina AI's Inference](https://cloud.jina.ai/user/inference) with free credits. -Inference provides a selection of AI models for common tasks, such as visual reasoning, question answering, or embedding modalities like texts and images. -All the available models are accessible via simple API calls - HTTPS or gRPC. -Read this [Inference Guide](https://clip-as-service.jina.ai/hosting/by-jina/) to learn more. - -````{tab} via gRPC โšกโšก - -```bash -pip install clip-client -``` - -```{code-block} python ---- -emphasize-lines: 5 ---- -from clip_client import Client - -c = Client( - 'grpcs://-grpc.wolf.jina.ai', - credential={'Authorization': ''} -) - -r = c.encode( - [ - 'First do it', - 'then do it right', - 'then do it better', - 'https://picsum.photos/200', - ] -) -print(r) -``` - -```` - -````{tab} via HTTPS ๐Ÿ” - -```{code-block} bash ---- -emphasize-lines: 4 ---- -curl \ --X POST https://-http.wolf.jina.ai/post \ --H 'Content-Type: application/json' \ --H 'Authorization: ' \ --d '{"data":[{"text": "First do it"}, - {"text": "then do it right"}, - {"text": "then do it better"}, - {"uri": "https://picsum.photos/200"}], - "execEndpoint":"/"}' -``` - -```` - ## Install ![PyPI](https://img.shields.io/pypi/v/clip_client?color=%23ffffff&label=%20) is the latest version. @@ -206,8 +148,7 @@ user-guides/faq :caption: Hosting :hidden: -hosting/by-jina -hosting/on-jcloud + hosting/colab ``` diff --git a/docs/user-guides/client.md b/docs/user-guides/client.md index 5e04bac38..4bdfec907 100644 --- a/docs/user-guides/client.md +++ b/docs/user-guides/client.md @@ -35,7 +35,6 @@ The URL-like scheme `grpc://0.0.0.0:23456` is what you get after {ref}`running t | `port` | The public port of the server | `51234` | -Jina AI provides a hosted service for CLIP models. Refer [here](hosting/by-jina#by-jina-python) for more details on how to connect to the hosted service. ## Encoding @@ -629,5 +628,3 @@ curl -X POST http://0.0.0.0:51000/post \ [-0.022064208984375,0.1044921875,...] [-0.0750732421875,-0.166015625,...] ``` - -To connect to the CLIP server hosted by Jina AI, please refer to [this page](/hosting/by-jina#by-jina-curl). \ No newline at end of file diff --git a/server/setup.py b/server/setup.py index 324bad191..a16cfda25 100644 --- a/server/setup.py +++ b/server/setup.py @@ -46,15 +46,15 @@ 'regex', 'torchvision<=0.13.0' if sys.version_info <= (3, 7, 2) else 'torchvision', 'jina>=3.12.0', - 'docarray<0.30.0', + 'docarray==0.21.0', 'prometheus-client', - 'open_clip_torch>=2.8.0', - 'pillow-avif-plugin' + 'open_clip_torch>=2.8.0,<2.9.0', + 'pillow-avif-plugin', ], extras_require={ 'onnx': [ 'onnx', - 'onnxmltools', + 'onnxmltools<1.12.0', ] + ( ['onnxruntime-gpu<=1.13.1']