-
Notifications
You must be signed in to change notification settings - Fork 159
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: Better envdlib syntax support #1132
Comments
/cc @kemingy |
I'm wondering if the functions can return some kind of structure. But surely that will break the current process-oriented pattern.
To pass the information to users, I think we need to expose the Graph (or something equivalent). |
Generally, this means function can share information across different function. Solution 1:
Then user can directly call Solution 2:
|
I feel defining a global variable could be easier. cuda_version = "11.6.2"
def build():
install.cuda(cuda_version)
envdlib.tensorrt(cuda=cuda_version) We should document the Ref: https://github.com/bazelbuild/starlark/blob/master/spec.md |
@kemingy Arbitrary global variable doesn't seem good. At least a global dictionary needed I think. such as we have a global variable such as |
I mean users can define their own global variables to use. It seems users don't know what starlark can do. And how to combine starlark built-in features with envd functions. |
I think we'd better give a spec for envdlib's contributor such as:
But for normal users, we could just let them know they can treat starlark like python and builtin functions list. |
Description
When I am working on writing envdlib for supporting tensorRT, I found some points we need for better use of envdlib:
We still need to some work to implement composable image building. We still use the process-oriented pattern to acheive my goal. Maybe it is not a good idea in the future. https://nixos.org/ can give us some guides.
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: