pyflyte build: better container specification, build, and push UX #3397
Replies: 3 comments 1 reply
-
At my previous company we built a hydra launcher plugin that allowed us to build images and execute Flyte workflows with one command. Back then, I gave a talk about this at the community sync: See here for how the launcher is used and here how the images are built. When we built this, we didn't use fast registration yet (which alleviates the need for something like this quite a bit) but we definitely felt that this was a missing feature when first starting out with Flyte. In my current team, we build images in CICD exclusively. Providing a way to pass a path to a Dockerfile in the task decorator and have it built automatically sounds great to me. Had this existed, we wouldn't have built the hydra launcher I mentioned above.
Does this mean creating a new "interface/abstraction" around Dockerfiles, e.g. in Python, and then generating a Dockerfile on the fly? On the other hand, ZenML for instance has such a feature where one can pass pip requirements or even clone the current environment by running pip-freeze behind the scenes and then using the package list to build an image.
I would say yes. The user could choose with |
Beta Was this translation helpful? Give feedback.
-
We should consider supporting packaging and registering workflows inside a docker image that contains the dependencies of the flyte project. The motivation behind this is that there are some cases when the build environment python version is different from the docker python version, which causes issues around python version dependencies @pingsutw @wild-endeavor @eapolinario |
Beta Was this translation helpful? Give feedback.
-
2023-11-09 Contributor's meetup notes: the team agrees to close this entry as this is already implemented by ImageSpec. A related Docker plugin is being developed here |
Beta Was this translation helpful? Give feedback.
-
Objective
Flytekit today is completely unopinionated about how a user builds their container images. Even though this is amazing for large companies, for independent developers this might be cumbersome and hard. A solution is to keep the existing functionality but add additional way of automatically deducing the images and building them. This has the following advantages:
The proposed solution is to create custom image specs that result in a buildable docker specification. In case of using docker build, it could result in a dockerfile, in envd could result in build.envd file etc.
Task Update
ImageSpec
pyflyte build
pyflyte register / package will do the following things:
pyflyte run
the following happen:--fast
is specified. how is this backwards compatible?Appendix
envD [link]
envD makes it simple to manage environments locally or on kubernetes. This is particularly useful if using gpus. It also eliminates the need to write the docker file, but ends up building the container images using a simplified spec. We should see if we can incorporate the image spec in ours directly.
Beta Was this translation helpful? Give feedback.
All reactions