mirror of
https://github.com/All-Hands-AI/OpenHands.git
synced 2026-04-29 03:00:45 -04:00
32 lines
710 B
Python
32 lines
710 B
Python
from .docker.local_box import LocalBox
|
|
from .docker.ssh_box import DockerSSHBox
|
|
from .e2b.sandbox import E2BBox
|
|
from .sandbox import Sandbox
|
|
|
|
|
|
def get_runtime_cls(name: str):
|
|
# Local imports to avoid circular imports
|
|
if name == 'server':
|
|
from .server.runtime import ServerRuntime
|
|
|
|
return ServerRuntime
|
|
elif name == 'client':
|
|
from .client.runtime import EventStreamRuntime
|
|
|
|
return EventStreamRuntime
|
|
elif name == 'e2b':
|
|
from .e2b.runtime import E2BRuntime
|
|
|
|
return E2BRuntime
|
|
else:
|
|
raise ValueError(f'Runtime {name} not supported')
|
|
|
|
|
|
__all__ = [
|
|
'DockerSSHBox',
|
|
'E2BBox',
|
|
'LocalBox',
|
|
'Sandbox',
|
|
'get_runtime_cls',
|
|
]
|