pytorch-lightning icon indicating copy to clipboard operation
pytorch-lightning copied to clipboard

No way to login headless

Open MarcSkovMadsen opened this issue 3 years ago • 1 comments

First check

  • [X] I'm sure this is a bug.
  • [X] I've added a descriptive title to this bug.
  • [X] I've provided clear instructions on how to reproduce the bug.
  • [X] I've added a code sample.
  • [X] I've provided any other important info that is required.

Bug description

I want to run lightning on a server in the cloud that where I have access to the terminal via a browser (Its part of a Jupyter Hub). I.e. it cannot open a browser. I see no way to login.

Eventually I would like to deploy my lightning app via lightning run app app.py --cloud.

How to reproduce the bug

$ lightning login

Error messages and logs

INFO: login started for lightning.ai, opening https://lightning.ai/sign-in?redirectTo=http%3A%2F%2Flocalhost%3A38151%2Flogin-complete /usr/bin/xdg-open: 869: www-browser: not found /usr/bin/xdg-open: 869: links2: not found /usr/bin/xdg-open: 869: elinks: not found /usr/bin/xdg-open: 869: links: not found /usr/bin/xdg-open: 869: lynx: not found /usr/bin/xdg-open: 869: w3m: not found xdg-open: no method available for opening 'https://lightning.ai/sign-in?redirectTo=http%3A%2F%2Flocalhost%3A38151%2Flogin-complete'

Important info

lightning==2022.9.8

More info

  • If the server can start without trying to open a browser I can access the lightning app locally via the jupyter-server-proxy reverse proxy
  • If the lightning cli can login without trying to open a browser I can deploy to the cloud.

MarcSkovMadsen avatar Sep 19 '22 17:09 MarcSkovMadsen

Hi @MarcSkovMadsen, it's not documented anywhere and is not a super clean solution but if this is blocking you, a work around is already being discussed at https://github.com/Lightning-AI/lightning/issues/14700

hhsecond avatar Sep 20 '22 08:09 hhsecond

This issue has been automatically marked as stale because it hasn't had any recent activity. This issue will be closed in 7 days if no further activity occurs. Thank you for your contributions, PyTorch Lightning Team!

stale[bot] avatar Oct 29 '22 23:10 stale[bot]