forked from cassj/brat-docker
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
6 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |