nemo_deploy.ray_utils
#
Module Contents#
Functions#
Check if a given port is already in use. |
|
Find the next available port starting from a given port number. |
API#
- nemo_deploy.ray_utils.is_port_in_use(port: int, host: str = '0.0.0.0') bool #
Check if a given port is already in use.
- Parameters:
port (int) – The port number to check.
- Returns:
True if the port is in use, False otherwise.
- Return type:
bool
- nemo_deploy.ray_utils.find_available_port(start_port: int, host: str = '0.0.0.0') int #
Find the next available port starting from a given port number.
- Parameters:
start_port (int) – The port number to start checking from.
- Returns:
The first available port number found.
- Return type:
int