Applications in SEPAL are a powerful tool to implement or prototype functionalities faster than the main recipies and allows external contributions. In the current implementation, these application are run using the following workflow:
upon installation a venv is created respecting the "requirements.txt" file from the application repository
SEPAL launch a Jupyter server
SEPAL uses a sandbox url to get to the "voila" output
SEPAL uses the venv only if the kernel name have been changed in the ui.ipynb file metadata
This present several issues:
we cannot control the appearance of the voila theme (as it's defined at jupyter server launchtime)
when an application is first added to SEPAL, the venv name is unknown so a second build is always required. Same if the application name changes
as the venv name is hardcoded in the notebook, it cannot be launched outside of SEPAL without changing it
it takes ages to start
proposed solution
In the recent development of application framework, we created a small process based on nox to launch the application on a local computer (any computer in fact). It shows multiple advantages:
loading is faster (as we skip the notebook rendering alltogether and go straight to voila
the application can be launched using a specific Python binary file (the one from the venv) so non need to hard code it in the notebook
difficulties
We don't know on which port the voila application is going to be served. In a local computer it is autodetected (8888, 8887....) but SEPAL does not expose all of them. I need to investigate if Juoyter-proxy could be of any help here.
nox build will be overlapping with the currently existing venv so we need to point to the automatically created one
These are the minute of a call with @cdanielw:
Problem
Applications in SEPAL are a powerful tool to implement or prototype functionalities faster than the main recipies and allows external contributions. In the current implementation, these application are run using the following workflow:
This present several issues:
proposed solution
In the recent development of application framework, we created a small process based on
nox
to launch the application on a local computer (any computer in fact). It shows multiple advantages:difficulties