Integrating Tensorboard as iFrame behind Reverse Proxy

Dear Streamlit Community,

I would like to integrate a tensorboard website into my app, but face the challenge that the users on my website cannot connect. I’ll describe the workflow shortly

  1. User uploads a .zip file via Streamlit
  2. The .zip file is unzipped and a subprocess is started with tensorboard --logdir someDir --port 6005. The port may vary, as more than one tensorboard may be started at a time.
  3. Integration of the tensorboard as an iFrame
import streamlit.components.v1 as components
...
port: int = 6005
...
components.iframe(
    src=f"{BASE_URL}:{port}",
    height=800,
    scrolling=True,
)

On my local machine this works, because the BASE_URL of the tensorboard and the streamlit app are the same, but on my AWS setup, the resource is unreachable. The tensorboard is started, but due to the load balancer, I cannot reach the port this port.

The backend and frontend run on the same machine, so if I had a way for streamlit to act as a proxy to the tensorboard service sitting on localhost, that would already help. Any tips how I can solve this?

Best regards,
Chris