-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Custom Trame App not starting #169
Comments
Hey @alesgenova, running the suggested command on my Mac M1, throws the following error:
Tried after setting the environment variable too, as seen in the error message:
Can you share instructions on how to run it locally, outside of jhub-apps? |
Yes I will. I was waiting to have a published version to simplify the instructions. But we got a version published yesterday. So hopefully I can provide more input later today. |
You should be able to run the various test app with the following setup # setup venv
python -m venv .venv
source .venv/bin/activate
pip install -U pip
# install app with add-on testing endpoints
pip install "nrtk-explorer[web]>=0.1"
# Run the test web apps
python -m nrtk_explorer.app.test.quasar
python -m nrtk_explorer.app.test.vuetify3
# real application
python -m nrtk_explorer.app.main Any app accept standard arguments:
|
Thanks for looking into this. So at least you don't see any error with the test apps. Can you try installing the PyPI released version instead of the git one?
And if you have the same issue with the |
I mean technically a conda-recipe is pending for that package in case you rather use conda instead of PyPI. |
Okay, after some debugging, I am still trying to understand why it's not correctly rendering the application on jhub-apps. However I've confirmed a few things:
Because this runs
During those tests I've encountered a few bugs/errors messages that could provide some lead to why rendering is so problematic, but they require further digging. So far, I was able to expose the app-dashboard by following these steps:
|
|
Also if args have conflicting behavior, you could use a TRAME_ARGS="--host=0.0.0.0 --port=4836 --server" as env variable. I'll do another pass to see if things are working now that we have a native conda env. |
Yes, I've played with a few different values for the host, but it seems that Curiously, the example they provided in their docs does not work with the exact timing out behavior as of |
That will be great and let me know if I can help. |
The doc you linked assume you have full network access (not remote). That is why it is not working in a real deployment. Although with JupyterHub and server proxy, it should detect it automatically using the ENV variables and use the proxy path instead of direct port connection. |
Indeed it failed but if you do the following on the nebari platform it worked for me. from trame.app.demo import Cone
app = Cone()
await app.ui.ready
app.ui.iframe_builder = "jupyter-hub"
app.ui |
Once |
Gotcha, that makes sense; I was already playing with the extra iframe configuration but was going in another direction; thanks for the working example. Have you tried passing |
Yes both should work the same way. But the issue at hand was specifically with the NRTK app. The basic demo app always worked. What we could not understand was why the NRTK one (even the embedded simple test ones) were failing. I was hoping to get the conda recipe merged so we could test a proper environment without involving a git url and a mix of package manger (pypi + conda). I guess we should revisit that thread when this get merged so we can confirm it is truly a platform issue and not an invalid python environment due to mixed package manager. |
indeed, just to double check, I've built your environment, and I've got this error: ❯ conda activate trame-test
❯ python -m nrtk_explorer.app.main --server --port 8050 --host 0.0.0.0
Matplotlib is building the font cache; this may take a moment.
/Users/vinicius/miniconda3/envs/trame-test/lib/python3.10/site-packages/torch/amp/autocast_mode.py:250: UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling
warnings.warn(
/Users/vinicius/miniconda3/envs/trame-test/lib/python3.10/runpy.py:126: RuntimeWarning: 'nrtk_explorer.app.main' found in sys.modules after import of package 'nrtk_explorer.app', but prior to execution of 'nrtk_explorer.app.main'; this may result in unpredictable behaviour
warn(RuntimeWarning(msg))
Traceback (most recent call last):
File "/Users/vinicius/miniconda3/envs/trame-test/lib/python3.10/runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/Users/vinicius/miniconda3/envs/trame-test/lib/python3.10/runpy.py", line 86, in _run_code
exec(code, run_globals)
File "/Users/vinicius/miniconda3/envs/trame-test/lib/python3.10/site-packages/nrtk_explorer/app/main.py", line 10, in <module>
main()
File "/Users/vinicius/miniconda3/envs/trame-test/lib/python3.10/site-packages/nrtk_explorer/app/main.py", line 5, in main
engine = create_engine(server)
File "/Users/vinicius/miniconda3/envs/trame-test/lib/python3.10/site-packages/nrtk_explorer/app/core.py", line 372, in create_engine
return Engine(server)
File "/Users/vinicius/miniconda3/envs/trame-test/lib/python3.10/site-packages/nrtk_explorer/app/core.py", line 102, in __init__
self._transforms_app = TransformsApp(
File "/Users/vinicius/miniconda3/envs/trame-test/lib/python3.10/site-packages/nrtk_explorer/app/transforms.py", line 90, in __init__
"nrtk_pybsm": nrtk_trans.NrtkPybsmTransform(),
File "/Users/vinicius/miniconda3/envs/trame-test/lib/python3.10/site-packages/nrtk_explorer/library/nrtk_transforms.py", line 147, in __init__
sensor, scenario = createSampleSensorandScenario()
File "/Users/vinicius/miniconda3/envs/trame-test/lib/python3.10/site-packages/nrtk_explorer/library/nrtk_transforms.py", line 79, in createSampleSensorandScenario
darkCurrent = pybsm.darkCurrentFromDensity(1e-5, wx, wy)
AttributeError: module 'pybsm' has no attribute 'darkCurrentFromDensity' |
that was fixed two weeks ago, I will use the latest version from main |
You can grab some sample dataset by looking at the Usage section in the readme. But that is great! So it is most likely going to work remotely when using the Nebari App with custom command. |
This is on nebari, found that conda-store was caching one of the deps with an old version:
from jhub app
|
@jourdain does adding the right pybsm version fix the issue? |
Just tried with the conda recipe of
I guess I will close this issue for now. As the main problem initially was that the app was starting but we had no feedback of why it was not working. |
For reference: Requested Packages
Packages Installed as Dependencies
|
Hi @jourdain, sorry for the late follow-up. It seems that addressing this on the conda-forge release helped address the error. I also saw that you are passing an extra |
I just added it to prevent auto-stop in case the web client is not connected. That is not part of the issue. While it is hard to pin-point the actual issue. I think it is a blend of "No output error" (at the time) and some inconsistency with the pip packages and the conda environment. By making a conda environment we definitely solved the second point. And we ran into other issues where some of our dependency required HTH |
That's great; I will close this issue then, as the original problem seems to have been resolved. We can open a separate one in case the problem occurs once again. |
@jourdain I believe I've hit that issue with opencv as well with other nrtk apps. You'll need to add |
To summarize - we believe this was a variety of environment related issues. This wasn't apparent initially since we didn't have Loki integrated with nebari to give us easy access to the logs. |
Context
Hello,
I'm trying to deploy a Trame application on the nebari instance at
nebari.jatic.net
, but I'm having trouble having it launch correctly.I don't know what the issue is because I don't get any error output, the app simply wont start.
This is the configuration of the conda environment:
And this is the configuration for the custom app (custom command option)
To have a few more datapoints, the following are commands for a few Trame test applications that DO work instead. These applications can be found in the same conda environment
Finally, the following is a test application that DOES NOT work:
Value and/or benefit
Not a feature request
Anything else?
No response
The text was updated successfully, but these errors were encountered: