Although the instructions in Haystack describe how to install the annotation tool locally using Docker, all attempts have failed. Unfortunately, the website does not contain any more details.
Has anyone been able to get this to work? If so, what am I missing?
Reproduction scenario:
git clone https://github.com/deepset-ai/haystack.git
cd haystack
python -m pip install -e '.[all-gpu]'
# I used the latest
version to develop a project and, now, I want to use the annotation
tool to create a custom dataset, thus the following checkout to an
older release.git checkout v1.26.x
docker-compose pull
Contents of yml file (see here):
version: "3"
services:
backend:
image: deepset/haystack-annotation:latest
environment:
NODE_ENV: "production"
DB_HOSTNAME: "db"
DB_NAME: "databasename"
DB_USERNAME: "somesafeuser"
DB_PASSWORD: "somesafepassword"
# IMPORTANT: please configure credentials with secure strings.
DEFAULT_ADMIN_EMAIL: "example@example.com"
DEFAULT_ADMIN_PASSWORD: "DEMO_PASSWORD"
COOKIE_KEYS: "somesafecookiekeys"
JWT_SECRET: "somesafesecret"
DOMAIN_WHITELIST: "*"
ports:
- "7001:7001"
links:
- "db:database"
depends_on:
- db
networks:
- app-network
restart: unless-stopped
db:
image: "postgres:12"
environment:
POSTGRES_USER: "somesafeuser"
POSTGRES_PASSWORD: "somesafepassword"
POSTGRES_DB: "databasename"
ports:
- "5432:5432"
volumes:
- ./postgres-data:/var/lib/postgresql/data
networks:
- app-network
healthcheck:
test: "pg_isready --username=somesafeuser --dbname=databasename && psql --username=somesafeuser --list"
timeout: 3s
retries: 5
restart: unless-stopped
networks:
app-network:
driver: bridge
docker-compose up
http://localhost:7001
Results (screenshots):
All credits to @Stefano Fiorucci - anakin87 for the solution to this problem.
The complete steps are:
git clone https://github.com/deepset-ai/haystack.git
cd ./haystack
python -m pip install -e '.[all]'
or '.[all-gpu]'
# Use the latest version to develop the project and checkout to the latest 1x release to use the annotation tool.git checkout v1.26.x
# Do NOT execute python -m pip install again.cd ./annotation_tool/
edit docker-compose.yml
# Configure the credentials and the database in ./haystack/annotation_tool/docker-compose.yml
(see OP link for the original version of the file). In this case I left everything as is, but uncommented lines 12 - 16.docker-compose pull
# execute this command inside the annotation_tool/
directory.docker-compose up
http://localhost:7001