Skip to content

Commit

Permalink
Updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
apiad committed Dec 22, 2017
1 parent eec72a4 commit b14efa8
Showing 1 changed file with 6 additions and 51 deletions.
57 changes: 6 additions & 51 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,55 +1,10 @@
# brat docker
# brat docker para GIA

This is a docker container deploying an instance of [brat](http://brat.nlplab.org/).
Simplemente correr `docker-compose up` y luego abrir la [interfaz web](http://localhost:8080).

Abrir la carpeta `gia`, dentro están las diversas tareas:

### Installation
* `TASS18-objects-actions-functions`: es la tarea para enviar al TASS 2018.
El [primer documento](http://localhost:8080/#/gia/TASS18-object-action-function/doc001) de la tarea contiene las instrucciones para taggear.

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:

```bash
$ 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:

```javascript
{
"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:
``` bash
$ 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:

```bash
$ 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.
```bash
$ 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
```
Para poder editar en la esquina superior derecha hacer click en `Login` y usar `gia` como usuario **y** password.

0 comments on commit b14efa8

Please sign in to comment.