Vitali
12/22/2023, 2:29 PMworking_dir
on task level? Per default its /root
, but in my container image this folder does not exist and would like to use another directory instead. I am aware that I could define it via CLI of the workflow, but I would rather have it set for this specific task/container in code.Ketan (kumare3)
Vitali
12/22/2023, 4:12 PM@task(working_dir="/home/user_a", container_image="a")
def do_a():
@task(working_dir="/home/user_b", container_image="a")
def do_b():
@workflow
def wf():
do_a()
do_b()
Ketan (kumare3)
Ketan (kumare3)
Vitali
12/22/2023, 4:17 PMVitali
12/22/2023, 4:17 PMKetan (kumare3)
Ketan (kumare3)
Ketan (kumare3)
Vitali
12/22/2023, 4:26 PM@task(container_working_dir="/home/a", container_image="a")
but also
@task(container_image=ImageSpec(working_dir="/home/a", base_image="a"))
I may miss some understanding, but the downside of the CLI is:
• How do I set different working_dirs for task_a and task_b inside the same workflow?
• The working_dir depends on the "env" (local or docker image) you execute it and therefore should also be specified where your env is specified. Or people would need to also type in the working dir for every task on the CLI.Ketan (kumare3)
Ketan (kumare3)
@task(container_image=Container(image="....", working_dir="..."))
def foo():
...
As this is more extensible and it is obvious you are controlling working dirKetan (kumare3)
Ketan (kumare3)
Ketan (kumare3)
Vitali
12/23/2023, 11:39 AMKetan (kumare3)
Ketan (kumare3)
Ketan (kumare3)
Ketan (kumare3)
Vitali
12/24/2023, 7:45 AMKetan (kumare3)
Vitali
01/08/2024, 9:58 AMKetan (kumare3)
Ketan (kumare3)
Vitali
01/15/2024, 10:26 AMKetan (kumare3)
Ketan (kumare3)