Skip to content

Niceties to run tasks on docker containers, often wrapped by celery @task decorator.

Notifications You must be signed in to change notification settings

ouinformatics/dockertask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 

Repository files navigation

dockertask

Low level functions to build tasks that run on docker containers over SSH.

Environment Variables

Setting the following variables can make calls to dockertask.docker_task() simpler but is not required.

export docker_worker="some.hostname.com"
export docker_name="mgmic/qiime"
export docker_username="celeryworker"

Using with Celery

from celery.task import task
import dockertask

@task
def mytask(args):
    return dockertask.docker_task(docker_worker="some.host.com",
            docker_name="hubuser/dockername:tag",
            docker_opts="-v /data:/data",
            docker_command="somescript %s" % args, id=str(mytask.request.id))

About

Niceties to run tasks on docker containers, often wrapped by celery @task decorator.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages