Django app that manages the creation of, and proxies requests to, Docker containers
Project description
django_docker_engine
This Django app manages and proxies requests to Docker containers. The primary goal has been to provide a visualization framework for the Refinery Project, but nothing should prevent its use in other contexts, as well.
In order for a Docker container to work with this package it must at a minimum:
- listen on some port for HTTP connections, and
- accept a single JSON file as input.
Quick Demo
Install Docker if you haven't already, then download the project, install dependencies, and run the demo server:
$ git clone https://github.com/refinery-platform/django_docker_engine.git
$ cd django_docker_engine
$ pip install -r requirements-dev.txt
$ pip install -r requirements.txt
$ ./manage.py runserver
Visit the demo server: From there you can pick a visualization tool and a data file to launch a container, see the requests made against each container, and kill the containers you've launched.
Motivation
Visualization tools have been built with a range of languages and they may have numerous, and possibly conflicting, dependencies. For the Refinery Platform, a data management, analysis, and visualization system for bioinformatics and computational biology applications, we have tried to accommodate the widest range of tools by creating django_docker_engine
, a Python package, available on PyPI, which launches Docker containers, proxies requests from Django to the containers, and records each request.
For each tool the wrapping Docker container will parse the input data provided on launch and start listening for requests. Currently, wrappers are in use for pure JavaScript applications, and for client-server applications, such as HiGlass for exploring genomic contact matrices, and a Plotly Dash tool for gene expression data. The containers themselves may run on the same host as Django, or on separate instances.
In the Refinery Platform, interactive visualizations managed by django_docker_engine
complement workflows managed by Galaxy: Both tools lower barriers to entry and make it possible for end users to run sophisticated analyses on their own data. Refinery adds user management, access control, and provenance tracking facilities to make research more reproducible.
django_docker_engine
will be useful in any environment which needs to provide access to pre-existing or independently developed tools from within a Django application with responsibility for user authentication, access control, and data management.
More information
For the demo server, tools.py
defines the tools
which are available and specifies default inputs. Analogously,
the visualization-tools
repo
defines the tools which can be loaded into Refinery.
More information:
- for users of the library
- for developers of the library
- for developers of visualizations
- background reading
- API documentation
- BOSC 2018 poster
Release process
In your branch update VERSION.txt, using semantic versioning: When the PR is merged, the successful Travis build will push a new version to pypi.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file django_docker_engine-0.1.2.tar.gz
.
File metadata
- Download URL: django_docker_engine-0.1.2.tar.gz
- Upload date:
- Size: 12.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 054d540f5df86cdf47040a20f39724829c04c3fec091c941fb863267147e741d |
|
MD5 | 1db4f94f611a7bb3de34d059107e573e |
|
BLAKE2b-256 | abe1ee81c4df688d3ce5bc6339c681473ccc1fd745a5790d2170971b662bd851 |
File details
Details for the file django_docker_engine-0.1.2-py2.py3-none-any.whl
.
File metadata
- Download URL: django_docker_engine-0.1.2-py2.py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.19.1 setuptools/40.4.3 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e04699621afdd63ef844431c514fce26c40c7d7960b1da786f4fb5894b3db94 |
|
MD5 | 2b7b88ebcbdce275f79fec74f80211b6 |
|
BLAKE2b-256 | 416ba2144d6b5e0b2cf0ad54f6243781e7580b86041f6c8f42aef73b03667abf |