25 Commits

Author SHA1 Message Date
Roman Donchenko 7d196441bc Make the Kvrocks and Vector containers compatible with runAsNonRoot (#9755)
This is a continuation of #9743. I believe this makes the entire chart
compatible with `runAsNonRoot`, as long as you disable the "permission
fix" container.

The actual changes for the two services are quite different:

* Kvrocks already runs as a non-root user, but it specifies that user as
  a string, which is incompatible with `runAsNonRoot`. Override it with an
  explicit `runAsUser` setting.

  I have submitted a patch for this upstream, so this workaround will not
  be necessary for future versions of Kvrocks.

* Vector runs as root. However, it seems that (in our configuration, at
  least) it can be forced to run with a non-root UID without any
  difficulties, so do that. A few other changes are in support of that:

* I changed the port from 80 to 8282, since unprivileged users are
  usually unable to listen on ports < 1024. With Docker this isn't a
  problem, but K8s often uses different container runtimes. I chose 8282,
  since we already use this port in the development configuration.

* I set `data_dir` to `/vector-data-dir` in the config file. By default,
  this setting is set to `/var/lib/vector`, which is only writeable by
  root. `/vector-data-dir` is mounted as a tmpfs volume into the
  container, therefore it has 777 permissions.

  TBH, I'm not sure if Vector actually writes anything to this directory
  in our configuration, but this gives me more peace of mind.

To maintain consistency between Compose and Helm deployments, I also
changed the UID/GID in the Compose file, and added a `/vector-data-dir`
volume.
2025-08-28 13:56:07 +03:00
Boris Sekachev e54f78157c Do not expose debug services to outside networks (#9325) 2025-04-14 18:24:24 +03:00
Boris Sekachev 2377fd71a3 Removed analytics reports (#9174) 2025-03-16 12:41:02 +02:00
Maxim Zhiltsov 4d06ae1e34 Consensus simple merging (#8953)
- Added support for consensus task and consensus job merging (API and
UI)
- Added simple consensus settings
- Added server tests
- Added new `consensus` RQ queue and worker
- Updated skeleton comparisons: hidden points now also contribute to the
skeleton similarity. Only visibility is taken into account for invisible
points

Limitations:
- Merging is supported for all annotations except 2d and 3d cuboids. 3d
tasks are not supported
- Annotation groups are not supported (each annotation is considered
separate in a group)
- Polygons and masks are not interchangeable (each type is compared only
with the same type)

Co-authored-by: Kirill Lakhov <kirill.lakhov@cvat.ai>
2025-02-21 18:41:24 +02:00
Boris Sekachev 5a99e73efd Drop years from license headers associated to CVAT.ai Corporation (#8968) 2025-01-21 09:31:41 +02:00
Boris Sekachev 39afcd443f Added ability to call analytics report manually (#7805) 2024-05-03 16:33:11 +03:00
Roman Donchenko bf4089ead3 Expose Vector and Clickhouse ports in docker-compose.dev.yml (#7552) 2024-03-06 15:44:16 +02:00
Andrey Zhavoronkov 7a1a4b14a6 Replace keydb with kvrocks (#7339)
Resolved #7345
2024-01-18 12:08:45 +02:00
Roman Donchenko 48ab12b6bc Use separate services for storing job queues and cache (#7245)
<!-- Raise an issue to propose your change
(https://github.com/opencv/cvat/issues).
It helps to avoid duplication of efforts from multiple independent
contributors.
Discuss your ideas with maintainers to be sure that changes will be
approved and merged.
Read the [Contribution
guide](https://opencv.github.io/cvat/docs/contributing/). -->

<!-- Provide a general summary of your changes in the Title above -->

### Motivation and context
<!-- Why is this change required? What problem does it solve? If it
fixes an open
issue, please link to the issue here. Describe your changes in detail,
add
screenshots. -->
These types of data have different characteristics and we have different
expectations on them:

* job queues are small and we'd rather not lose them (although losing
them is not fatal);

* cached chunks are large and we don't care if we lose them.

We currently store both in KeyDB, which has shown itself to not be
especially reliable. A few times we've had to clear the KeyDB store due
to data corruption, which destroyed the queues as well. While we'll
probably end up replacing KeyDB with something else, it would still be
useful to have the ability to just clear the cache volume without taking
out the job queues in the process.

As a solution to this, add a Redis service to be used only for the
queues (and potentially for other small data items). Using the original
Redis instead of KeyDB should also help with reliability (at least as
far as the job queues are concerned).

### How has this been tested?
<!-- Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc. -->
I checked the CVAT can still start using the development environment
instructions, the Compose file and the Helm chart.

### Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply.
If an item isn't applicable for some reason, then ~~explicitly
strikethrough~~ the whole
line. If you don't do that, GitHub will show incorrect progress for the
pull request.
If you're unsure about any of these, don't hesitate to ask. We're here
to help! -->
- [x] I submit my changes into the `develop` branch
- [x] I have created a changelog fragment <!-- see top comment in
CHANGELOG.md -->
- ~~[ ] I have updated the documentation accordingly~~
- ~~[ ] I have added tests to cover my changes~~
- ~~[ ] I have linked related issues (see [GitHub docs](

https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))~~
- ~~[ ] I have increased versions of npm packages if it is necessary

([cvat-canvas](https://github.com/opencv/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/opencv/cvat/tree/develop/cvat-core#versioning),

[cvat-data](https://github.com/opencv/cvat/tree/develop/cvat-data#versioning)
and

[cvat-ui](https://github.com/opencv/cvat/tree/develop/cvat-ui#versioning))~~

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.
2023-12-19 16:33:56 +03:00
Roman Donchenko 9fb582d26a Simplify the dev environment setup instructions by reusing Compose files (#7254)
The advantages of this are as follows:

* It's much easier for a developer to use one `docker compose up`
command to bring everything up than to run a custom command for each
service.

* We eliminate possible divergence of configuration (e.g. versions,
command-line parameters) between what we actually use and what's listed
in the documentation.

* It makes it easier to update the developer guide if new dependencies
are introduced.

* And speaking of new dependencies, we have KeyDB now, which hasn't been
added to the dev guide.

The disadvantage is that we have to run an extra copy of the CVAT
server, because otherwise OPA can't fetch its rules. I don't think it's
a significant issue, since it doesn't prevent you from debugging
anything.

<!-- Raise an issue to propose your change
(https://github.com/opencv/cvat/issues).
It helps to avoid duplication of efforts from multiple independent
contributors.
Discuss your ideas with maintainers to be sure that changes will be
approved and merged.
Read the [Contribution
guide](https://opencv.github.io/cvat/docs/contributing/). -->

<!-- Provide a general summary of your changes in the Title above -->

### Motivation and context
<!-- Why is this change required? What problem does it solve? If it
fixes an open
issue, please link to the issue here. Describe your changes in detail,
add
screenshots. -->
Working on #7245, I realized that I don't want to add another custom
command for running Redis in the development environment to the dev
guide. So I wanted to remove the custom commands entirely.

### How has this been tested?
<!-- Please describe in detail how you tested your changes.
Include details of your testing environment, and the tests you ran to
see how your change affects other areas of the code, etc. -->
By manually following the updated instructions.

### Checklist
<!-- Go over all the following points, and put an `x` in all the boxes
that apply.
If an item isn't applicable for some reason, then ~~explicitly
strikethrough~~ the whole
line. If you don't do that, GitHub will show incorrect progress for the
pull request.
If you're unsure about any of these, don't hesitate to ask. We're here
to help! -->
- [x] I submit my changes into the `develop` branch
- ~~[ ] I have created a changelog fragment~~ <!-- see top comment in
CHANGELOG.md -->
- [x] I have updated the documentation accordingly
- ~~[ ] I have added tests to cover my changes~~
- [x] I have linked related issues (see [GitHub docs](

https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))
- ~~[ ] I have increased versions of npm packages if it is necessary

([cvat-canvas](https://github.com/opencv/cvat/tree/develop/cvat-canvas#versioning),

[cvat-core](https://github.com/opencv/cvat/tree/develop/cvat-core#versioning),

[cvat-data](https://github.com/opencv/cvat/tree/develop/cvat-data#versioning)
and

[cvat-ui](https://github.com/opencv/cvat/tree/develop/cvat-ui#versioning))~~

### License

- [x] I submit _my code changes_ under the same [MIT License](
https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the
project.
  Feel free to contact the maintainers if that's a concern.
2023-12-15 17:17:16 +03:00
Kirill Lakhov a79052f69d Project/Task/Job Analytics (#6371) 2023-07-25 12:21:55 +03:00
Maxim Zhiltsov bb126d3905 Enable coverage collection in quality reports worker (#6341)
- Added missing coverage collection in quality reports worker
- Fixed invalid worker class in webhooks worker
2023-06-21 12:39:38 +03:00
Maxim Zhiltsov 9a600f3fa8 Honey pot server (#6204)
The server part of #6039 

- Added support for Ground Truth jobs in a task
- Added support for job creation and removal (only Ground Truth jobs can
  be created or removed in a task)
- Added a component to autocompute quality metrics for a task
- Added tests
- Fixed https://github.com/opencv/cvat/issues/5971 (both parts - the
  outside problem and the manifest problem, the manifest part fix is also
  available in #6216)

Co-authored-by: klakhov <kirill.9992@gmail.com>
Co-authored-by: Roman Donchenko <roman@cvat.ai>
Co-authored-by: Kirill Sizov <kirill.sizov@cvat.ai>
2023-06-12 14:57:14 +03:00
Anastasia Yasakova 09a10ca59d Code coverage (#6173)
- Replaced Coveralls with Codecov
- Added code coverage to full workflow
- Enabled code coverage for tests
2023-06-12 07:08:02 +03:00
Roman Donchenko a353497937 Stop adding package source code into the release Docker images (#6040)
The policy that mandated this is no longer relevant now that CVAT is no
longer developed by Intel. Moreover, the source code included was not
even complete (it didn't contain Python or NPM packages).

This saves ~1.6 GB in the unpacked image (and probably a bunch of build
time too, but I didn't measure it).
2023-04-19 11:40:50 +03:00
Nikita Manovich 6852caefe6 Use PostgreSQL in debug mode (#5999)
Fix #5996

We have multiple problems with sqlite on different operation systems.
The idea here is to use the same DB in debug and in production.

sqlite database is locked errors:
- https://www2.sqlite.org/cvstrac/wiki?p=DatabaseIsLocked
-
https://docs.djangoproject.com/en/4.2/ref/databases/#database-is-locked-errors

---------

Co-authored-by: kirill-sizov <sizow.k.d@gmail.com>
2023-04-11 23:06:28 +03:00
Andrey Zhavoronkov fd7d8024f9 Splitted default queue to import/export, fixed django-rq admin page (#5555) 2023-01-06 21:48:30 +02:00
Roman Donchenko 580ae49e5a Migrate to Docker Compose V2 (#5524)
Also, migrate to the version less Compose file format.

Compose V1 is EOL:
<https://www.docker.com/blog/announcing-compose-v2-general-availability/>.
2022-12-29 13:40:09 +02:00
Maxim Zhiltsov 2ed778818a Allow server debugging when deployed with Docker (#5445)
Closes https://github.com/opencv/cvat/issues/5327

- Added a way to debug the server in Docker-based deployments
- Added docs
2022-12-10 09:34:56 +02:00
Andrey Zhavoronkov 49bdef01f1 IAM OPA bundle for dev environment (#5190) 2022-11-02 07:13:17 +03:00
Andrey Zhavoronkov 9cf2989546 Init OPA rules with API instead of file binding (#5047) 2022-10-25 12:20:50 +03:00
Andrey Zhavoronkov 5e2eda7601 Extend helm to support Serverless functions and Analytics (#110) 2022-08-18 19:33:05 +03:00
Boris Sekachev 4f1a778d22 Fixed Intel license headers (#119) 2022-07-11 17:02:27 +03:00
Dmitry Kruchinin b9f405804b CI. Using the Docker layer cache. Parallelizing test runs. (#3100) 2021-04-27 22:59:58 +03:00
Andrey Zhavoronkov 108947fbce Added CI workflow to publish CVAT images (#2766)
* Configured CI workflow for public images
* updated license headers
* align list item indent rule for remarklint and prettier
* updated changelog

Co-authored-by: Nikita Manovich <nikita.manovich@intel.com>
2021-02-12 11:18:04 +03:00