radical-collaboration / Glatard-Lab

0 stars 1 forks source link

ENTK: is there a way to specify task environment? #4

Closed ValHayot closed 4 years ago

ValHayot commented 4 years ago

Right now I'm setting my executable as /bin/bash and passing a bash script that activates my conda environment and executes my task as argument. I was wondering if there was a recommended way to specify the pipeline/task environment in ENTK.

andre-merzky commented 4 years ago

You may want to look at the pre_exec documentation at https://radicalentk.readthedocs.io/en/latest/api/app_create/task.html. Basically, you can set pre_exec to:

td.pre_exec = ['export FOO=BAR',
               'conda activate buz']

Is that what you are looking for?

ValHayot commented 4 years ago

Yep, thanks! I thought I looked through the doc, but clearly not carefully enough!