99from contextlib import redirect_stderr
1010from io import StringIO
1111from tabulate import tabulate
12+ from warnings import warn
1213
1314from cpac .helpers import cpac_read_crash , get_extra_arg_value
1415from cpac .utils import Locals_to_bind , PermissionMode
@@ -83,6 +84,7 @@ def _bind_volume(self, local, remote, mode):
8384 self .volumes [local ] = [b ]
8485
8586 def _collect_config_binding (self , config , config_key ):
87+ config_binding = None
8688 if isinstance (config , str ):
8789 if os .path .exists (config ):
8890 path = os .path .dirname (config )
@@ -93,7 +95,21 @@ def _collect_config_binding(self, config, config_key):
9395 f'yaml.dump(Configuration({ config } ).dict())"'
9496 )
9597 config = yaml .safe_load (config )
96- return config .get ('pipeline_setup' , {}).get (config_key , {}).get ('path' )
98+ pipeline_setup = config .get ('pipeline_setup' , {})
99+ minimal = pipeline_setup .get ('FROM' , False )
100+ if isinstance (pipeline_setup , dict ):
101+ config_binding = pipeline_setup .get (config_key , {}).get ('path' )
102+ else :
103+ minimal = True
104+ if minimal :
105+ warn (
106+ 'This run is using a minimal pipeline configuration. If this '
107+ 'configuration imports a configuration that requires paths to '
108+ 'be bound from your real environment to your container, you '
109+ 'need to bind those paths manually with the `-B` flag.' ,
110+ UserWarning
111+ )
112+ return config_binding
97113
98114 def collect_config_bindings (self , config , ** kwargs ):
99115 kwargs ['output_dir' ] = kwargs .get (
0 commit comments