Xingyao Wang 90d0a62469
(arch) Switch default runtime to EventStream Runtime (#3271)
* switch default to eventstream runtime

* remove pull docker from makefile

* fix unittest

* fix file store path

* try deprecate server runtime

* remove persist sandbox

* move file utils

* remove server runtime related workflow

* remove unused method

* attempt to remove the reliance on filestore for BE

* fix async for list file

* fix list_files to post

* fix list files

* add suffix to directory

* make sure list file returns abs path;
make sure other backend endpoints accpets abs path

* remove server runtime test workflow

* set git config in runtime
2024-08-08 10:11:49 +08:00

26 lines
528 B
Python

from .e2b.sandbox import E2BBox
from .sandbox import Sandbox
def get_runtime_cls(name: str):
# Local imports to avoid circular imports
if name == 'eventstream':
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',
]