Replies: 2 comments 2 replies
-
Sounds good. All agreed on volumes, this is exactly as I remember we discussed it on the farm. For backends, let's recap then:
I'm a little unsettled about what the most intuitive fallback-to-native-if-image-is-not-set behaviour should be, but let's go with a warning for now and see how it feels. Which reminds me: we could also contemplate a cab definition that consists of a Python file and a function name. |
Beta Was this translation helpful? Give feedback.
-
I've had a happy thought. My current recipe is full of custom cab definitions as per the below. It occurs to me that, in container mode, all of these (and many more) could be served by a single Stimela image containing KERN-7 plus the standard software packages. Same image, just different On top of that, we'll have the cabs:
stack_freq_cube:
command: fitstool.py
inputs:
images:
dtype: List[File]
required: true
policies:
positional: true
repeat: repeat
outputs:
cube:
dtype: File
policies:
positional: true
format: '--stack={0}:FREQ'
pybdsm:
command: ./run_pybdsm.py
parameter_passing: yaml
inputs:
image:
dtype: File
outputs:
gaul:
dtype: File
tigger_convert:
command: tigger-convert
inputs:
src:
dtype: File
required: true
policies:
positional: true
force:
dtype: bool
default: true
outputs:
dest:
dtype: File
policies:
positional: true
crystalball:
command: crystalball
policies:
prefix: '--'
replace: {'_': '-'}
inputs:
ms:
dtype: MS
writable: true
required: true
policies:
positional: true
output_column:
dtype: str
required: true
sky_model:
dtype: File
required: true
within:
dtype: File
num_sources:
dtype: int
breizorro:
command: breizorro
policies:
replace: {'_': '-'}
inputs:
restored_image:
dtype: File
required: true
threshold:
dtype: float
default: 6.5
outputs:
mask:
dtype: File
nom_de_guerre: outfile
required: true |
Beta Was this translation helpful? Give feedback.
-
Backends
I think how a Cab is executed should be specified by
Step.backend
which is inherited from the parent if not specified. When running a Cab natively,backend
should be set tonative
For cabs that do not have an
image
set can check if thecommand
is natively available, raise a warning (" Container image not set, will attempt to run foo-bar natively") and attempt execution.Volumes
When running a container backend, we mount all
recipe.dirs
as well go throughFile
,Directory
andMS
types instep.inputs
andstep.outputs
and mount directories not inrecipe.dirs
. Inputs not designated aswritable
should be mounted as read-only unless a directory hosts multiple files that are bothwritable
and read-only.@o-smirnov thoughts?
Beta Was this translation helpful? Give feedback.
All reactions