[ARVADOS] updated: d2e7e88cd08179d1f60236a2f9eb860c81af14cb
git at public.curoverse.com
git at public.curoverse.com
Tue Apr 15 16:14:45 EDT 2014
Summary of changes:
sdk/cli/bin/crunch-job | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 deletions(-)
via d2e7e88cd08179d1f60236a2f9eb860c81af14cb (commit)
from 7847d584aadee5b5b91381b457ecddbd71a6d7a0 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit d2e7e88cd08179d1f60236a2f9eb860c81af14cb
Author: Brett Smith <brett at curoverse.com>
Date: Tue Apr 15 16:15:01 2014 -0400
crunch-job: Support runtime Docker image.
This code isn't tested, and even the general approach is a little
rougher than I'd like. But the best way to get it tested is to get it
on the staging server, so I'm pushing for review.
diff --git a/sdk/cli/bin/crunch-job b/sdk/cli/bin/crunch-job
index 2f7376f..284a916 100755
--- a/sdk/cli/bin/crunch-job
+++ b/sdk/cli/bin/crunch-job
@@ -605,8 +605,22 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
$command .=
"&& perl -";
}
- $command .=
- "&& exec arv-mount $ENV{TASK_KEEPMOUNT} --exec $ENV{CRUNCH_SRC}/crunch_scripts/" . $Job->{"script"};
+ $command .= "&& exec arv-mount $ENV{TASK_KEEPMOUNT} --exec ";
+ my $docker_image = $Job->{runtime_constraints}->{docker_image};
+ if (defined($docker_image))
+ {
+ $command .= "docker run -i -a stdin -a stdout -a stderr ";
+ foreach my $env_key (qw(CRUNCH_SRC CRUNCH_TMP TASK_KEEPMOUNT))
+ {
+ $command .= "-v \Q$ENV{$env_key}:$ENV{$env_key}:rw\E ";
+ }
+ while (my ($env_key, $env_val) = each %ENV)
+ {
+ $command .= "-e \Q$env_key=$env_val\E ";
+ }
+ $command .= "$docker_image ";
+ }
+ $command .= "$ENV{CRUNCH_SRC}/crunch_scripts/" . $Job->{"script"};
my @execargs = ('bash', '-c', $command);
srun (\@srunargs, \@execargs, undef, $build_script_to_send);
exit (111);
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list