-
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
[DOC] - JHub App Launcher missing assumption information #91
Comments
Hey @jourdain thanks for raising the issue. The documentation for custom apps isn't there yet. That's probably the reason for all the confusion. The generic python command does support dynamic ports, here is an example for starting a simple python server:
In the above command the Can you share the command that you'd run locally to start the app? (also the code if public) |
A simple way to validate if any trame app can work, we might be able to validate it with the following. Required environment:
Possible command line for the demo app:
|
I guess my naive try did not work. Thanks for your input so far but if you have any other idea or guidance that will be great... |
The following command seems to working fine locally, thanks for your input.
|
I guess in the context of a real deployment (nebari), do my app needs to do something specific for activity or health check? |
I did a quick test using the following environment: channels:
- conda-forge
dependencies:
- jhub-apps
- streamlit
- gradio
- voila
- dash
- ipykernel
- trame
- trame-vtk
- trame-vuetify
- vmtk I had to add Command Running:
Error output:
Traceback (most recent call last):
File "<frozen runpy>", line 198, in _run_module_as_main
File "<frozen runpy>", line 88, in _run_code
File "/home/conda/akumar@quansight.com/envs/akumar@quansight.com-jhub-apps/lib/python3.11/site-packages/trame/app/demo.py", line 68, in <module>
main()
File "/home/conda/akumar@quansight.com/envs/akumar@quansight.com-jhub-apps/lib/python3.11/site-packages/trame/app/demo.py", line 64, in main
cone.server.start(**kwargs)
File "/home/conda/akumar@quansight.com/envs/akumar@quansight.com-jhub-apps/lib/python3.11/site-packages/trame_server/core.py", line 651, in start
task = CoreServer.server_start(
^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/conda/akumar@quansight.com/envs/akumar@quansight.com-jhub-apps/lib/python3.11/site-packages/trame_server/protocol.py", line 50, in server_start
return server.start_webserver(
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/conda/akumar@quansight.com/envs/akumar@quansight.com-jhub-apps/lib/python3.11/site-packages/wslink/server.py", line 301, in start_webserver
return exec_modes[exec_mode]()
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/conda/akumar@quansight.com/envs/akumar@quansight.com-jhub-apps/lib/python3.11/site-packages/wslink/server.py", line 284, in main_exec
loop.run_until_complete(create_coroutine())
File "/home/conda/akumar@quansight.com/envs/akumar@quansight.com-jhub-apps/lib/python3.11/asyncio/base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/home/conda/akumar@quansight.com/envs/akumar@quansight.com-jhub-apps/lib/python3.11/site-packages/wslink/backends/aiohttp/__init__.py", line 111, in start
await self._site.start()
File "/home/conda/akumar@quansight.com/envs/akumar@quansight.com-jhub-apps/lib/python3.11/site-packages/aiohttp/web_runner.py", line 119, in start
self._server = await loop.create_server(
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/conda/akumar@quansight.com/envs/akumar@quansight.com-jhub-apps/lib/python3.11/asyncio/base_events.py", line 1525, in create_server
raise OSError(err.errno, 'error while attempting '
OSError: [Errno 99] error while attempting to bind on address ('::1', 50771, 0, 0): cannot assign requested address I see you mentioned it's working for you locally. What do you get when you run something like (locally):
|
Thanks for looking into that. Locally I don't get that bind error. But you could try to add a Indeed, with that example of |
Wow, thanks for following up on that, this is awesome! |
Preliminary Checks
Summary
In the documentation a list of "apps type" is provided but it is not clear what assumptions are associated to the
Generic Python Command
case or the others. Or even how someone could contribute another app type to that list.I'm guessing some parameters needs to be passed or assumed (i.e.: port, ...)
It would be nice to provide some background on what an app can be and what is supported or missing.
Steps to Resolve this Issue
In my case, I was coming with the following set of questions:
jhub-app-launcher start a new pod within our k8 environment with the provided Python environment and handle the routing of the network so the application just need to serve http content on a provided port along with ... On top of regular HTTP request Nebari forward WebSocket connection with automatic disconnection every 30 seconds.
Generic Python Command
or do I need to register a new type?Generic Python Command
will run the provided command and add the following args to specify on which port (--port {dynamic-port-value}
) the app should run and what prefix url (--prefix /nebari/proxy/app/{xyz}
) will be used in front of the http requests.Other warning could be needed in case limitation exists, like:
Caution:
(All my suggestions are just speculation to provide some ideas on the kind of information a user/developer might be looking for but does not reflect the reality by any means.)
The text was updated successfully, but these errors were encountered: