-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
[feature] Allow users to skip docker build
in kfp components build
#8382
Comments
The feature request makes sense to me. In terms of implementation, have you considered adding support for different engines? pipelines/sdk/python/kfp/deprecated/cli/components.py Lines 72 to 76 in 1f5d8ff
|
Hi Chen! Thanks for your quick response! I took a brief look at other container build engines. It looks like there is no official Python package for kaniko (although there is the unofficial PyKaniko). Cloud Build could be supported using the Cloud Build Python SDK, but there are a lot of potential build options to account for! There are also a number of other build engines that users might prefer for one reason or another e.g. buildah. I think an ideal solution would be to add support for more container build engines (tbd which ones we support in the SDK), and also to allow the user to skip the container build step and build the containers themselves (e.g. in a subsequent step of a CI/CD pipeline or bash script) What do you think? |
Makes sense to me. |
Agreed. Even with other build engine options, I think it makes sense to enable the "no engine" option also. |
Thanks both! In terms of next steps, I propose
Looking more at kaniko, I'm not sure how this would work as kaniko is designed to run in its own container. Cloud Build seems like a useful option to have, particularly for users who can't run container locally, so I'm happy to work on that. As I mentioned, there are a number of options that would need to be passed to Cloud Build e.g. project ID, region, staging bucket etc. How would you like these to be exposed to the user? My initial thought is to add additional command-line flags |
Thanks, @browningjp-datatonic!
We probably ought to use the same
I think adding engine-specific flags is a non-option, unfortunately, as parameterizing |
Yes, I will make sure they match
I am struggling a bit for good options tbh! These are the ones that come to mind:
What do you think? |
@browningjp-datatonic I don't have any other options in mind. Is cloudbuild the engine you are using? I'm curious if there are many user requests for this engine. If not, perhaps we don't need to rush to implement this engine. |
Yes, we would certainly use Cloud Build. All our customers are on Google Cloud anyway, and most of them are enterprise customers that can't use Docker locally. That said, it's very easy to just run I notice that in the master branch, the docstring for the |
I think We probably don't want to be in the business of maintaining integrations with many different build providers and the KFP SDK provides only a very thin wrapper around the commands you shared. For example: Thank you for bringing this up @browningjp-datatonic! I will review #8387. |
BTW - what is the usual cadence for new releases for 1.8? We have a current customer use case that this would be extremely useful for! |
@browningjp-datatonic, we don't have a scheduled cadence for 1.8 releases. We typically wait until features accumulate to minimize having an abundance of patch releases with only a few number of changes. Until the next release, you can pip install from GitHub HEAD. Does that unblock you for now? |
@connor-mccarthy no problem. The customer is not able to install Python packages from GitHub directly (everything goes through a private PyPi mirror), but we can make a start on development in a less restrictive environment. Thanks for all your help! |
…w users to skip docker build. Fixes kubeflow#8382 for 2.0 (kubeflow#8387) * feat: added --build-image/--no-build-image flags to skip docker build * fix: logic error for warnings/errors
Feature Area
/area sdk
What feature would you like to see?
Building containerised components using the Python DSL, and packaging them using
kfp components build
is a really nice user experience - you get the benefits of the Python DSL without some of the drawbacks of "lightweight" components (e.g. having to install dependencies at runtime).However, there are some scenarios where building container images using Docker is not an option, for example:
This feature would allow the user to skip the actual container image build, but still perform the other functions in
kfp components build
(generation of the different files). The user would then be responsible for building the container images using their preferred mechanism (e.g. Cloud Build, Kaniko)What is the use case or pain point?
Currently not all users are able to use the
kfp components build
command as they cannot run Docker (locally or in CI/CD)Is there a workaround currently?
Current workarounds:
kfp components build
commanddocker
library as is done in the tests? But this is quite hacky!Love this idea? Give it a 👍.
The text was updated successfully, but these errors were encountered: