gradio: Gradio static files do not follow the root_path behind a Jupyter proxy on k8s
Describe the bug
Hi everyone,
I am experiencing a problem when running Gradio 4.16.0 behind a Jupyter proxy on a k8s cluster specifying a root_path, static files do not follow this path and my browser console returns a 404 error.
Below is the code:
demo.launch(
server_port=5300,
root_path="/proxy/absolute/5300/",
share=True,
inline=False
)
The link is still accessible and the components can be viewed without style.
Thank you in advance, I remain at your disposal for any clarification.
Best regards, Louis
Have you searched existing issues? 🔎
- I have searched and found no existing issues
Reproduction
import gradio as gr
def greet(name):
return "Hello " + name + "!"
demo = gr.Interface(
fn=greet,
inputs="text",
outputs="text"
)
demo.launch(
server_port=5300,
root_path="/proxy/absolute/5300/",
share=True,
inline=False
)
Screenshot
No response
Logs
No response
System Info
gradio==4.16.0 on Python 3.9
Severity
Blocking usage of gradio
About this issue
- Original URL
- State: closed
- Created 5 months ago
- Comments: 18 (11 by maintainers)
Commits related to this issue
- Use new gradio 4.18+ for https://github.com/gradio-app/gradio/issues/7317 https://github.com/gradio-app/gradio/issues/7391 — committed to h2oai/h2ogpt by pseudotensor 5 months ago
@abidlabs Magnificent! That’s a job well done (and I can upgrade to latest Gradio soon). Below is the same app as screenshot like before (but working this time). Thank you very much!
@abidlabs - Any updates? Currently i need to stay on 4.16. The error came with 4.18.
Ok reopening this issue and looking into it!