Host on JCloud#
JCloud does not support GPU hosting yet. Hence
clip_server deployed on JCloud will be run on CPU.
First, you need a Flow YAML file for deploy. A minimum YAML file is as follows:
jtype: Flow executors: - uses: jinahub+docker://CLIPTorchEncoder
jtype: Flow executors: - uses: jinahub+docker://CLIPOnnxEncoder
port is unnecessary here as JCloud will assign a new URL for any deployed service.
Executors now must start with
jinahub+docker:// as it is required by JCloud. We currently provide containerized executors
jinahub+docker://CLIPOnnxEncoder on Jina Hub. They are automatically synced on the new release of
jc deploy torch-flow.yml
jc deploy onnx-flow.yml
If Flow is successfully deployed you will see:
You can now connect to it via client by setting
server as the URL given by JCloud:
from clip_client import Client c = Client( 'grpcs://174eb69ba3.wolf.jina.ai' ) # This is the URL you get from previous step c.profile()