ai-models/agents_deployment/templates/docker-compose/README.md
func.py file that acts as adapter between your agent and CVAT.
You can refer to existing adapters for YOLO, SAM2 or transformers for inspiration. (/ai-models/detector/yolo/func.py,
/ai-models/tracker/sam2/func.py, /ai-models/transformers/func.py)$USE_GPU to allow users to choose between CPU and GPU
versions of the image.
For the models that we've implemented as agents we rely on pytorch CPU or GPU wheels.All three capabilities are powered by cvat-cli that authenticates in CVAT with provided API key and allows to
register/deregister functions and run agents.
Please refer to scripts entrypoint.sh, function_registration.sh
and function_deregistration.sh for examples of how to use cvat-cli to implement
these capabilities.
Once your image is built, use Docker Compose to manage the agent lifecycle. All services use the same image.
cvat-function-register service).cvat-function-register service creates a file on shared volume.cvat-agent service runs agents that connect to CVAT function that was created in step 1.cvat-function-deregister service manually to delete function from CVAT.
(docker compose run --rm cvat-function-deregister)It's easy to configure docker compose using .env file that should be located in the same folder as docker-compose.yaml