From 9e085da6b33221a64f8fee2c53b037d1c656d407 Mon Sep 17 00:00:00 2001 From: David Matsalla Date: Mon, 4 May 2026 22:18:30 -0700 Subject: [PATCH] Print out URLs for VS Code/Cursor auto detect port forwarding --- rapidfireai/cli.py | 7 ++++--- setup/start.sh | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/rapidfireai/cli.py b/rapidfireai/cli.py index 1dbb22e9..3cae818c 100644 --- a/rapidfireai/cli.py +++ b/rapidfireai/cli.py @@ -464,6 +464,7 @@ def run_jupyter(): app = ServerApp() app.open_browser = False app.port = JupyterConfig.PORT + app.ip = JupyterConfig.HOST app.allow_origin = '*' app.websocket_ping_interval = 90000 app.log_level = 'CRITICAL' @@ -488,9 +489,9 @@ def run_jupyter(): mlflow_port = MLflowConfig.PORT if os.getenv("TERM_PROGRAM") == "vscode": - print(f"VSCode detected, port {app.port} should automatically be forwarded to localhost") - print(f"Manually forward port {dispatcher_port} to localhost, using the Ports tab in VSCode/Cursor/etc.") - print(f"Manually forward port {mlflow_port} to localhost, using the Ports tab in VSCode/Cursor/etc.") + print(f"VSCode detected, port {app.port} (tcp://{app.ip}:{app.port}) should automatically be forwarded to localhost") + print(f"Manually forward port {dispatcher_port} (tcp://{DispatcherConfig.HOST}:{dispatcher_port}) to localhost, using the Ports tab in VSCode/Cursor/etc.") + print(f"Manually forward port {mlflow_port} (tcp://{MLflowConfig.HOST}:{mlflow_port}) to localhost, using the Ports tab in VSCode/Cursor/etc.") else: os_username = os.getenv("USER", os.getenv("LOGNAME", "username")) print(f"Manually forward port {app.port} to localhost") diff --git a/setup/start.sh b/setup/start.sh index b7567fa1..7089ff55 100755 --- a/setup/start.sh +++ b/setup/start.sh @@ -347,7 +347,7 @@ wait_for_service() { local max_attempts=${4:-$RF_TIMEOUT_TIME} # Allow custom timeout, default 30 seconds local attempt=1 - print_status "Waiting for $service to be ready on $host:$port (timeout: ${max_attempts} attempts)..." + print_status "Waiting for $service to be ready on tcp://$host:$port (timeout: ${max_attempts} attempts)..." if command -v nc &> /dev/null; then ping_command="$(command -v nc) -z $host $port"