dflow
dflow copied to clipboard
Ray Executor
建立起ray server之后,容器中的任务可以通过remote function或remote class交到ray server上运行 Ray server:https://docs.ray.io/en/latest/serve/index.html Remote function:https://docs.ray.io/en/latest/ray-core/tasks.html
- 业务OP需要用到的python packages需要包含在业务镜像中,可以考虑自动检测环境依赖,并在ray中设置把环境依赖打包传输到远端服务器,参考https://docs.ray.io/en/latest/ray-core/handling-dependencies.html
- 业务镜像不需要包含ray的package,可以通过init container的方式把ray package注入到main container
Ray is a pure-Python distributed compute framework. After a ray cluster set up, dflow steps or tasks can be assigned to run on the ray cluster as remote functions or remote classes via an executor. Suggestions:
- Python packages required by the user's OP should be included in the user's image, ray client runs in the user's container. Consider detecting dependencies automatically and specifying runtime environment while submission.
- Ray's package need not to be contained in the user's image. Instead, it can be injected to user's container via an init container.