jina-ai / jcloud

Simplify deploying and managing Jina projects on Jina Cloud
https://docs.jina.ai/concepts/jcloud/
Apache License 2.0
298 stars 13 forks source link

Failed to deploy #108

Closed augustleoo closed 1 year ago

augustleoo commented 1 year ago

I was testing with the 'speech2image' example you provided here: https://github.com/jina-ai/example-speech-to-image

But when I was tryting to deploy the 'flow.yml', error message appears as:

Bad response: expecting 201, got 400 from server.
{
"code": 400,
"error": "cannot load Flow config failed to unmarshal flow config: error unmarshaling JSON: while
decoding JSON: json: cannot unmarshal number into Go struct field tmpType.executors of type
string",
"id": "",
"status": {
"phase": "",
"conditions": null,
"version": "",
"protocol": "",
"endpoints": null,
"dashboards": null
},
"ctime": "0001-01-01T00:00:00Z",
"utime": "0001-01-01T00:00:00Z"
}

I've tried to change the 'uses' in the yml, but nothing seemed t work.

Could you please help?

npitsillos commented 1 year ago

Hello @augustleoo there is a typo in the flow's yml you need to change it to the following:

jtype: Flow
executors:
  - name: whisper
    uses: jinahub+docker://WhisperExecutor
    uses_with:
      model_name: medium
    gpus: all
    jcloud:
      resources:
        gpu: 1
        memory: 2G
  - name: diffusion
    uses: jinahub+docker://StableDiffusionExecutor
    uses_with:
      auth_token: ${{ ENV.HF_TOKEN }}
    timeout_ready: -1 # slow download speed often leads to timeout
    replicas: 2
    jcloud:
      resources:
        gpu: 1
        memory: 16G

Notice the G added to the memory argument.

augustleoo commented 1 year ago

Hello @augustleoo there is a typo in the flow's yml you need to change it to the following:

jtype: Flow
executors:
  - name: whisper
    uses: jinahub+docker://WhisperExecutor
    uses_with:
      model_name: medium
    gpus: all
    jcloud:
      resources:
        gpu: 1
        memory: 2G
  - name: diffusion
    uses: jinahub+docker://StableDiffusionExecutor
    uses_with:
      auth_token: ${{ ENV.HF_TOKEN }}
    timeout_ready: -1 # slow download speed often leads to timeout
    replicas: 2
    jcloud:
      resources:
        gpu: 1
        memory: 16G

Notice the G added to the memory argument.

It works!! Thank you so much!