Hello I am working on setting up PrivateGPT in OOD. This launches as a web app using uvicorn and gradio as a UI. I am able to launch the service. It does come up on a port and OOD connects to it. When I hit the button to connect I do see the UI. However parts of the page don’t load properly. There should be some java script and css that is loaded. I see the following in the applications log when I make the connection.
I did find a github post with a similar sounding issue behind an nginix proxy which was able to be resolved. I am unsure if this is applicable but may be a step in the right direction. The solution was to use the following settings.
Yea gradio can be kinda wonky. When I deployed stable diffusion web ui (built on gradio app) we’re able to supply a --subpath argument. Looking at the source code for this app - in the settings.yml you can only set the port, so that doesn’t seem like it’s an option for you.
It may just work for you if you use /rnode in your view.html.erb. That may proxy correctly (not sure if you started with /node or not).
That said - you may have to use a nginx proxy within the job to set the URLs right. It’s not often that you should need to, but some apps just don’t work right or can recognize that they’re behind a proxy.
is the nginx proxy documented somewhere? Or if not can you please document it? I think we’ll have to explore this option with quite a few of the LLM frontends that are out there (like the OpenWebUI we talked about on Tuesday).
Thanks for the quick responses on this. I had no luck with node set in the view.html.erb. I can at least reach the UI in some capacity with rnode. In the Privatgpt settings there is an option to set a path. So far any changes to this setting haven’t made much of a difference.
Maybe with no quotes. IDK how the templating system interacts with environment variables, but quoting and not quoting are other variations you may need to try.
Is it possible for the reverse proxy Open Ondemand uses to connect to a Unix domain socket? This app uses uvicorn and can be started with any options it supports.
Yes in the sense that all passenger apps boot on unix sockets. So when access /pun/sys/dashboard for example apache connects to Nginx (which has booted the application) through a unix socket.
No in the sense that what this topic is about is a batch connect application. batch connect (or interactive) applications boot on a compute node (i.e., a different machine than the machine that’s running OnDemand). So connecting to that machine through a unix socket is impossible because it requires traveling over the network from the OnDemand machine to the compute node.
I am still stuck on this. I took the suggestion and built an nginx container. I configured it as a reverse proxy. I used the forum post about this specific app in my initial post and the shiny app that was posted with nginx config as inspiration.
If I start a remote desktop and start the app and proxy in that session I can then open a web browser and access the app on the port for the reverse proxy just fine. The page loads and everything looks fine.
When I go to reach the app through Open Ondemand I can reach it. I still have the same issues . I can reach the app, I can see it make the initial GET. It doesn’t load the CSS and JS.
I figured using nginx might give a bit more flexibility and help but there is still something in Open Ondemand that isn’t working right. Do you have any suggestions?
Feel free to close this. I got pretty close but could not get the page to render properly with proxy or reverse proxy. Ultimately I had it launch in a VNC session and start firefox in full screen kiosk mode. It’s not ideal but is getting the job done.