arvados-cli 0.1.20140703223044 → 0.1.20140703225421
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/crunch-job +11 -13
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e80ce079a5507b67f6af1b109ff6811b6f8ffd7d
|
4
|
+
data.tar.gz: fa71de21a72f20d70c43882bc999430aa6752f51
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c48247950beae51d576a600882dc26f1bb038da95744bffdcb33bd43efb70e3d8dddb2a956a405d7be04676271d7cac9bd71cc4da3e259ae8eef29f7f0cf311
|
7
|
+
data.tar.gz: 058f683ae6106d13cff5f27418d95227f7fb33ebb5d322f4c95f33baf2b8cdee77879b6a14db68764af7c35edddef82144acf15ccc51fb9c683ce6d7d59052fb
|
data/bin/crunch-job
CHANGED
@@ -639,8 +639,7 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
|
|
639
639
|
my $build_script_to_send = "";
|
640
640
|
my $command =
|
641
641
|
"if [ -e $ENV{TASK_WORK} ]; then rm -rf $ENV{TASK_WORK}; fi; "
|
642
|
-
."mkdir -p $ENV{JOB_WORK} $ENV{CRUNCH_TMP} $ENV{TASK_WORK} $ENV{TASK_KEEPMOUNT}
|
643
|
-
."&& chmod og+wrx $ENV{TASK_WORK}"
|
642
|
+
."mkdir -p $ENV{JOB_WORK} $ENV{CRUNCH_TMP} $ENV{TASK_WORK} $ENV{TASK_KEEPMOUNT}"
|
644
643
|
."&& cd $ENV{CRUNCH_TMP} ";
|
645
644
|
if ($build_script)
|
646
645
|
{
|
@@ -652,41 +651,40 @@ for (my $todo_ptr = 0; $todo_ptr <= $#jobstep_todo; $todo_ptr ++)
|
|
652
651
|
if ($docker_hash)
|
653
652
|
{
|
654
653
|
$command .= "crunchstat -cgroup-root=/sys/fs/cgroup -cgroup-parent=docker -cgroup-cid=$ENV{TASK_WORK}/docker.cid -poll=10000 ";
|
655
|
-
$command .= "$docker_bin run
|
654
|
+
$command .= "$docker_bin run --rm=true --attach=stdout --attach=stderr --user=crunch --cidfile=$ENV{TASK_WORK}/docker.cid ";
|
656
655
|
# Dynamically configure the container to use the host system as its
|
657
656
|
# DNS server. Get the host's global addresses from the ip command,
|
658
657
|
# and turn them into docker --dns options using gawk.
|
659
658
|
$command .=
|
660
659
|
q{$(ip -o address show scope global |
|
661
660
|
gawk 'match($4, /^([0-9\.:]+)\//, x){print "--dns", x[1]}') };
|
662
|
-
$command .= "
|
663
|
-
$command .= "
|
664
|
-
$command .= "
|
665
|
-
$command .= "-e \QHOME=/tmp/crunch-job\E ";
|
661
|
+
$command .= "--volume=\Q$ENV{CRUNCH_SRC}:/tmp/crunch-src:ro\E ";
|
662
|
+
$command .= "--volume=\Q$ENV{TASK_KEEPMOUNT}:/keep:ro\E ";
|
663
|
+
$command .= "--env=\QHOME=/home/crunch\E ";
|
666
664
|
while (my ($env_key, $env_val) = each %ENV)
|
667
665
|
{
|
668
666
|
if ($env_key =~ /^(ARVADOS|JOB|TASK)_/) {
|
669
667
|
if ($env_key eq "TASK_WORK") {
|
670
|
-
$command .= "
|
668
|
+
$command .= "--env=\QTASK_WORK=/tmp/crunch-job\E ";
|
671
669
|
}
|
672
670
|
elsif ($env_key eq "TASK_KEEPMOUNT") {
|
673
|
-
$command .= "
|
671
|
+
$command .= "--env=\QTASK_KEEPMOUNT=/keep\E ";
|
674
672
|
}
|
675
673
|
elsif ($env_key eq "CRUNCH_SRC") {
|
676
|
-
$command .= "
|
674
|
+
$command .= "--env=\QCRUNCH_SRC=/tmp/crunch-src\E ";
|
677
675
|
}
|
678
676
|
else {
|
679
|
-
$command .= "
|
677
|
+
$command .= "--env=\Q$env_key=$env_val\E ";
|
680
678
|
}
|
681
679
|
}
|
682
680
|
}
|
683
681
|
$command .= "\Q$docker_hash\E ";
|
684
|
-
$command .= "stdbuf
|
682
|
+
$command .= "stdbuf --output=0 --error=0 ";
|
685
683
|
$command .= "/tmp/crunch-src/crunch_scripts/" . $Job->{"script"};
|
686
684
|
} else {
|
687
685
|
# Non-docker run
|
688
686
|
$command .= "crunchstat -cgroup-root=/sys/fs/cgroup -poll=10000 ";
|
689
|
-
$command .= "stdbuf
|
687
|
+
$command .= "stdbuf --output=0 --error=0 ";
|
690
688
|
$command .= "$ENV{CRUNCH_SRC}/crunch_scripts/" . $Job->{"script"};
|
691
689
|
}
|
692
690
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arvados-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.20140703225421
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arvados Authors
|
@@ -166,7 +166,7 @@ dependencies:
|
|
166
166
|
- - "<"
|
167
167
|
- !ruby/object:Gem::Version
|
168
168
|
version: 1.0.0
|
169
|
-
description: This is the Arvados SDK CLI gem, git revision
|
169
|
+
description: This is the Arvados SDK CLI gem, git revision b7de0ac72fe6e5270d58940f782e630789391f05
|
170
170
|
email: gem-dev@curoverse.com
|
171
171
|
executables:
|
172
172
|
- arv
|