Project

General

Profile

Actions

Task #4667

closed

Feature #4027: [Crunch] Accept SDK version as a runtime constraint. Install SDK into the docker container before running tasks.

Review 4027-crunch-sdk-install-wip

Added by Brett Smith over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Target version:

Description

Mostly, this implements the actual work part of #4027, where Crunch installs an SDK version specified by the job record, and uses it to run the Crunch script.

I tested this in a local Docker installation, using a Crunch script that reported its environment, and saved that as its output. In order to do that, I had to fix the Gitolite setup in our Docker setup to make repositories usable (making sure the API server is always SSH-able, and making a couple minor bugfixes to our Gitolite setup script).

The script reported results as expected running outside Docker, inside Docker with no SDK specified, and inside Docker with an SDK specified. That script:

#!/usr/bin/env python

import os
import subprocess

import arvados

from pprint import pprint

this_task = arvados.current_task()
out_coll = arvados.CollectionWriter()
with out_coll.open('environment.txt') as out_file:
    pprint(arvados.__file__, out_file)
    pprint(os.environ, out_file)
    if 'CRUNCH_INSTALL' in os.environ:
        pipe = subprocess.Popen(['ls', '-lR', os.environ['CRUNCH_INSTALL']],
                                stdout=subprocess.PIPE)
        for line in pipe.stdout:
            out_file.write(line)
        pipe.stdout.close()
this_task.set_output(out_coll.finish())

Please see the commit messages for additional information.

Actions #1

Updated by Brett Smith over 9 years ago

  • Description updated (diff)
Actions #2

Updated by Peter Amstutz over 9 years ago

  • Assigned To set to Peter Amstutz
Actions #3

Updated by Peter Amstutz over 9 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Peter Amstutz over 9 years ago

  • Assigned To changed from Peter Amstutz to Brett Smith
Actions #5

Updated by Brett Smith over 9 years ago

  • Assigned To changed from Brett Smith to Peter Amstutz
Actions #6

Updated by Peter Amstutz over 9 years ago

  • Assigned To changed from Peter Amstutz to Brett Smith
Actions #7

Updated by Brett Smith over 9 years ago

  • Assigned To changed from Brett Smith to Peter Amstutz
Actions #8

Updated by Peter Amstutz over 9 years ago

  • Assigned To changed from Peter Amstutz to Brett Smith
Actions #9

Updated by Brett Smith over 9 years ago

  • Assigned To changed from Brett Smith to Peter Amstutz
Actions #10

Updated by Brett Smith over 9 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100
  • Remaining (hours) changed from 2.0 to 0.0

Applied in changeset arvados|commit:d980949ac4c092a44f3b64fb7cbd4a27a49256fb.

Actions

Also available in: Atom PDF