Registry /
gcp / google-cloud-pipeline-components
Install & Compatibility
Where this runs
tested against v2.22.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 315.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 20.4s · import 0.000s · 313MB
327MB installed
● package 327MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
sys
✓ from google_cloud_pipeline_components import sys
✗ from google_cloud_pipeline_components import aiplatform
version
✓ from google_cloud_pipeline_components import version
✗ from google_cloud_pipeline_components import aiplatform
warnings
✓ from google_cloud_pipeline_components import warnings
✗ from google_cloud_pipeline_components import aiplatform
This quickstart defines a simple KFP pipeline using a `CustomJobOp` from `google-cloud-pipeline-components`. This component allows you to run arbitrary containerized code on Vertex AI. Remember to replace placeholder `GCP_PROJECT_ID` and `GCP_REGION` with your actual Google Cloud project and desired region, ideally using environment variables or a configuration.
import kfp
from kfp import dsl
import os
# Import a Google Cloud Pipeline Component (GCPC)
from google_cloud_pipeline_components.v1.custom_job import CustomJobOp
@dsl.pipeline(name='gcp-quickstart-pipeline', description='A simple pipeline using GCPC')
def my_gcp_pipeline():
# Define a CustomJobOp from google-cloud-pipeline-components
# This component launches a custom container on Vertex AI
custom_task = CustomJobOp(
project=os.environ.get('GCP_PROJECT_ID', 'your-gcp-project-id'),
location=os.environ.get('GCP_REGION', 'us-central1'),
display_name='my-first-gcp-custom-job',
container_uri='gcr.io/cloud-aiplatform/training/tf-gpu.2-8:latest',
command=['sh', '-c', 'echo "Hello from GCPC!"'],
replica_count=1,
machine_type='n1-standard-4'
)
# To run this pipeline, you would typically compile it:
# kfp.compiler.Compiler().compile(my_gcp_pipeline, 'pipeline.json')
# And then upload and run it on Vertex AI Pipelines.
Debug
Known issues
breakingThis library is designed for Kubeflow Pipelines (KFP) v2 syntax. If migrating from KFP v1, component definition and pipeline construction syntax will be significantly different. KFP v1's `kfp.components.load_component_from_url` or direct YAML loading is generally incompatible with GCPC's object-oriented component instantiation.fixRewrite pipelines using KFP v2 DSL and directly instantiate `google-cloud-pipeline-components` classes. Consult KFP v2 and GCPC documentation for current syntax.
affects: KFP v1 to KFP v2 migrations
gotchaProper Google Cloud IAM permissions are critical. The service account used to run the pipeline on Vertex AI (or your user credentials for local development) must have sufficient roles, such as 'Vertex AI User', 'Storage Admin' (for artifact storage), and specific permissions for any underlying GCP services your components interact with (e.g., BigQuery User, Dataflow Admin).fixEnsure the service account running your Vertex AI Pipeline has all necessary IAM roles. Test permissions thoroughly in a development environment before deploying to production. Consult the Google Cloud documentation for required roles for each specific GCPC component.
affects: All versions
gotchaMost Vertex AI services are regional. Ensure that the `project` and `location` parameters passed to GCPC components (e.g., `CustomJobOp`, `BatchPredictionJobOp`) are consistent with the region where your resources exist or where you intend to run the job. Mismatched regions can lead to resource not found errors or increased latency.fixAlways explicitly specify the `location` parameter for regional GCPC components and verify it matches your target Google Cloud region.
affects: All versions
Upgrade
Version history
2.22.0latest on PyPI · released Nov 10, 2025
Audit
Dependencies
kfprequiredThis library provides components for Kubeflow Pipelines (KFP) and requires `kfp` to define and compile pipelines.