diff --git a/docs/content/docs/deploy-cloud.md b/docs/content/docs/deploy-cloud.md new file mode 100644 index 00000000..0bde2143 --- /dev/null +++ b/docs/content/docs/deploy-cloud.md @@ -0,0 +1,19 @@ +# Cloud + +Trame applications can be bundled into a standalone docker container image that can then be deployed in the cloud with various mechanisms. + +The [trame-cookiecutter](https://github.com/Kitware/trame-cookiecutter) provide an initial example for building such image under `bundles/docker/*`. + +For single file application you can find an example in that [repository](https://github.com/Kitware/trame-app-cone) along with [a multi-application setup](https://github.com/Kitware/trame-app-cone/tree/multi-app). + +## CapRover + +To even streamline the deployment of such docker image, you can leverage [CapRover](https://caprover.com/) to automatically enable HTTPS/WSS on public domains for your trame app. + +Both the cookiecutter in `bundles/docker/DEPLOY.md` and the [single file app repo](https://github.com/Kitware/trame-app-cone) go over the steps to deploy any trame application to CapRover. + +## Infinite scaling + +Trame applications have the possibility to be launched on server less architecture and therefore virtually scale to infinity by using a routing server and the reverse connection infrastructure of its server. Such feature can be leverage both in the cloud or in HPC. + +For more details on that feature please reach out to [Kitware](https://www.kitware.com/contact/). diff --git a/docs/content/docs/deploy-desktop.md b/docs/content/docs/deploy-desktop.md new file mode 100644 index 00000000..2d0bcb3d --- /dev/null +++ b/docs/content/docs/deploy-desktop.md @@ -0,0 +1,9 @@ +# Desktop + +Trame applications can be bundled into a standalone desktop application and presented to the user like a native application without the need of a browser to expose the UI. + +For that part we usually rely on [PyInstaller](https://pyinstaller.org/en/stable/#) to bundle the Python part of the code into something executable. Then you can either rely on [PyWebView](https://pywebview.flowrl.com/) or [Tauri](https://tauri.app/) to hide the browser and enable a native app look. + +The [trame-cookiecutter](https://github.com/Kitware/trame-cookiecutter) provide an initial example for using PyWebView under `bundles/desktop/*`. + +For tauri, you can look at an example [here](https://github.com/Kitware/trame-tauri/tree/master/examples/simple-cone). Then you can browse around for more... \ No newline at end of file diff --git a/docs/content/docs/deploy-hpc.md b/docs/content/docs/deploy-hpc.md new file mode 100644 index 00000000..d11476cd --- /dev/null +++ b/docs/content/docs/deploy-hpc.md @@ -0,0 +1,5 @@ +# HPC + +High Performance Computing is a world on its own where every center may have its own set of rules. So due to the specificities it might be worth [reaching out to a specialist at Kitware](https://www.kitware.com/contact/) to discuss what options might be available for your environment. + +For more general purpose system, we've created a simple template for [Open OnDemand](https://osc.github.io/ood-documentation/latest/index.html#) that is available [here](https://github.com/Kitware/trame-ondemand-bc-cone) for reference. \ No newline at end of file diff --git a/docs/content/docs/deploy-jupyter.md b/docs/content/docs/deploy-jupyter.md new file mode 100644 index 00000000..9016b930 --- /dev/null +++ b/docs/content/docs/deploy-jupyter.md @@ -0,0 +1,16 @@ +# Jupyter + +Trame applications can be imported and shown within a Jupyter cell without missing any of your application capabilities. + +The [trame-cookiecutter](https://github.com/Kitware/trame-cookiecutter) provide an initial helper that live under `{package_name}/app/jupyter.py` which provide a `show()` method. + +But such `show()` method can be implemented for a single file application like below when no additional parameter are required for your application: + +```python +def show(**kwargs): + from trame.app import jupyter + jupyter.show(server, **kwargs) +``` + +The way such integration works is by running the trame server as an asynchronous task within Tornedo (Jupyter kernel) and opening a new port so that iframe can connect to it. +This means that everything defined within your Jupyter environment is accessible within trame and vice-versa. diff --git a/docs/content/docs/deploy-pypi.md b/docs/content/docs/deploy-pypi.md new file mode 100644 index 00000000..ff095cee --- /dev/null +++ b/docs/content/docs/deploy-pypi.md @@ -0,0 +1,7 @@ +# PYPI / CLI + +Trame applications are regular Python code which means they can be deployed to PyPI or conda and be used as command line tools. + +The [trame-cookiecutter](https://github.com/Kitware/trame-cookiecutter) provide an initial structure for streamlining such use case. + +But technically nothing would separate a trame app than any other Python package. \ No newline at end of file diff --git a/docs/tpl/__en__ b/docs/tpl/__en__ index cb108f90..acb44aa5 100644 --- a/docs/tpl/__en__ +++ b/docs/tpl/__en__ @@ -38,6 +38,12 @@ sidebar: t_html: HTML t_application: Application t_pv: ParaView + deploy: Deploy targets + d_pypi: Python CLI + d_jupyter: Jupyter + d_desktop: Desktop + d_cloud: Cloud + d_hpc: HPC / Clusters examples: getting_started: Getting Started diff --git a/docs/tpl/__sidebar__ b/docs/tpl/__sidebar__ index 82b2c9fd..c5107185 100644 --- a/docs/tpl/__sidebar__ +++ b/docs/tpl/__sidebar__ @@ -17,6 +17,12 @@ docs: t_html: tutorial-html.html t_application: tutorial-application.html t_pv: tutorial-paraview.html + deploy: + d_pypi: deploy-pypi.html + d_jupyter: deploy-jupyter.html + d_desktop: deploy-desktop.html + d_cloud: deploy-cloud.html + d_hpc: deploy-hpc.html examples: getting_started: