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

jc login doesn't show content. #99

Closed Ethan-Chen-plus closed 1 year ago

Ethan-Chen-plus commented 1 year ago

as it showed below image it can be success loged in the website. image however these isn't any info shown in terminal. after about 5min it show this in terminal

Traceback (most recent call last):
  File "/home/kewei/miniconda3/bin/jc", line 8, in <module>
    sys.exit(main())
  File "/home/kewei/miniconda3/lib/python3.9/site-packages/jcloud/__main__.py", line 21, in main
    getattr(api, args.jc_cli.replace('-', '_'))(args)
  File "/home/kewei/miniconda3/lib/python3.9/site-packages/jcloud/api.py", line 273, in login
    hubble.login()
  File "/home/kewei/miniconda3/lib/python3.9/site-packages/hubble/__init__.py", line 68, in login
    Auth.login_sync(**kwargs)
  File "/home/kewei/miniconda3/lib/python3.9/site-packages/hubble/utils/auth.py", line 440, in login_sync
    response.raise_for_status()
  File "/home/kewei/miniconda3/lib/python3.9/site-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.hubble.jina.ai/v2/rpc/user.identity.grant.auto
Traceback (most recent call last):
  File "/home/kewei/miniconda3/bin/jc", line 8, in <module>
    sys.exit(main())
  File "/home/kewei/miniconda3/lib/python3.9/site-packages/jcloud/__main__.py", line 21, in main
    getattr(api, args.jc_cli.replace('-', '_'))(args)
  File "/home/kewei/miniconda3/lib/python3.9/site-packages/jcloud/api.py", line 273, in login
    hubble.login()
  File "/home/kewei/miniconda3/lib/python3.9/site-packages/hubble/__init__.py", line 68, in login
    Auth.login_sync(**kwargs)
  File "/home/kewei/miniconda3/lib/python3.9/site-packages/hubble/utils/auth.py", line 440, in login_sync
    response.raise_for_status()
  File "/home/kewei/miniconda3/lib/python3.9/site-packages/requests/models.py", line 960, in raise_for_status
    raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://api.hubble.jina.ai/v2/rpc/user.identity.grant.auto

how can I solve this?

nomagick commented 1 year ago

Hi. What is your jcloud version? Did you retry on this issue? Are you using some kind of system-wide non-standard proxy software? Could you try again without any proxy software or using another computer?

Ethan-Chen-plus commented 1 year ago

Hi. What is your jcloud version? Did you retry on this issue? Are you using some kind of system-wide non-standard proxy software? Could you try again without any proxy software or using another computer?

I closed all my proxy and I have retried for several times, it doesn't works. image

I searched from the docs:https://docs.jina.ai/jina-ai-cloud/login/ I see that the token would be saved locally.I wonder whether the reason is that I use WSL and the browser is my windows browser so the token saved in windows not WSL. So I need some ways to manually save the token in my WSL.

nomagick commented 1 year ago

It should be able to work with WSL.

The command line uses a persistent HTTPS connection under the hood. When your browser shows the Login Success page, the command line should receive an event push from the server. Somehow this didn't happen.

Could you try with another network environment without a proxy, like a 4G/5G hotspot?

If it's still not working, you can create a PAT from the UI to walk around. https://docs.jina.ai/jina-ai-cloud/login/#token-management

Ethan-Chen-plus commented 1 year ago

I tried with 5G hotspot from my mobile phone instead of WIFI I had used before. However this doesn't change. I used I

export JINA_AUTH_TOKEN="d08ede1xxxxxxxxxxxx"

image

and then the login seems OK. however there is another problem happened when I used deploy: image

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 cloned it from this project:https://github.com/jina-ai/example-speech-to-image

zac-li commented 1 year ago

What's your Flow YAML in this case?

Ethan-Chen-plus commented 1 year ago
jtype: Flow
executors:
  - name: whisper
    uses: jinahub+docker://WhisperExecutor
    uses_with:
      model_name: medium
    gpus: all
    jcloud:
      resources:
        gpu: 1
        memory: 2
  - 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: 16
zac-li commented 1 year ago

can you try changing memory: 2 to memory: 2G (memory: 16 to memory: 16G) to see if that makes any difference?

Ethan-Chen-plus commented 1 year ago

I changed it, so this happened: image so I used vi flow.py image and it seems that this project requires two GPUs. how to solve it?

deepankarm commented 1 year ago

Hey @Ethan-Chen-plus, currently we have a few restrictions in JCloud, and we allow at max 1 GPU per Flow.

zac-li commented 1 year ago

Please reopen if needed.