I'm building a dashboard in Holoviews and try to serve it with panel.serve() from Jupyter notebook. It is working fine on my local computer, but I need to share it with other computers in my corporate network so people can actually use it. I can't deploy it to Heroku or something like that due to privacy concerns. Here is the sample code:
import panel as pn
pn.extension()
dashboard_title = pn.panel('## Test Dashboard')
dashboard_footlote = pn.panel('Test Test Test')
dash = pn.Column(dashboard_title, dashboard_footlote)
dash.servable(title="Claims Dashboard")
pn.serve(dash)
When I run it in the Jupyter notebook it opens a new browser window and the dashboard in it. I tried accessing that same dashboard from the other computer by typing http://10.80.60.31:60840/ in the address bar. But that does not show anything. And in Jupyter cell I get the following error:
ERROR:bokeh.server.views.ws:Refusing websocket connection from Origin 'http://10.80.40.41:60840';
use --allow-websocket-origin=10.80.40.41:60840 or set BOKEH_ALLOW_WS_ORIGIN=10.80.40.41:60840 to permit this; currently we allow origins {'localhost:60840'}
I tried changing the last line in my code to the following:
pn.serve(dash, websocket_origin=['10.80.60.31:60840','localhost:60840'])
But then it does not work even locally because the port changes. It gives me an error:
ERROR:bokeh.server.views.ws:Refusing websocket connection from Origin 'http://localhost:58370';
use --allow-websocket-origin=localhost:58370 or set BOKEH_ALLOW_WS_ORIGIN=localhost:58370 to permit this; currently we allow origins {'localhost:60840', '10.80.60.31:60840'}
If I try to assign a specific port like this:
pn.serve(dash, port = 60840, websocket_origin=['10.80.60.31:60840','localhost:60840'])
It does not even start saying:
OSError: [WinError 10048] Only one usage of each socket address (protocol/network address/port) is normally permitted
The solution might be simple but I know very little about all network stuff and I don't even know what to google.
I'd appreciate it if you could guide me on how to make it work.