diff --git a/doc/apps/panel.md b/doc/apps/panel.md index 668d302e..84d667db 100644 --- a/doc/apps/panel.md +++ b/doc/apps/panel.md @@ -38,8 +38,58 @@ panel serve app.py ## Deploy +`````{tab-set} + +````{tab-item} Web +__Deploy from the menu__ + +Once you have all your files, create a zip file. + To deploy a Panel app from the deployment menu, follow these instructions: ![](../static/panel.png) -To learn more about deploying Panel applications on Ploomber Cloud [click here](https://panel.holoviz.org/how_to/deployment/ploomber.html) \ No newline at end of file +To learn more about deploying Panel applications on Ploomber Cloud [click here](https://panel.holoviz.org/how_to/deployment/ploomber.html) +```` + +````{tab-item} Command-line +__Try an example__ + +To download and deploy an example Panel application start by installing Ploomber Cloud and setting your API key: + +```sh +pip install ploomber-cloud +ploomber-cloud key YOUR-KEY +``` + +```{tip} +If you don't have an API key yet, follow the [instructions here.](../quickstart/apikey.md) +``` + +Now, download an example. It will prompt you for a location to download the app. To download in the current directory, just press enter. + +```sh +ploomber-cloud examples panel/data-viz +``` + +```{note} +A full list of Panel example apps is available [here.](https://github.com/ploomber/doc/tree/main/examples/panel) +``` + +You should see a confirmation with instructions on deploying your app. Now, navigate to your application: + +```sh +cd location-you-entered/data-viz +``` + +__Deploy from the CLI__ + +Initialize and deploy your app with: + +```sh +ploomber-cloud init +ploomber-cloud deploy --watch +``` + +```` +````` \ No newline at end of file diff --git a/doc/apps/shiny-r.md b/doc/apps/shiny-r.md index 10b62a3d..2e4605da 100644 --- a/doc/apps/shiny-r.md +++ b/doc/apps/shiny-r.md @@ -25,11 +25,58 @@ Rscript install.R Rscript startApp.R ``` - ## Deploy +`````{tab-set} + +````{tab-item} Web +__Deploy from the menu__ + Once you have all your files, create a zip file. To deploy a Shiny app from the deployment menu, select the Shiny (R) option and follow the instructions: ![](../static/shiny-r.png) +```` + +````{tab-item} Command-line +__Try an example__ + +To download and deploy an example Shiny-R application start by installing Ploomber Cloud and setting your API key: + +```sh +pip install ploomber-cloud +ploomber-cloud key YOUR-KEY +``` + +```{tip} +If you don't have an API key yet, follow the [instructions here.](../quickstart/apikey.md) +``` + +Now, download an example. It will prompt you for a location to download the app. To download in the current directory, just press enter. + +```sh +ploomber-cloud examples shiny-r/shiny-r-data-visualization +``` + +```{note} +A full list of Shiny-R example apps is available [here.](https://github.com/ploomber/doc/tree/main/examples/shiny-r) +``` + +You should see a confirmation with instructions on deploying your app. Now, navigate to your application: + +```sh +cd location-you-entered/shiny-r-data-visualization +``` + +__Deploy from the CLI__ + +Initialize and deploy your app with: + +```sh +ploomber-cloud init +ploomber-cloud deploy --watch +``` + +```` +````` \ No newline at end of file diff --git a/doc/apps/solara.md b/doc/apps/solara.md index 01730fcd..0bd2a27e 100644 --- a/doc/apps/solara.md +++ b/doc/apps/solara.md @@ -39,13 +39,56 @@ solara run app.py ## Deploy +`````{tab-set} + +````{tab-item} Web +__Deploy from the menu__ + Once you have all your files, create a zip file. To deploy a Solara app from the deployment menu, follow these instructions: ![](../static/solara.png) +```` + +````{tab-item} Command-line +__Try an example__ + +To download and deploy an example Solara application start by installing Ploomber Cloud and setting your API key: + +```sh +pip install ploomber-cloud +ploomber-cloud key YOUR-KEY +``` + +```{tip} +If you don't have an API key yet, follow the [instructions here.](../quickstart/apikey.md) +``` + +Now, download an example. It will prompt you for a location to download the app. To download in the current directory, just press enter. + +```sh +ploomber-cloud examples solara/gpt-4-tokenizer +``` + +```{note} +A full list of Solara example apps is available [here.](https://github.com/ploomber/doc/tree/main/examples/solara) +``` + +You should see a confirmation with instructions on deploying your app. Now, navigate to your application: -## Example -Ploomber has created an example solara app for your convenience. +```sh +cd location-you-entered/gpt-4-tokenizer +``` + +__Deploy from the CLI__ + +Initialize and deploy your app with: + +```sh +ploomber-cloud init +ploomber-cloud deploy --watch +``` -Check it out [here.](https://github.com/ploomber/doc/blob/main/examples/solara/gpt-4-tokenizer/app.py) +```` +````` \ No newline at end of file diff --git a/doc/apps/streamlit.md b/doc/apps/streamlit.md index 23e12f46..fe097ffe 100644 --- a/doc/apps/streamlit.md +++ b/doc/apps/streamlit.md @@ -38,6 +38,56 @@ streamlit run app.py ## Deploy +`````{tab-set} + +````{tab-item} Web +__Deploy from the menu__ + +Once you have all your files, create a zip file. + To deploy a Streamlit app from the deployment menu, follow these instructions: ![](../static/streamlit.png) +```` + +````{tab-item} Command-line +__Try an example__ + +To download and deploy an example Streamlit application start by installing Ploomber Cloud and setting your API key: + +```sh +pip install ploomber-cloud +ploomber-cloud key YOUR-KEY +``` + +```{tip} +If you don't have an API key yet, follow the [instructions here.](../quickstart/apikey.md) +``` + +Now, download an example. It will prompt you for a location to download the app. To download in the current directory, just press enter. + +```sh +ploomber-cloud examples streamlit/data-viz +``` + +```{note} +A full list of Streamlit example apps is available [here.](https://github.com/ploomber/doc/tree/main/examples/streamlit) +``` + +You should see a confirmation with instructions on deploying your app. Now, navigate to your application: + +```sh +cd location-you-entered/data-viz +``` + +__Deploy from the CLI__ + +Initialize and deploy your app with: + +```sh +ploomber-cloud init +ploomber-cloud deploy --watch +``` + +```` +````` \ No newline at end of file diff --git a/doc/apps/voila.md b/doc/apps/voila.md index abd706eb..964b5ab2 100644 --- a/doc/apps/voila.md +++ b/doc/apps/voila.md @@ -1,17 +1,13 @@ # Voilà -```{tip} -If you haven't deployed your first application, check out the [quickstart guide.](../quickstart/app.md) -``` +## Voila applications -To deploy a application you need two files: +To deploy an application you need two files: 1. A Jupyter notebook file (`.ipynb`) 2. A dependencies file (`requirements.txt`) -## Voilà - -Currently, Ploomber Cloud supports `Voilà` for deploying Jupyter notebooks as applications. For information on how to write Voilà applications, [please check the documentation](https://voila.readthedocs.io/en/stable/). +For information on how to write Voilà applications, [please check the documentation](https://voila.readthedocs.io/en/stable/). Click here to see [some examples.](../examples/voila.md) @@ -28,6 +24,56 @@ matplotlib ## Deploy +`````{tab-set} + +````{tab-item} Web +__Deploy from the menu__ + +Once you have all your files, create a zip file. + To deploy a Voilà app from the deployment menu, follow these instructions: -![](../static/voila.png) \ No newline at end of file +![](../static/voila.png) +```` + +````{tab-item} Command-line +__Try an example__ + +To download and deploy an example Voila application start by installing Ploomber Cloud and setting your API key: + +```sh +pip install ploomber-cloud +ploomber-cloud key YOUR-KEY +``` + +```{tip} +If you don't have an API key yet, follow the [instructions here.](../quickstart/apikey.md) +``` + +Now, download an example. It will prompt you for a location to download the app. To download in the current directory, just press enter. + +```sh +ploomber-cloud examples voila/chat-with-csv +``` + +```{note} +A full list of Voila example apps is available [here.](https://github.com/ploomber/doc/tree/main/examples/voila) +``` + +You should see a confirmation with instructions on deploying your app. Now, navigate to your application: + +```sh +cd location-you-entered/chat-with-csv +``` + +__Deploy from the CLI__ + +Initialize and deploy your app with: + +```sh +ploomber-cloud init +ploomber-cloud deploy --watch +``` + +```` +````` \ No newline at end of file diff --git a/doc/user-guide/cli.md b/doc/user-guide/cli.md index 52d20cf5..fee11bfc 100644 --- a/doc/user-guide/cli.md +++ b/doc/user-guide/cli.md @@ -67,6 +67,33 @@ Then, execute: ploomber-cloud deploy ``` +## Deploying an example + +Ploomber Cloud hosts example applications for many different frameworks. To download and deploy one, run `ploomber-cloud examples`: + +```sh +ploomber-cloud examples +``` + +Follow the prompts to choose a framework and specific example name. You may also specify a directory in which to download the example. + +Once the application is downloaded, it's ready to deploy! For example, if you downloaded the `basic-app` example for `Flask` in the current directory: + +```sh +ploomber-cloud key YOUR-KEY +cd basic-app +ploomber-cloud init +ploomber-cloud deploy --watch +``` + +If you already know which example you want, you can download it while avoiding prompts with `ploomber-cloud examples framework/example-name`: + +```sh +ploomber-cloud examples flask/basic-app +``` + +A full list of example applications is available [here](https://github.com/bryannho/doc/tree/main/examples) + ## Defining environment variables If your project uses environment variables, you can define them in an `.env` file.