Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Docker Setup for the Annotation Tool #444

Merged
merged 1 commit into from
Sep 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 30 additions & 0 deletions annotation_tool/README.md
Original file line number Diff line number Diff line change
@@ -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`.
41 changes: 41 additions & 0 deletions annotation_tool/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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