Running wandb server behind a jupyterhub proxy

i’m trying to proxy the wandb “local” server that runs under docker behind jupyterhub. (Playing with an on-prem install to do labs in the new full stack-dl course). Jupyterhub has a proxy server which lets one obtain an app at an arbitrary port show up at a given url. The wandb server wants a particular url, but to be behind jupyterhub i need the base url for the wandb server to be something like http://hostname/hub/user-redirect/proxy/8080. Is it possible to set a base url as an option in the docker container/arguments to the local web server in the container there?

Hi Rahul!

You can set a port on wandb local as wandb local start --port PORT in order to set a port for your local instance. Does that fulfill your usecase?

Thanks,
Ramit

Hi Rahul,

We wanted to follow up with you regarding your support request as we have not heard back from you. Please let us know if we can be of further assistance or if your issue has been resolved.

Best,
Weights & Biases

Hi Rahul, since we have not heard back from you we are going to close this request. If you would like to re-open the conversation, please let us know!

I actually do this…the problem is not in the port. I can even get to the port but the html wont form. This is because the wandb server hardcodes (i think) the URLS in the docker server. So I was wondering if there was a variable such as baseurl that i can supply to the container (possibly rebuilding it) which will let me provide a prefix-url to the wandb server. Now whatever leading string the jupyterhub proxy provides in the URL can be incorporated

Hi Ramit,

Any thoughts? Where I am trying to get this to work (a healthcare company) has strict data egress restrictions, and proxying through jupyterhub rather than exposing the port is what we need. Basically i need a way to change the base URL on the wandb server of this is at all possible…

Not sure exactly what your issue is, but I had a similar issue when I was testing out self-hosting. I was using a SOCKS proxy and while I could connect to the server I couldn’t login as I kept getting stuck in a retry loop. What did work for me was using SSH port forwarding, but I ended up not self hosting in the end, so I never found a proper solution.

Its worse for me, the CSS and JS wont load. The wandb server is expecting a particular URL, but because jupyter-server-proxy adds a https://jupyterhubhost/user/proxy/PORTNUM/ to the beginning of the URLS, and wandb server expects an absolute url (i think) nothing is properly visible…

Hey @rahuldave,

Apologies about the delay here, you would want to start your server like this in that case:

wandb server start --env HOST=<HOST>:<PORT>

Thanks,
Ramit

Not sure I made my use case clear: i am not trying to start wandb server at a particular port. That proxying is taken care of by jupyterhub. What i am trying to do iis to have the base URL of the server something like: “https://jupyterhubhost/user/proxy/PORTNUM/” because thats what jupyter gives me. The internal linlks in wandb server are expecting the top level to be “/js” or “/css” for example, but i am stuck with the base url of the form “/user/proxy/PORTNUM/” so that the css url for example is “/user/proxy/PORTNUM/css”

Hey Rahul,

The HOST I specified on the previous comment is the base URL for the server. Is there any errors/odd behaviour you see in particular when running this command? It would be great if you could share a few screenshots / a screen recording so that we can understand what’s happening on your machine.

Thanks,
Ramit

Hi Rahul,

We wanted to follow up with you regarding your support request as we have not heard back from you. Please let us know if we can be of further assistance or if your issue has been resolved.

Best,
Weights & Biases