Configurable ip address (#1779)

* Configurable ip address

* Rename `ip_address` => `websocket_host`

---------

Co-authored-by: Brent Yi <yibrenth@gmail.com>
This commit is contained in:
Matthew TancikandBrent Yi authored and GitHub committed 2023-04-20 07:36:32 -07:00
1 parent 817e2caabf
commit 8d9c4005d4
2 files changed
+3 -1

No files matched your search

+2
View File
@@ -137,6 +137,8 @@ class ViewerConfig(PrintableConfig):
"""The websocket port to connect to. If None, find an available port."""
websocket_port_default: int = 7007
"""The default websocket port to connect to if websocket_port is not specified"""
websocket_host: str = "0.0.0.0"
"""The host address to bind the websocket server to."""
num_rays_per_chunk: int = 32768
"""number of rays per chunk to render with viewer"""
max_num_display_images: int = 512
+1 -1
View File
@@ -122,7 +122,7 @@ class ViewerState:
self.camera_message = None
self.viser_server = ViserServer(host="127.0.0.1", port=websocket_port)
self.viser_server = ViserServer(host=config.websocket_host, port=websocket_port)
self.viser_server.register_handler(TrainingStateMessage, self._handle_training_state_message)
self.viser_server.register_handler(SaveCheckpointMessage, self._handle_save_checkpoint)