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

feat: local setup via docker-compose #3030

Merged
merged 6 commits into from
Jan 29, 2025
Merged

feat: local setup via docker-compose #3030

merged 6 commits into from
Jan 29, 2025

Conversation

dnechay
Copy link
Contributor

@dnechay dnechay commented Jan 20, 2025

Issue tracking

Closes #2994

Context behind the change

The goal of this PR is to have a docker-compose setup to easily run human protocol locally; documenting commands & steps on how to run is a next step (I have a draft document that can share in case you want to review)

  • refactored Dockerfiles for some services that are needed to run protocol w/ CVAT in order to reduce their size and rely on docker caching for quicker builds
  • .dockerignore updated and moved to project root because build context is project root and docker searches for ignore file there
  • removed some unused env vars and code
  • fixed incorrectly installed JS packages in some services

Note

In order to properly install package in yarn workspaces you have to:

# to install the package properly
yarn workspace <workspace-name> add <package-name>
# to respect package resolutions from root `package.json`
yarn install

How has this been tested?

  • used Human App client to fill KVStore for oracles (found out that we don't try to store public key hash there)
  • created "job requester" in JL; funded with HMT, launched CVAT job
  • created "annotator" users via Human App; completed registration in Exchange Oracle; solved jobs
  • validation succeeded in RecO & triggered RepO completion webhook
  • reputation oracle moved escrow to Completed and executed payouts
  • downloaded escrow results via JL

Escrow address used for testing: 0x79A7DFC3A30DD97aa0ea28383A9644b63E8973b3

Release plan

  1. Merge this PR
  2. Write "how to run" instructions in Gitbook

Follow-up TODOs: align what we have in scripts folder, other existing compose files and polish different options for local env setup (e.g. have a compose file to spin up only some services and run something else natively)

Potential risks; What to monitor; Rollback plan

The only changes that can affect production related to dependency installations in this PR, but they are about fixing existing setup and succeeded in docker, so see no risk.

This comment was marked as resolved.

@dnechay dnechay merged commit 9a48e1e into develop Jan 29, 2025
21 checks passed
@dnechay dnechay deleted the dnechay/2994 branch January 29, 2025 09:51
@dnechay dnechay mentioned this pull request Jan 29, 2025
35 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Docs] Create a tutorial for locally launching protocol with CVAT as an annotation tool
2 participants