Add Docker setup for the annotation tool (#444)

This commit is contained in:
Tanay Soni 2020-09-29 14:09:45 +02:00 committed by GitHub
parent 93fd4aa72f
commit 52000ff678
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 72 additions and 1 deletions

View File

@ -264,7 +264,7 @@ You will find the Swagger API documentation at http://127.0.0.1:8000/docs
6. Labeling Tool
---------------------
* Use the `hosted version <https://annotate.deepset.ai/login>`_ (Beta) or deploy it yourself via Docker images (coming soon)
* Use the `hosted version <https://annotate.deepset.ai/login>`_ (Beta) or deploy it yourself with the `Docker Images <https://github.com/deepset-ai/haystack/blob/master/annotation_tool>`_.
* Create labels with different techniques: Come up with questions (+ answers) while reading passages (SQuAD style) or have a set of predefined questions and look for answers in the document (~ Natural Questions).
* Structure your work via organizations, projects, users
* Upload your documents or import labels from an existing SQuAD-style dataset

30
annotation_tool/README.md Normal file
View File

@ -0,0 +1,30 @@
# Haystack Annotation Tool
This document describes setting up the Haystack Annotation Tool with the publicly available Docker Images. Alternatively,
a hosted version of the tool is available at https://annotate.deepset.ai/login.
# Setup Annotation Tool with Docker
1. Configure credentials & database in the `docker-compose.yml` file:
The credentials should match in database image and application configuration.
DEFAULT_ADMIN_EMAIL: "example@example.com"
DEFAULT_ADMIN_PASSWORD: "DEMO-PASSWORD"
PROD_DB_NAME: "databasename"
PROD_DB_USERNAME: "somesafeuser"
PROD_DB_PASSWORD: "somesafepassword"
POSTGRES_USER: "somesafeuser"
POSTGRES_PASSWORD: "somesafepassword"
POSTGRES_DB: "databasename"
2. Run docker-compose by executing `docker-compose up`.
3. The UI should be available at `localhost:7001`.

View File

@ -0,0 +1,41 @@
version: "3"
services:
backend:
image: deepset/haystack-annotation:latest
container_name: haystack-annotation
environment:
DEFAULT_ADMIN_EMAIL: "example@example.com"
DEFAULT_ADMIN_PASSWORD: "DEMO_PASSWORD"
NODE_ENV: "production"
PROD_DB_HOSTNAME: "db"
PROD_DB_NAME: "databasename"
PROD_DB_USERNAME: "somesafeuser"
PROD_DB_PASSWORD: "somesafepassword"
ports:
- "7001:7001"
links:
- "db:database"
depends_on:
- db
networks:
- app-network
restart: unless-stopped
db:
image: "postgres:12"
container_name: "postgres"
environment:
POSTGRES_USER: "somesafeuser"
POSTGRES_PASSWORD: "somesafepassword"
POSTGRES_DB: "databasename"
ports:
- "5432:5432"
volumes:
- ./postgres-data:/var/lib/psql/data
networks:
- app-network
restart: unless-stopped
networks:
app-network:
driver: bridge