From 5de93975c61710e1dc508bf8bc67451b79bfed57 Mon Sep 17 00:00:00 2001 From: Akihiro Nitta Date: Fri, 13 Jan 2023 02:48:35 +0900 Subject: [PATCH] Document how to run apps with a local version of Lightning on the cloud (#16163) Co-authored-by: Akihiro Nitta --- docs/source-app/glossary/index.rst | 8 ++++++++ docs/source-app/glossary/use_local_lightning.rst | 15 +++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 docs/source-app/glossary/use_local_lightning.rst diff --git a/docs/source-app/glossary/index.rst b/docs/source-app/glossary/index.rst index a46da20ddd..0f92d4b51a 100644 --- a/docs/source-app/glossary/index.rst +++ b/docs/source-app/glossary/index.rst @@ -18,6 +18,7 @@ storage/storage restful_api/restful_api add web ui <../workflows/add_web_ui/glossary_ui> + use_local_lightning ######## Glossary @@ -153,3 +154,10 @@ Glossary :col_css: col-md-12 :button_link: ../workflows/add_web_ui/glossary_ui.html :height: 100 + +.. displayitem:: + :header: Using a development branch of Lightning on the Cloud + :description: Learn how to contribute to the Lightning framework in the cloud + :col_css: col-md-12 + :button_link: use_local_lightning.html + :height: 100 diff --git a/docs/source-app/glossary/use_local_lightning.rst b/docs/source-app/glossary/use_local_lightning.rst new file mode 100644 index 0000000000..0987dd3707 --- /dev/null +++ b/docs/source-app/glossary/use_local_lightning.rst @@ -0,0 +1,15 @@ +################################################################ +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.