Skip to content

Commit

Permalink
Document running dev lightning on the cloud (#15962)
Browse files Browse the repository at this point in the history
* document running dev lightning on the cloud

* document running dev lightning on the cloud

* Update .github/CONTRIBUTING.md

Co-authored-by: Noha Alon <nohalon@gmail.com>

* document running dev lightning on the cloud

* git clone & pip install -e

* Update .github/CONTRIBUTING.md

Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>

Co-authored-by: Noha Alon <nohalon@gmail.com>
Co-authored-by: Jirka Borovec <6035284+Borda@users.noreply.github.com>
(cherry picked from commit cfd00d3)
  • Loading branch information
akihironitta authored and Borda committed Dec 9, 2022
1 parent ad1de34 commit 5f862fd
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,20 @@ and the last true master commit is `ccc111` and your first commit is `mmm222`.
git push -f
```

#### How to run an app on the cloud with a local version of lightning

The lightning cloud uses the latest release by default. However, you might want to run your app with some local changes you've made to the lightning framework. To use your local version of lightning on the cloud, set the following environment variable:

```bash
git clone https://github.com/Lightning-AI/lightning.git
cd lightning
pip install -e .
export PACKAGE_LIGHTNING=1 # <- this is the magic to use your version (not mainstream PyPI)!
lightning run app app.py --cloud
```

By seting `PACKAGE_LIGHTNING=1`, lightning packages the lightning source code in your local directory in addition to your app source code and uploads them to the cloud.

### Bonus Workflow Tip

If you don't want to remember all the commands above every time you want to push some code/setup a Lightning Dev environment on a new VM, you can set up bash aliases for some common commands. You can add these to one of your `~/.bashrc`, `~/.zshrc`, or `~/.bash_aliases` files.
Expand Down

0 comments on commit 5f862fd

Please sign in to comment.