-
Notifications
You must be signed in to change notification settings - Fork 157
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(lang): Support data and code integration in envd-server runner #530
Comments
Thanks for raising the discussions! There are some options for us:
def build()
config.model(location="xx", from="https://xx.savedmodel" |
Possible design:
runtime.kubernetes.mount("") |
Write a proposal this week |
Mount Code ProposalThere will be two ways to mount the code, directly clone git repo or use syncthing to sync folder insider container with user's local directory. Reference: Syncthing in Okteto Possible syntax design: # Can declare globally
info.git_repo = "https://github.com/tensorchord/envd"
def build():
...
def build_k8s():
# Default entrypoint of envd server + k8s, if not found, use build function instead
# Will create a PVC and clone the git repo into it
runtime.kubernetes.mount_mode("git_repo")
# Or
# Will use syncthing to sync the folder insider container and user's local folder
runtime.kubernetes.mount_mode("Syncthing")
...
Problem:
|
Thanks for the proposal Then do users need to write two build funcs for docker and k8s? And, how to deal with the data part? |
The original build func should work in most cases, but the pod on k8s may not be provisioned exactly as what user wants. Since |
How about use
|
It's viable. I think the core difference here is that |
For data, ideally, user needs to register the dataset detail at the envd-server at first. And declare |
The initial version we can start with |
I'm not sure why we need to declare a global For code sync, should we choose
This can save some boilerplate code. I'm wondering if we can hide the context keywords like The difference between contexts can be handled by some configurations. For example: if envd.context.type == "kubernetes":
envd.mount_host = pvc("user-data") So the user can run the code in different contexts. If we introduce |
I am not very sure the condition statement will be a good choice. We still should insist on statement over implementation. Or at least we'd better use a override class or something like polymorphism to solve the problem. |
I don't think separating the docker and k8s build is a good idea. let me try to explain myself from a user perspective. Assuming I was a researcher, I did not want to copy and edit my As we have The philosophy behind envd is that we encapsulate the complexity and make things easier. So personally, I would vote for a solution to simplify things, like:
for example: build():
runtime.code(src="", dst="") build():
runtime.code(src="[email protected]:envd.git", dst="/code",
k8s_volume="host_path",
docker_volume="cache") |
Make sense. It is promising. |
Any opinions about it? @VoVAllen |
We'd better provide a mount config base class to provide polymorphism config such as: # mount_config.py
class MyMount:
def kubernetes(self):
self.k8s.runtime.use("pvc")
code_src = self.code.src
...
def host(self) we could give a default logic about how to mount the code and the data. But it'd better be like a mount configuration class for differentcase. too much options in the function would cause difficulty to maintain. runtime.code(src="[email protected]:envd.git", dst="/code", configuration=MyMount) |
Thanks @aseaday and @zwpaper . My core consideration here is also to make build function unified for both k8s and docker. The key design here is to support ad hoc configuration on k8s. I think @aseaday 's suggestion of using separate configurations to declare the implementation is a good design. Starlark doesn't support class, but we can use dict here directly for simplicity. How about
|
After team discussion:
Related issue: #1054 |
Generally, I think PVC is a good abstraction fitting all data sources (nfs, oss, lustre, and so on) in enterprise-level usage. Therefore what we need to do here is just to decide what pvc to be mounted to the pod on k8s
|
What's the difference between |
@kemingy It's the same, I just randomly picked a name. |
Previous discussion: #650 |
Descrption
I study the design docment and #303. In a team work environment, there is no doubt that model, exp log and dataset would be allso a neccessary part in a work env setting up. There some tools and project aimmed to solve it such as DVC.
This issue is for discussion about:
Message from the maintainers:
Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.
The text was updated successfully, but these errors were encountered: