GithubHelp home page GithubHelp logo

cngthnh / mpt Goto Github PK

View Code? Open in Web Editor NEW

This project forked from d-lab/mephisto

0.0 0.0 0.0 44.95 MB

A suite of tools for managing crowdsourcing tasks from the inception through to data packaging for research use.

Home Page: https://mephisto.ai/

License: MIT License

Shell 0.56% JavaScript 45.51% Python 41.58% TypeScript 1.47% CSS 10.57% Makefile 0.02% HTML 0.21% Dockerfile 0.09% Procfile 0.01%

mpt's Introduction


Index

  1. Introduction
  2. Prerequisites
  3. Notes
  4. How to Start

Introduction ๐Ÿ“–

This README provides an overview of the deployment flow for the project generated from the Mephisto template.

Prerequisites โœ…

Before deploying, you must set the following variables/secrets in your GitHub Actions environment:

  • DOTNETRC (Heroku .netrc file content with "" wrapped)
  • HEROKU_API_KEY (Heroku API key)
  • MTURK_ACCESS_KEY_ID (Mturk access key)
  • MTURK_SECRET_ACCESS_KEY (Mturk secret key)
  • PRIVATE_KEY (Private key for SSH access)
  • AWS_ACCESS_KEY_ID (mephisto-ec2 access key)
  • AWS_SECRET_ACCESS_KEY (mephisto-ec2 secret key)
  • PROLIFIC_API_KEY

You also need to install the following tools:

  • Docker (Desktop)

Notes ๐Ÿ““

Please read the below notes carefully before starting your work:

  • The practical deployment flow: local -> test -> prod

    • Branch deployment-test for test/staging env
    • Branch deployment-prod for production env
  • Refer to Mephisto Documentation for other configuration details.

  • Please ensure that you have changed the taskname in hydra_config in test.yml and prod.yml.

    • Note that Heroku app names for each cannot be duplicated and cannot exceed 30 characters.
    • We are now deploying to EC2 instead of Heroku.
    • The task_name and subdomain should be similar to the repo name to make it easier to track.
  • There are some configs in hydra_config that are very sensitive and related to cost. Please discuss with your manager before changing them.

    • units_per_assignment: number of units per assignment
    • task_reward: reward per unit

How to Start ๐Ÿšฉ

Creating a New Repo

  1. Create a new repo from d-lab/mephisto template with the deployment branch.
  2. Clone the new repo to your local machine.
  3. Switch to the deployment branch.

How to Configure Environment Variables in GitHub Actions

  1. You must be the owner of the repo to configure the environment variables.
  2. Go to Settings -> Secrets and variables -> Actions.
  3. Add a new repository secret.

Local Deployment ๐Ÿ”จ

  1. Start from the deployment branch.
  2. Change directory to app directory.
  3. Run make build to freshly build the Docker image for the first time.
  4. Run make run to start the local server.
  5. Run make watch to build and watch the frontend.
  6. Start implementing your task in webapp/src.

Test Deployment ๐Ÿงช

  1. Once you are happy with your local version.
  2. Make sure to configure the hydra_config in test.yml and environment variables in GitHub Actions.
  3. Create a new branch from your current deployment branch and name it deployment-test.
  4. Push your changes to the deployment-test branch to remote.
  5. View your deployment status in GitHub Actions.

Production Deployment ๐Ÿš€

  1. Make sure to configure the hydra_config in prod.yml and environment variables in GitHub Actions.
  2. Create a new branch from your current deployment branch and name it deployment-prod.
  3. Push your changes to the deployment-prod branch to remote.
  4. Check GitHub Actions log for the deployment status and the production path to access the task.

Prolific Deployment ๐Ÿš€

  • Example in app/hydra_configs/conf/prod_prolific.yaml.
  • Prolific only uses EC2 architecture.
  • Make sure to configure PROLIFIC_API_KEY.
  • Edit prolific_workspace_name and prolific_project_name to map with workspace and project in prolific account.
    • You have to configure finance in that target workspace before deployment.

mpt's People

Contributors

jackurb avatar etesam913 avatar dependabot[bot] avatar pringshia avatar jayhuynh avatar meta-paul avatar salelkafrawy avatar ericmichaelsmith avatar sghmk12 avatar mojtaba-komeili avatar mwillwork avatar bottler avatar jxmsml avatar gzhihongwei avatar vaibhavad avatar macota avatar edwardguo61 avatar xksteven avatar thammegowda avatar yash621 avatar preithofer avatar facebook-github-bot avatar cngthnh avatar arjunan-k avatar benmatselby avatar eltociear avatar jacobkahn avatar chiehminwei avatar meganung avatar moyapchen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.