2 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/1d6e0f352bfe/ Changeset: 1d6e0f352bfe User: jmchilton Date: 2014-07-01 14:07:09 Summary: Bugfix: Value error when specifying empty docker_volume param. Thanks Andrew Stewart! Affected #: 1 file diff -r 2e1de0fc5a3cacf0e7caf64963145fc59b239c7e -r 1d6e0f352bfe1db4b1e23ade889d72473054c73e lib/galaxy/tools/deps/containers.py --- a/lib/galaxy/tools/deps/containers.py +++ b/lib/galaxy/tools/deps/containers.py @@ -204,6 +204,9 @@ ) def __expand_str(self, value): + if not value: + return value + template = string.Template(value) variables = dict() https://bitbucket.org/galaxy/galaxy-central/commits/b38a6f5e042b/ Changeset: b38a6f5e042b User: jmchilton Date: 2014-07-01 14:07:09 Summary: Allow Docker destinations to use --volumes-from option. Enables certain kind of Docker-to-Docker job executions. Thanks to Andrew Stewart. Affected #: 3 files diff -r 1d6e0f352bfe1db4b1e23ade889d72473054c73e -r b38a6f5e042bcad4beb40c3df51d4fe162258575 job_conf.xml.sample_advanced --- a/job_conf.xml.sample_advanced +++ b/job_conf.xml.sample_advanced @@ -154,6 +154,11 @@ are available to all jobs and $job_directory is also available for Pulsar jobs. --> + <!-- One can run docker using volumes-from tag by setting the following + parameter. For more information on volumes-from check out the following + docker tutorial. https://docs.docker.com/userguide/dockervolumes/ + --> + <!-- <param id="docker_volumes_from">parent_container_name</param> --><!-- Control memory allocatable by docker container with following option: --><!-- <param id="docker_memory">24G</param> --> diff -r 1d6e0f352bfe1db4b1e23ade889d72473054c73e -r b38a6f5e042bcad4beb40c3df51d4fe162258575 lib/galaxy/tools/deps/containers.py --- a/lib/galaxy/tools/deps/containers.py +++ b/lib/galaxy/tools/deps/containers.py @@ -190,10 +190,12 @@ volumes_raw = self.__expand_str(self.destination_info.get("docker_volumes", "$defaults")) # TODO: Remove redundant volumes... volumes = docker_util.DockerVolume.volumes_from_str(volumes_raw) + volumes_from = self.destination_info.get("docker_volumes_from", docker_util.DEFAULT_VOLUMES_FROM) return docker_util.build_docker_run_command( command, self.container_id, volumes=volumes, + volumes_from=volumes_from, env_directives=env_directives, working_directory=working_directory, docker_cmd=prop("cmd", docker_util.DEFAULT_DOCKER_COMMAND), diff -r 1d6e0f352bfe1db4b1e23ade889d72473054c73e -r b38a6f5e042bcad4beb40c3df51d4fe162258575 lib/galaxy/tools/deps/docker_util.py --- a/lib/galaxy/tools/deps/docker_util.py +++ b/lib/galaxy/tools/deps/docker_util.py @@ -7,6 +7,7 @@ DEFAULT_WORKING_DIRECTORY = None DEFAULT_NET = None DEFAULT_MEMORY = None +DEFAULT_VOLUMES_FROM = None class DockerVolume(object): @@ -55,6 +56,7 @@ tag=None, docker_cmd=DEFAULT_DOCKER_COMMAND, volumes=[], + volumes_from=DEFAULT_VOLUMES_FROM, memory=DEFAULT_MEMORY, env_directives=[], working_directory=DEFAULT_WORKING_DIRECTORY, @@ -75,6 +77,8 @@ command_parts.extend(["-e", env_directive]) for volume in volumes: command_parts.extend(["-v", str(volume)]) + if volumes_from: + command_parts.extend(["--volumes-from", str(volumes_from)]) if memory: command_parts.extend(["-m", memory]) if name: Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.