Git Product home page Git Product logo

brat-docker's Introduction

NOTE

I am no longer doing anything with brat and am not maintaining this at all.

brat docker

This is a docker container deploying an instance of brat.

Installation

You will need two volumes to pass annotation data and user configuration to the container. Start by creating a named volume for each of them like this:

$ docker volume create --name brat-data
$ docker volume create --name brat-cfg

The brat-data volume should be linked to your annotation data, and the brat-cfg volume should contain a file called users.json. To add multiple users to the server use users.json to list your users and their passwords like so:

{
    "user1": "password",
    "user2": "password",
    ...
}

The data in these directories will persist even after stopping or removing the container. You can then start another brat container as above and you should see the same data. Note that if you are using docker < 1.9.0 named volumes are not available and you'll have to use a data-only container and --volumes-from instead.

You can also add data and edit the users from within the container. To add some data directly inside the container do something like:

$ docker run --name=brat-tmp -it -v brat-data:/bratdata cassj/brat /bin/bash
$ cd /bratdata
$ wget http://my.url/some-dataset.tgz
$ tar -xvzf some-dataset.tgz
$ exit  
$ docker rm brat-tmp

Or, if you have data on the host machine, you can check where docker is keeping the named volume with:

$ docker volume inspect brat-data 

and you can just copy the data into there from your host.

Running

To run the container you need to specify a username, password and email address for BRAT as environment variables when you start the container. This user will have editor permissions.

$ docker run --name=brat -d -p 80:80 -v brat-data:/bratdata -v brat-cfg:/bratcfg -e BRAT_USERNAME=brat -e BRAT_PASSWORD=brat -e [email protected] cassj/brat

brat-docker's People

Contributors

cassj avatar sheerun avatar savkov avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.