question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[feature] Allow users to skip `docker build` in `kfp components build`

See original GitHub issue

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:

  • Some organisations do not allow Docker to be installed on Data Scientists’ laptops (very common for enterprise users)
  • Some CI/CD platforms do not support docker-in-docker, and use other mechanisms (such as kaniko) for building container images

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:

  • Roll your own containerised components without the convenience of the kfp components build command
  • I suppose you could mock the docker library as is done in the tests? But this is quite hacky!

Love this idea? Give it a 👍.

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:14 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
browningjp-datatoniccommented, Oct 31, 2022

@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!

1reaction
connor-mccarthycommented, Oct 26, 2022

I think kfp components build --no-build-image . && gcloud builds submit ... is a good approach.

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: kfp components build --no-build-image . && gcloud builds submit --cloudbuild-project ... becomes kfp components build --no-build-image --cloudbuild-project ... .. The diff is gcloud builds submit. There is not much typing saved and it comes at the cost of (1) transparency about what is going on and (2) debuggability for the user via an added layer of indirection.

Thank you for bringing this up @browningjp-datatonic! I will review #8387.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[FR] Configurable Image in Component.yaml #5159 - GitHub
Would it be possible to make the image name configurable in component.yaml specification, so that the end user could override the image.
Read more >
Building Components | Kubeflow
A tutorial on how to create components and use them in a pipeline.
Read more >
kfp.dsl package — Kubeflow Pipelines documentation
Representing a future value that is passed between pipeline components. A PipelineParam object can be used as a pipeline function argument so that...
Read more >
Chapter 4. Kubeflow Pipelines - O'Reilly
An SDK for defining, building, and deploying pipelines in Python. Notebook support for using the ... Let's start by importing kfp and defining...
Read more >
Kubeflow Pipelines - Advanced Analytics Workspace
This Docker image is already built for us and stored in our container registry here: k8scc01covidacr.azurecr.io/kfp-components/average:v1 .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found