mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-01-10 15:28:14 -05:00
fix(docker-runtime): adjust default port ranges to avoid Windows ephemeral ports (#9924)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import os
|
||||
import platform
|
||||
import typing
|
||||
from functools import lru_cache
|
||||
from typing import Callable
|
||||
@@ -44,6 +45,12 @@ VSCODE_PORT_RANGE = (40000, 49999)
|
||||
APP_PORT_RANGE_1 = (50000, 54999)
|
||||
APP_PORT_RANGE_2 = (55000, 59999)
|
||||
|
||||
if os.name == 'nt' or platform.release().endswith('microsoft-standard-WSL2'):
|
||||
EXECUTION_SERVER_PORT_RANGE = (30000, 34999)
|
||||
VSCODE_PORT_RANGE = (35000, 39999)
|
||||
APP_PORT_RANGE_1 = (40000, 44999)
|
||||
APP_PORT_RANGE_2 = (45000, 49151)
|
||||
|
||||
|
||||
def _is_retryablewait_until_alive_error(exception: Exception) -> bool:
|
||||
if isinstance(exception, tenacity.RetryError):
|
||||
|
||||
Reference in New Issue
Block a user