Commit 96cfce3d authored by Tiago de Freitas Pereira's avatar Tiago de Freitas Pereira
Browse files

Merge pull request #15 from tiagofrepereira2012/master

Solved issue #14 and added the argument --environment
parents fc1077f6 dc736cdf
......@@ -139,6 +139,8 @@ def command_line_parser(description=__doc__, exclude_resources_from=[]):
help = "If given, missing files will not stop the processing; this is helpful if not all files of the database can be processed; missing scores will be NaN.")
flag_group.add_argument('-r', '--parallel', type=int,
help = 'This flag is a shortcut for running the commands on the local machine with the given amount of parallel threads; equivalent to --grid"local", number_of_parallel_threads=X) --run-local-scheduler --stop-on-failure.')
flag_group.add_argument('-t', '--environment', dest='env', nargs='*', default=[], help='Passes specific environment variables to the job.')
return {
'main' : parser,
......@@ -49,6 +49,8 @@ class GridSubmission:
if args.grid is not None:
assert isinstance(args.grid, grid.Grid)
self.env = args.env #Fetching the enviroment variable
# find, where jman is installed
jmans = bob.extension.find_executable('jman', prefixes = ['bin'])
......@@ -93,6 +95,9 @@ class GridSubmission:
# submit the job to the job manager
if not self.args.dry_run:
if(self.env is not None):
kwargs['env'] = self.env
job_id = self.job_manager.submit(
command_line = cmd,
name = name,
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment