Wave app with Jupyter proxy #2068
Replies: 5 comments 14 replies
-
Hi @bijucyborg. It seems like
See configuration docs for more options. |
Beta Was this translation helpful? Give feedback.
-
Hi @mturoci thanks for responding so quickly. I set the env variable H2O_WAVE_BASE_URL="/proxy/10101/" :~/h2o-llmstudio$ make wave http://127.0.0.1:8848/proxy/10101/ Request Method:GETStatus Code:200 OK --> So the index file loads fine but the JS and CSS does not load http://127.0.0.1:8848/wave-static/index-558cdd08.js Request Method:GETStatus Code:404 Not Found http://127.0.0.1:8848/wave-static/index-46c254f1.css Request Method:GETStatus Code:404 Not Found because they are now available at http://127.0.0.1:8848/proxy/10101/proxy/10101/wave-static/index-558cdd08.js Request Method:GETStatus Code:200 OK http://127.0.0.1:8848/proxy/10101/proxy/10101/wave-static/index-46c254f1.css Request Method:GETStatus Code:200 OK I wish the index.html be served from the default address but the CSS and JS paths be appended with /proxy/10101/, is that possible? |
Beta Was this translation helpful? Give feedback.
-
I need to do some more testing and will respond in a couple of days. Yesterday I tried what you mentioned and it did not work because of how Jupyter proxy is designed but I have feeling that the browser cache could have played a role as well. |
Beta Was this translation helpful? Give feedback.
-
I'm going to give up on this but thanks for such prompt response. Its not per se an issue with wave but how jupyter proxy works. Just for the record, here is what I was trying to do. I was trying to create a jupyter proxy extension for H2O LLM Studio. bijucyborg/jupyter_h2o-llm-studio_proxy@a8d1b21 I believe this could also serve as an example for someone who wishes to launch a wave dashboard from jupyter hub. There is a jupyter proxy streamlit example. So I set the parameters.
Jupyter server proxy automatically assigns a port to the waved server and opens the URL http://127.0.0.1:8848/h2ollmstudio/
So in this scenario, it does not find the index.html
The index can be resolved at http://127.0.0.1:8848/h2ollmstudio/h2ollmstudio/ And if I don't set the Base URL then it does not find the JS and CSS. Thanks again for creating wave, keep up the good work. |
Beta Was this translation helpful? Give feedback.
-
I tried two things simultaneously but no luck with any additional messages.
Attached is the HAR file in case that helps. |
Beta Was this translation helpful? Give feedback.
-
I wish to run a wave app (H2O LLM Studio) via a Jupyter hub interface using Jupyter server proxy and did get it to work but only after a few hacks. The benefit is that this provides an environment where users login and get access to select tools.
Jupyter proxy allows access to web apps running inside the environment via a URL which is
http://jupyter-url/proxy//
Since the wave app is listening on port 10101 this url will be http://jupyter-url/proxy/10101/
So I tried several combinations of environment variables H2O_WAVE_ADDRESS, H2O_WAVE_APP_ADDRESS but nothing worked.
But then I changed two things
In the JS file wave-static/index-558cdd08.js and
Changed the const e=RC.getAttribute("data-wave-socket-url");return e?e.startsWith("/")?e.substring(1):e:"proxy/10101/_s/"}
to create web socket in a different way.
Changed the app.py serving function to offer a different end point.
@app("/proxy/10101/", on_startup=on_startup)
Question is can all these be achieved by setting parameters? since I do not wish to hack the setup so much.
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions