-
Notifications
You must be signed in to change notification settings - Fork 160
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add envd-server runtime proposal #303
Conversation
05f7d5d
to
989b9c0
Compare
} | ||
``` | ||
|
||
## Design Details |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will envd
play with charts
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean helm charts?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some users expect this, but I am not sure how to integrate it with charts.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall looks good to me. One thing I'm concerning is that whether syncing is needed at MVP. Code should be on a PV-like thing I think and usually people works with git. Might not need syncing when working on cluster.
The problem of syncing is about the dataset related stuffs. User may need fine-grained control of what to sync, which increases the complexity
Other options for file syncing: |
My 2 cents is syncing might be needed ultimately, but might in some different ways. Let's say we are working with git, and push some new commits to a branch, I think it would be better if envd could pull the new commits automatically to simulate the local development experience. |
Thanks for the advice! Automatic push/pull looks magic to me. And it is complex. If the container is crashed, we also may lost the commits if we do not run push. |
As discussed with some infra engineers interested in envd, port-forwarding may consume many API server CPUs. And tools like virtual kubelet does not support port forwarding. |
Would you mind elaborating? AFAIK if there is no much traffic, port-forwarding should not consume too much cpu resources, as it is simply a SPDY connection under the hood.
Indeed. But what are we going to do to access the services inside the container without port-forwarding? |
Or, we can forget the sync things. We request users to develop on the remote container, instead of the host. The build.envd may look like this: def build():
base(os="ubuntu20.04", language="python3")
install.vscode_extensions([
"ms-python.python",
])
#config.pip_index(url = "https://pypi.tuna.tsinghua.edu.cn/simple")
install.python_packages([
"tensorflow",
"numpy",
])
shell("zsh")
config.jupyter(password="", port=8888)
+ config.working_dir(local=".", remote="https://github.com/tensorchord/envd.git") envd mounts the local dir with docker runner and downloads the repo with Kubernetes runner. |
There should not be huge traffic by design. But algorithm engineers may use it to copy data:
|
They may use service and ingress to achieve this. Thus we may need a mechanism to support customization here. Maybe just like the design of the device plugin, we provide an interface to communicate between envd and a CLI shim. The shim does the critical logic like port forwarding. The envd just communicate with the shim and show information to users. Port forwarding can be used in our default shim, while users can write their own shim to customize, e.g. using service and ingress. |
Device plugin is a not-so-good comparison. Let's say kubectl plugin mechanism. The shim maintained by users can be integrated into the envd. |
My concern is that working dir seems to be a command line argument to me, otherwise it might prevent the reuse of
Got it 👌 If we need to transfer such huge file via port-forwarding without rate limiting, the functionality of apiserver might be affected.
I think it make sense 👍 |
Sounds reasonable. It should be a runtime argument instead of build time. @VoVAllen Do you have opinion on it? |
Agree it better to be a runtime option. If using git, user should handle the sync related thing by himself (clone git repo and git pull/push). Therefore |
This comment was marked as outdated.
This comment was marked as outdated.
Found one new syncing tool: |
How is it going now? |
Signed-off-by: Ce Gao <ce.gao@outlook.com>
Signed-off-by: Ce Gao <cegao@tensorchord.ai>
PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo cleanup
Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com>
Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com>
Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com>
Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com>
Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com>
Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com>
Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com>
Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com>
Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com>
Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com>
Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com>
Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com>
Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com>
@Xuanwo Thanks for your fix! |
Probably you should try Grammarly. There are still some syntax errors. |
|
||
#### Data and code integration | ||
|
||
`runtime.docker.mount` and other docker-specific funcs will be ignored in kubernetes context. `runtime.kubernetes.mount()` should create/use the corresponding PV/PVC in the backend pod. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shall we expose the backend implementation to the starlark frontend?
Do we need to rename the current Docker-specific implementations?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure about it. I opened an issue to keep track #530
Signed-off-by: Ce Gao <cegao@tensorchord.ai>
It should be fixed. PTAL. |
I am merging it since we are already starting the development of envd-server. |
* feat: Add proposal Signed-off-by: Ce Gao <cegao@tensorchord.ai> * WIP Signed-off-by: Ce Gao <cegao@tensorchord.ai> * feat: Update Signed-off-by: Ce Gao <cegao@tensorchord.ai> * fix: Update Signed-off-by: Ce Gao <cegao@tensorchord.ai> * fix: Update Signed-off-by: Ce Gao <ce.gao@outlook.com> * fix: Update Signed-off-by: Ce Gao <cegao@tensorchord.ai> * Update docs/proposals/20220603-kubernetes-vendor.md Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com> * Update docs/proposals/20220603-kubernetes-vendor.md Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com> * Update docs/proposals/20220603-kubernetes-vendor.md Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com> * Update docs/proposals/20220603-kubernetes-vendor.md Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com> * Update docs/proposals/20220603-kubernetes-vendor.md Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com> * Update docs/proposals/20220603-kubernetes-vendor.md Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com> * Update docs/proposals/20220603-kubernetes-vendor.md Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com> * Update docs/proposals/20220603-kubernetes-vendor.md Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com> * Update docs/proposals/20220603-kubernetes-vendor.md Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com> * Update docs/proposals/20220603-kubernetes-vendor.md Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com> * Update docs/proposals/20220603-kubernetes-vendor.md Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com> * Update docs/proposals/20220603-kubernetes-vendor.md Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com> * Update docs/proposals/20220603-kubernetes-vendor.md Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: Ce Gao <ce.gao@outlook.com> * chore: Fix formats Signed-off-by: Ce Gao <cegao@tensorchord.ai> Signed-off-by: Ce Gao <cegao@tensorchord.ai> Signed-off-by: Ce Gao <ce.gao@outlook.com> Co-authored-by: Xuanwo <github@xuanwo.io> Signed-off-by: luisyjliu <luisyjliu@tencent.com>
Ref #179
Proposal preview: https://github.com/gaocegege/envd/blob/proposal/docs/proposals/20220603-kubernetes-vendor.md