labmlai/labml

Feature request: Allow setting listen address on command line & infer URL from request

adrien1018 opened this issue · 1 comments

Currently the app is fixed to listen on 0.0.0.0:5005. It would be great if the bind address & port can be set from command line (e.g. labml app-server --bind-address=127.0.0.1 --port=5678).

Also, the webpage will always try to fetch data from localhost:5005, making it inconvenient to connect to the server from a non-local machine. The host URL should be inferred from the request instead of being hardcoded.

vpj commented

Currently the UI code that ships with the pip package has the port number hardcoded when we compile.

We should be able to dynamically add the port/host to the to the HTML or we can use the same host/port for static files and api calls. @hnipun will look into this as soon as possible.