pipelines/sdk/python/test_data/components/component_with_pip_install....

50 lines
1.7 KiB
YAML

# PIPELINE DEFINITION
# Name: component-with-pip-install
components:
comp-component-with-pip-install:
executorLabel: exec-component-with-pip-install
deploymentSpec:
executors:
exec-component-with-pip-install:
container:
args:
- --executor_input
- '{{$}}'
- --function_to_execute
- component_with_pip_install
command:
- sh
- -c
- "\nif ! [ -x \"$(command -v pip)\" ]; then\n python3 -m ensurepip ||\
\ python3 -m ensurepip --user || apt-get install python3-pip\nfi\n\nPIP_DISABLE_PIP_VERSION_CHECK=1\
\ python3 -m pip install --quiet --no-warn-script-location --index-url\
\ https://pypi.org/simple --trusted-host https://pypi.org/simple 'yapf'\
\ 'kfp==2.0.1' && \"$0\" \"$@\"\n"
- sh
- -ec
- 'program_path=$(mktemp -d)
printf "%s" "$0" > "$program_path/ephemeral_component.py"
python3 -m kfp.dsl.executor_main --component_module_path "$program_path/ephemeral_component.py" "$@"
'
- "\nimport kfp\nfrom kfp import dsl\nfrom kfp.dsl import *\nfrom typing import\
\ *\n\ndef component_with_pip_install():\n import yapf\n print(dir(yapf))\n\
\n"
image: python:3.7
pipelineInfo:
name: component-with-pip-install
root:
dag:
tasks:
component-with-pip-install:
cachingOptions:
enableCache: true
componentRef:
name: comp-component-with-pip-install
taskInfo:
name: component-with-pip-install
schemaVersion: 2.1.0
sdkVersion: kfp-2.0.1