Closed jambonne closed 3 days ago
Adding to this; it seems like almost none of the google-cloud-pipeline-components
are usable with DockerRunner
. From what I can tell, its because the Dockerfile that makes the image used by all gcpc components here executes the aiplatform.remote_runner
with an ENTRYPOINT
command which can't be overridden by the command submitted by the Docker runner. This causes the command
submitted to the container (something like the below:
['python3', '-u', '-m', 'google_cloud_pipeline_components.container.v1.bigquery.query_job.launcher', '--type', 'BigqueryQueryJob', '--project', "{{$.inputs.parameters['project']}}", '--location', "{{$.inputs.parameters['location']}}", '--payload', '{"Concat": ["{", "\\"configuration\\": {", "\\"query\\": ", "{{$.inputs.parameters[\'job_configuration_query\']}}", ", \\"labels\\": ", "{{$.inputs.parameters[\'labels\']}}", "}", "}"]}', '--job_configuration_query_override', '{"Concat": ["{", "\\"query\\": \\"", "{{$.inputs.parameters[\'query\']}}", "\\"", ", \\"query_parameters\\": ", "{{$.inputs.parameters[\'query_parameters\']}}", ", \\"destination_encryption_configuration\\": {", "\\"kmsKeyName\\": \\"", "{{$.inputs.parameters[\'encryption_spec_key_name\']}}", "\\"}", "}"]}', '--gcp_resources', "{{$.outputs.parameters['gcp_resources'].output_file}}", '--executor_input', '{{$}}']
to be submitted as args to the ENTRYPOINT
script instead of a command. This results in problems with the argparser and renders a user unable to run anything from GCPC with the Docker runner.
I was able to fix this on my machine with a with a pretty minor modification. Modify the docker run command here from the original:
container = client.containers.run(
image=image,
command=command,
detach=True,
stdout=True,
stderr=True,
volumes=volumes,
)
to:
container = client.containers.run(
image=image,
entrypoint=[],
command=command,
detach=True,
stdout=True,
stderr=True,
volumes=volumes,
)
While small, I can imagine this is a bigger change than is desirable. Would it be possible to add an additional runner class for running GCPC components locally?
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
This issue has been automatically closed because it has not had recent activity. Please comment "/reopen" to reopen it.
Environment
kfp 2.7.0 kfp-dsl 2.1.2 kfp-pipeline-spec 0.3.0 kfp-server-api 2.0.5
Steps to reproduce
Throws the following error:
Expected result
Materials and Reference
The expected result above was achieved by switching out the docker image used by the
google-cloud-pipeline-components
components by default. The error looks like the entrypoint isn't being overridden as intended.google_cloud_pipeline_components/container/v1/aiplatform/remote_runner.py
is used as the executed file instead ofgoogle_cloud_pipeline_components.container.v1.bigquery.query_job.launcher
Impacted by this bug? Give it a 👍.