-
-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs(deploy): Add a deployment section
- Loading branch information
Showing
7 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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/). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters