Running CVAT

On this page you will find necessary steps on how to run CVAT for local environment

In order to run CVAT locally, you need to pull their repository:

git clone https://github.com/opencv/cvat.git && cd cvat

Before running CVAT services, you will need to make some modifications to the docker-compose.yml file in order to enable communication between Human Protocol and CVAT containers.

If using "localhost" version (i.e. services running locally)

If you use "localhost" setup, you will highly likely need to create bridge Docker network to be able to access CVAT services from local host:

docker network create \
    -o "com.docker.network.bridge.enable_icc=true" \
    -o "com.docker.network.bridge.enable_ip_masquerade=true" \
    -o "com.docker.network.driver.mtu=1500" \
    human-cvat-bridge

Then configure cvat network at the bottom of compose file:

networks:
  cvat:
    name: human-cvat-bridge
    external: true

In order to allow HUMAN Protocol services communicate with CVAT services you need to retrieve bridge network Gateway IP (traffic from your local host goes through this Gateway to containers):

docker network inspect human-cvat-bridge | grep Gateway
# 172.19.0.1

and when you starting CVAT, specify --allow-address using that IP:

SMOKESCREEN_OPTS="--allow-address=172.19.0.1/" \
    docker compose -f docker-compose.yml -f docker-compose.dev.yml \
    up -d

CVAT will be available on http://localhost:8080 and will allow requests only with Host: localhost header

Once you started - trigger a healthcheck to verify that CVAT works as expected:

docker exec -t cvat_server python manage.py health_check

Next you will need to create superuser to manage CVAT instance:

docker exec -it cvat_server bash -ic 'python3 ~/manage.py createsuperuser'

Then go to CVAT UI (http://cvat-lb:8080/ or http://localhost:8080 as per your setup) in your browser, login as superuser and create a user for HUMAN Protocol services. Then login as this user and create the organization for HUMAN Protocol.

Last updated

Was this helpful?