Sign inSign up

baekchun/cadet_mturk

By baekchun

•Updated almost 9 years ago

Docker image to create HITs on Amazon MTurk via CADET

Image
2

327

baekchun/cadet_mturk repository overview

⁠Introduction

This image is used to create HITs on Amazon MTurk via CADET. It requires Store, Fetch, Search, Frontend and Ingest microservices from CADET(https://hub.docker.com/u/hltcoe/⁠) to start this container.

⁠How to use

Under /opt/config directory, there is a template for Amazon MTurk configuration file called 'mturk_config'. This configuration file is used to specify the user's AWS_KEY, AWS_SECRET, Cadet server's PORT, HOST and RESULTS_SERVER_PATH, HIT details such as TITLE, DESCRIPTION, PRICE and etc. Since only keys have been declared with empty values, these configurations must be entered unless they are specified as optional for the image to start a container.

⁠Create your own mturk_config file

As seen in the template below, the user must enter all the values for all sections specified as required.

# This section is required
[aws_cred]
AWS_KEY: this_is_your_key
AWS_SECRET: this_is_your_secret
USE_SANDBOX: True
SENT_FILE: filename_of_ingested_data

# This section is required
[cadet]
HOST: http://localhost
PORT: 8888
RESULTS_SERVER_PATH: /path/to/cadet/resultsserver
FETCH_SERVICE_HOST: http://localhost
FETCH_SERVICE_PORT: 9090

# This section is required
[email]
RECIPIENT: [[email protected], [email protected]]

# This section is optional
[whitelist]
QUALIFICATION_TYPE_ID: string
WORKER_ID: string
VALUE: int
SEND_NOTIFICATION: boolean

# This section is optional
[blacklist]
WORKER_ID: string
REASON: string

# This section is required
[HIT]
EXTERNAL_URL: URL_where_external_hit_questions_live 
NUM_HITS: number_of_hits
TITLE: title_of_HIT
DESCRIPTION: description_of_HIT
KEYWORDS: [keyword1, keyword2, ...]
PRICE: price_in_float
NUM_ASSIGNMENTS: number_of_assignments_per_HIT
DURATION: duration_of_hit_in_minutes
LIFETIME: lifetime_of_hit_in_hours
DELAY: approval_delay_of_hit_in_days

⁠Integrate this command in your Docker Compose

In your docker-compose.yml where you set this as your image, you must mount your own config file as a volume. eg) under your mturk.cmd,

 mturk.cmd:
    image: baekchun/cadetmturk_mturk.cmd
    command: python register.py
    volumes:
      - /path/from/host/:/opt/config/

By setting the path to your config file under volume, you will be overwriting the preexisting template in the image to set your own configurations as default.

⁠How to run this image under a docker-compose file

Assuming that your Fetch, Search, Frontend and Store servers are up, then you should run the following command: docker-compose run mturk.cmd

Tag summary

Content type

Image

Digest

Size

155 MB

Last updated

almost 9 years ago

docker pull baekchun/cadet_mturk