different behaviour between desktop VSCode and code-server using gradio app
In the context of a workshop, I'll be using a piece of code involving a gradio app.
The minimal code I have with the issue is the following:
The result is the screenshot without every element (mainly lack of css) from code-server and the second one is what I have with desktop VSCode used.
The browser console shows 2 requests with a status NS_ERROR_CORRUPTED_CONTENT and those are 2 css files (generated on the fly by gradio)
Any clue on why this behaves properly in desktop mode and not code-server mode?
7 Replies
<#1305931637183352943>
Category
Help needed
Product
Coder OSS (v2)
Platform
Linux
Logs
Please post any relevant logs/error messages.
hey @TitiMoby, this is probably due to the fact that code-server uses path-based reverse proxying whereas Coder is using wildcard, which means that your app is probably looking at content placed at
/<content>
rather than at /<proxy subpath>/<content>
That’s what I’m looking for. But I saw a lot of routes properly served.
And I don’t blame coder itself, there is some magic in Gradio to serve a front end from backend code.
I am currently experimenting with streamlit to see if I have a better result.
The idea is to know what I can do in data science workshops
i'll try to reproduce it on my end in a moment
with apps like these there is usually a setting to either change the base path or make it dynamic
If you need I also implemented serving with uvicorn that allows more control
due to time constraint, we are going to use a trick from gradio which host temporary our app.
I'll get back but it will imply to understand how the internals of Gradio works which is...
/close
sounds good!
@Phorcys closed the thread.