This repository is intended to completely replace the requester site web page of Mechanical Turk.
The user is able to manage projects, upload batches, create different templates for better reviewing the results and many more.
The instructions can be found in the Wiki of this repository.
The whole tool is built on top of Vue.js and the Django-Framework.
- Docker
- optional: Docker Compose
The frontend is needed to serve the UI of the MTurk Manager.
The frontend version has to match the backend version, otherwise unexpected behaviour may occur.
Execute docker run -d -p <port>:80 kritten/mturk-manager-frontend:1.5.2
This will pull the image from dockerhub and run the nginx server inside the container on the given port.
If you don't want to use docker, you have to manually serve the static files located in frontend/dist
on a webserver of your choice.
The backend server serves the MTurk Manager api which responses the requests coming from the frontend. The whole backend consists of a django server, a postgres database, a rabbitmq instanace and a celery worker.
- Copy the following content into a
docker-compose.yml
file and replace<port>
with an arbitrary port
version: '3.7'
services:
backend:
image: kritten/mturk-manager-backend:${VERSION_MTURK_MANAGER}
depends_on:
- db
- rabbitmq
ports:
- <port>:8000
environment:
- VERSION_MTURK_MANAGER=${VERSION_MTURK_MANAGER}
- URL_GLOBAL_DB=${URL_GLOBAL_DB}
- DATABASE_URL=${DATABASE_URL}
db:
image: postgres:10
volumes:
- type: bind
source: ${PATH_DATABASE_DATA}
target: /var/lib/postgresql/data/
ports:
- 5432:5432
environment:
- PATH_DATABASE_DATA=${PATH_DATABASE_DATA}
- POSTGRES_USER=${POSTGRES_USER}
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
- POSTGRES_DB=${POSTGRES_DB}
rabbitmq:
image: rabbitmq:3-management
ports:
- 5672:5672
celery:
image: kritten/mturk-manager-backend:${VERSION_MTURK_MANAGER}
command: /venv/bin/celery -A mturk_db worker -l info --concurrency=1
depends_on:
- rabbitmq
environment:
- C_FORCE_ROOT=true
- VERSION_MTURK_MANAGER=${VERSION_MTURK_MANAGER}
- URL_GLOBAL_DB=${URL_GLOBAL_DB}
- DATABASE_URL=${DATABASE_URL}
- Copy the following content in an
.env
file and fill the respective values
VERSION_MTURK_MANAGER=<version>
PATH_DATABASE_DATA=<absolute path>
DATABASE_URL=postgres://<postgres user>:<postgres password>@db:5432/<postgres database>
URL_GLOBAL_DB=<your domain (https!)>
POSTGRES_USER=<postgres user>
POSTGRES_PASSWORD=<postgres password>
POSTGRES_DB=<postgres database>
- Execute
docker-compose up -d
- Execute
./setup_db.sh
to pull changes from the repository and install missing dependencies. - Execute
cd mturk
- Execute
python3 manage.py migrate
Only Once:
- Execute
python3 manage.py set_tokens <instance token> <worker token>
. The tokens can be arbitrary and are used by the frontend and mturk workers to authenticate with the database - Execute
python3 manage.py set_mturk_account <name> <access key> <secret key>
. The name is arbitrary and the keys are your AWS security credentials.
- Run
cd mturk_db
- Run
python3 manage.py runserver 8001
to start the server (more on how to start a django server)
- Create and manage mechanical turk projects
- Define multiple worker templates per project
- Customize the layout of the worker results
- Extensive approve/reject facility
- Kristof Komlossy
- Martin Potthast
- Matthias Hagen
- Florian Kneist
Did you find a bug or do you have questions/requests?
Write me a mail: mturk@kritten.org