ai2_kit.core.connector module#
- class ai2_kit.core.connector.LocalConnector[source]#
Bases:
BaseConnector
- class ai2_kit.core.connector.SshConfig(*, host: str, gateway: Optional[SshConfig] = None)[source]#
Bases:
BaseModel
- host: str#
- class ai2_kit.core.connector.SshConnector(connection: Connection)[source]#
Bases:
BaseConnector
- ai2_kit.core.connector.get_ln_cmd(from_path: str, to_path: str)[source]#
The reason to rm -d to_path is to workaround the limit of ln. ln command cannot override existed directory, so we need to ensure to_path is not existed. Here we use -d option instead of -rf to avoid remove directory with content. The error of rm -d is suppressed as it will fail when to_path is file. -T option of ln is used to avoid some unexpected result.