Skip to content
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

[Environment Variables for ContainerSpec] Possibility to add custom env variables to a container component #11268

Open
hahahannes opened this issue Oct 3, 2024 · 0 comments

Comments

@hahahannes
Copy link

hahahannes commented Oct 3, 2024

Feature Area

/area components

What feature would you like to see?

When using a ContainerSpec inside a pipeline, it would be useful to have the possibility to pass environment variables.
At the moment only command and args can be provided.

@dsl.container_component
def user_workload(foo: Input[Dataset]):
    return dsl.ContainerSpec(image='alpine', command=['sh', '-c', 'echo Hello, $0'], args=[foo.path])
@dsl.container_component
def user_workload(foo: Input[Dataset]):
    return dsl.ContainerSpec(image='alpine', env={"FOO": foo.path})

What is the use case or pain point?

I want to run a pipeline where a user can submit the container image that shall be run. I want to provide some configuration values to the container but don't need to know the command. I would rather tell the user to use these environment values so that I am independent of different commands.

Is there a workaround currently?

At the moment, I pass the command and my parameters as arguments.


Love this idea? Give it a 👍.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant