Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
6a0a269
use BrowserRouter
ElevnLi Jan 11, 2022
b2fa700
change back to 8080
ElevnLi Jan 12, 2022
fd10c85
rename prefix to basename
ElevnLi Jan 12, 2022
1a277dd
add config.js for basename in cvat_ui
ElevnLi Jan 12, 2022
fadc3ff
set basename as env var in docker-compose
ElevnLi Jan 12, 2022
1c4a5e5
add basename env var to a[href]
ElevnLi Jan 12, 2022
f4a77f1
manually add basename as env variable
ElevnLi Jan 12, 2022
d4cdaac
add basename and baseUrl in cypress.json
ElevnLi Jan 12, 2022
981a953
add doc for this pr
ElevnLi Jan 13, 2022
3573131
set basename as empty string by default
ElevnLi Jan 13, 2022
83e5dbd
let cvat use auth db separately
ElevnLi Jan 23, 2022
eefcdc0
change path of db routers
ElevnLi Jan 24, 2022
bd46c5a
fixes
ElevnLi Jan 24, 2022
cac2548
add prefix to cvat static files <for demo purposes>
ElevnLi Jan 28, 2022
b04a76f
Moving back to a single db
Jan 31, 2022
325b3db
Removed db_routers so it works on a single database
Feb 2, 2022
5a7cdc9
Made DJANGO_DEFAULT_AUTH_GROUPS configurable via environment
ElevnLi Feb 7, 2022
0661d01
Bump pip from 21.0.1 to 22.0.2, setuptools from 53.0.0 to 60.6.0, whe…
Jan 31, 2022
9738cf4
Merge branch 'master-usyd-bug' of https://github.com/Weed-AI/cvat int…
ElevnLi Feb 8, 2022
2060278
fix md conflict
ElevnLi Feb 8, 2022
7211b7f
Merge branch 'master-usyd-bug' of github.com:Weed-AI/cvat into master…
ElevnLi Feb 8, 2022
dbff64b
Merge branch 'master-usyd-prefix' of https://github.com/Weed-AI/cvat …
ElevnLi Feb 8, 2022
b8fbb45
Added limits==2.3.3 as a requirements - later versions use a typing
Apr 29, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
65 changes: 65 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,71 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## \[2.0.0] - Unreleased
### Added
- Add additional environment variables for Nuclio configuration (<https://github.com/openvinotoolkit/cvat/pull/3894>)
- Add KITTI segmentation and detection format (<https://github.com/openvinotoolkit/cvat/pull/3757>)
- Add LFW format (<https://github.com/openvinotoolkit/cvat/pull/3770>)
- Add Cityscapes format (<https://github.com/openvinotoolkit/cvat/pull/3758>)
- Add Open Images V6 format (<https://github.com/openvinotoolkit/cvat/pull/3679>)
- Rotated bounding boxes (<https://github.com/openvinotoolkit/cvat/pull/3832>)
- Player option: Smooth image when zoom-in, enabled by default (<https://github.com/openvinotoolkit/cvat/pull/3933>)
- Google Cloud Storage support in UI (<https://github.com/openvinotoolkit/cvat/pull/3919>)
- Add project tasks paginations (<https://github.com/openvinotoolkit/cvat/pull/3910>)
- Add remove issue button (<https://github.com/openvinotoolkit/cvat/pull/3952>)
- Data sorting option (<https://github.com/openvinotoolkit/cvat/pull/3937>)
- Options to change font size & position of text labels on the canvas (<https://github.com/openvinotoolkit/cvat/pull/3972>)
- Add "tag" return type for automatic annotation in Nuclio (<https://github.com/openvinotoolkit/cvat/pull/3896>)
- Helm chart: Make user-data-permission-fix optional (<https://github.com/openvinotoolkit/cvat/pull/3994>)
- Advanced identity access management system, using open policy agent (<https://github.com/openvinotoolkit/cvat/pull/3788>)
- Organizations to create "shared space" for different groups of users (<https://github.com/openvinotoolkit/cvat/pull/3788>)
- Dataset importing to a project (<https://github.com/openvinotoolkit/cvat/pull/3790>)
- User is able to customize information that text labels show (<https://github.com/openvinotoolkit/cvat/pull/4029>)
- Support for uploading manifest with any name (<https://github.com/openvinotoolkit/cvat/pull/4041>)
- Added information about OpenVINO toolkit to login page (<https://github.com/openvinotoolkit/cvat/pull/4077>)
- Support for working with ellipses (<https://github.com/openvinotoolkit/cvat/pull/4062>)
- Add several flags to task creation CLI (<https://github.com/openvinotoolkit/cvat/pull/4119>)
- Add YOLOv5 serverless function for automatic annotation (<https://github.com/openvinotoolkit/cvat/pull/4178>)
- Basic page with jobs list, basic filtration to this list (<https://github.com/openvinotoolkit/cvat/pull/4258>)

### Changed
- Users don't have access to a task object anymore if they are assigneed only on some jobs of the task (<https://github.com/openvinotoolkit/cvat/pull/3788>)
- Different resources (tasks, projects) are not visible anymore for all CVAT instance users by default (<https://github.com/openvinotoolkit/cvat/pull/3788>)
- Replaced 'django_sendfile' with 'django_sendfile2' (<https://github.com/openvinotoolkit/cvat/pull/4267>)

### Deprecated
- Job field "status" is not used in UI anymore, but it has not been removed from the database yet (<https://github.com/openvinotoolkit/cvat/pull/3788>)

### Removed
- Review rating, reviewer field from the job instance (use assignee field together with stage field instead) (<https://github.com/openvinotoolkit/cvat/pull/3788>)

### Fixed
- Fixed Interaction handler keyboard handlers (<https://github.com/openvinotoolkit/cvat/pull/3881>)
- Points of invisible shapes are visible in autobordering (<https://github.com/openvinotoolkit/cvat/pull/3931>)
- Order of the label attributes in the object item details(<https://github.com/openvinotoolkit/cvat/pull/3945>)
- Order of labels in tasks and projects (<https://github.com/openvinotoolkit/cvat/pull/3987>)
- Fixed task creating with large files via webpage (<https://github.com/openvinotoolkit/cvat/pull/3692>)
- Added information to export CVAT_HOST when performing local installation for accessing over network (<https://github.com/openvinotoolkit/cvat/pull/4014>)
- Fixed possible color collisions in the generated colormap (<https://github.com/openvinotoolkit/cvat/pull/4007>)
- Original pdf file is deleted when using share (<https://github.com/openvinotoolkit/cvat/pull/3967>)
- Order in an annotation file(<https://github.com/openvinotoolkit/cvat/pull/4087>)
- Fixed task data upload progressbar (<https://github.com/openvinotoolkit/cvat/pull/4134>)
- Email in org invitations is case sensitive (<https://github.com/openvinotoolkit/cvat/pull/4153>)
- Caching for tasks and jobs can lead to an exception if its assignee user is removed (<https://github.com/openvinotoolkit/cvat/pull/4165>)
- Added intelligent function when paste labels to another task (<https://github.com/openvinotoolkit/cvat/pull/4161>)
- Uncaught TypeError: this.el.node.getScreenCTM() is null in Firefox (<https://github.com/openvinotoolkit/cvat/pull/4175>)
- Bug: canvas is busy when start playing, start resizing a shape and do not release the mouse cursor (<https://github.com/openvinotoolkit/cvat/pull/4151>)
- Bug: could not receive frame N. TypeError: Cannot read properties of undefined (reding "filename") (<https://github.com/openvinotoolkit/cvat/pull/4187>)
- Cannot choose a dataset format for a linked repository if a task type is annotation (<https://github.com/openvinotoolkit/cvat/pull/4203>)
- Fixed tus upload error over https (<https://github.com/openvinotoolkit/cvat/pull/4154>)
- Issues disappear when rescale a browser (<https://github.com/openvinotoolkit/cvat/pull/4189>)
- Auth token key is not returned when registering without email verification (<https://github.com/openvinotoolkit/cvat/pull/4092>)
- Error in create project from backup for standard 3D annotation (<https://github.com/openvinotoolkit/cvat/pull/4160>)
- Annotations search does not work correctly in some corner cases (when use complex properties with width, height) (<https://github.com/openvinotoolkit/cvat/pull/4198>)

### Security
- Updated ELK to 6.8.23 which uses log4j 2.17.1 (<https://github.com/openvinotoolkit/cvat/pull/4206>)

## \[1.7.0] - 2021-11-15

### Added
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ RUN curl -sL https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.bz2 --outp
# Install requirements
RUN python3 -m venv /opt/venv
ENV PATH="/opt/venv/bin:${PATH}"
RUN python3 -m pip install --no-cache-dir -U pip==21.0.1 setuptools==53.0.0 wheel==0.36.2
RUN python3 -m pip install --no-cache-dir -U pip==22.0.2 setuptools==60.6.0 wheel==0.37.1
COPY cvat/requirements/ /tmp/requirements/
RUN DATUMARO_HEADLESS=1 python3 -m pip install --no-cache-dir -r /tmp/requirements/${DJANGO_CONFIGURATION}.txt

Expand Down
3 changes: 2 additions & 1 deletion Dockerfile.ui
Original file line number Diff line number Diff line change
Expand Up @@ -39,4 +39,5 @@ FROM nginx:mainline-alpine
# Replace default.conf configuration to remove unnecessary rules
RUN sed -i "s/}/application\/wasm wasm;\n}/g" /etc/nginx/mime.types
COPY cvat-ui/react_nginx.conf /etc/nginx/conf.d/default.conf
COPY --from=cvat-ui /tmp/cvat-ui/dist /usr/share/nginx/html/
COPY --from=cvat-ui /tmp/cvat-ui/dist /usr/share/nginx/html/cvat-static/
COPY --from=cvat-ui /tmp/cvat-ui/dist/*.html /usr/share/nginx/html/
9 changes: 9 additions & 0 deletions cvat-core/src/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,9 @@ function build() {
* @property {string} proxy Axios proxy settings.
* For more details please read <a href="https://github.com/axios/axios"> here </a>
* @memberof module:API.cvat.config
* @property {string} basename adding base url to incoming and outgoing request of the frontend
* Changes should be made in ./cvat-ui/src/config.js, ./.env and ./tests/cypress.json
* Will get e.g. <your host>/<customised base url>/auth/login
* @memberof module:API.cvat.config
*/
get backendAPI() {
Expand All @@ -711,6 +714,12 @@ function build() {
set proxy(value) {
config.proxy = value;
},
get basename() {
return config.basename;
},
set basename(value) {
config.basename = value;
},
},
/**
* Namespace contains some library information e.g. api version
Expand Down
1 change: 1 addition & 0 deletions cvat-core/src/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// SPDX-License-Identifier: MIT

module.exports = {
basename: '',
backendAPI: '/api/v1',
proxy: false,
};
3 changes: 3 additions & 0 deletions cvat-ui/src/config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module.exports = {
basename: '/cvat-annotation',
};
5 changes: 4 additions & 1 deletion cvat-ui/src/cvat-core-wrapper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@
// SPDX-License-Identifier: MIT

import _cvat from 'cvat-core/src/api';
import config from './config';

const cvat: any = _cvat;
const basename: string = config.basename;

cvat.config.backendAPI = '/api/v1';
cvat.config.basename = basename;
cvat.config.backendAPI = `${basename}/api/v1`;

export default function getCore(): any {
return cvat;
Expand Down
4 changes: 3 additions & 1 deletion cvat-ui/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@ import { KeyMap } from 'utils/mousetrap-react';
import createRootReducer from 'reducers/root-reducer';
import { resetErrors, resetMessages } from './actions/notification-actions';
import { CombinedState, NotificationsState } from './reducers/interfaces';
import getCore from 'cvat-core-wrapper';

createCVATStore(createRootReducer);
const cvatStore = getCVATStore();
const core = getCore();

interface StateToProps {
pluginsInitialized: boolean;
Expand Down Expand Up @@ -117,7 +119,7 @@ const ReduxAppWrapper = connect(mapStateToProps, mapDispatchToProps)(CVATApplica

ReactDOM.render(
<Provider store={cvatStore}>
<BrowserRouter>
<BrowserRouter basename={`${core.config.basename}`}>
<ReduxAppWrapper />
</BrowserRouter>
<LayoutGrid />
Expand Down
6 changes: 3 additions & 3 deletions cvat-ui/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ module.exports = (env) => ({
output: {
path: path.resolve(__dirname, 'dist'),
filename: '[name].[contenthash].min.js',
publicPath: '/',
publicPath: '/cvat-static/',
},
devServer: {
contentBase: path.join(__dirname, 'dist'),
Expand Down Expand Up @@ -108,7 +108,7 @@ module.exports = (env) => ({
use: {
loader: 'worker-loader',
options: {
publicPath: '/',
publicPath: '/cvat-static/',
name: '3rdparty/[name].[contenthash].js',
},
},
Expand All @@ -119,7 +119,7 @@ module.exports = (env) => ({
use: {
loader: 'worker-loader',
options: {
publicPath: '/',
publicPath: '/cvat-static/',
name: '[name].[contenthash].js',
},
},
Expand Down
1 change: 1 addition & 0 deletions cvat/apps/engine/backup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
from django.db import transaction
from rest_framework.parsers import JSONParser
from rest_framework.renderers import JSONRenderer
from django_sendfile import sendfile

import cvat.apps.dataset_manager as dm
from cvat.apps.engine import models
Expand Down
2 changes: 1 addition & 1 deletion cvat/apps/engine/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
from rest_framework.permissions import SAFE_METHODS, IsAuthenticated
from rest_framework.renderers import JSONRenderer
from rest_framework.response import Response
from sendfile import sendfile
from django_sendfile import sendfile

import cvat.apps.dataset_manager as dm
import cvat.apps.dataset_manager.views # pylint: disable=unused-import
Expand Down
2 changes: 1 addition & 1 deletion cvat/apps/opencv/views.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import os
import glob
from django.conf import settings
from sendfile import sendfile
from django_sendfile import sendfile

def OpenCVLibrary(request):
dirname = os.path.join(settings.STATIC_ROOT, 'opencv', 'js')
Expand Down
3 changes: 2 additions & 1 deletion cvat/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ requests==2.26.0
rq==1.5.1
rq-scheduler==0.10.0
sqlparse==0.4.2
django-sendfile==0.3.11
django-sendfile2==0.6.1
dj-pagination==2.5.0
python-logstash-async==2.2.0
django-revproxy==0.10.0
Expand Down Expand Up @@ -48,6 +48,7 @@ open3d==0.11.2
boto3==1.17.61
azure-storage-blob==12.8.1
google-cloud-storage==1.42.0
limits==2.3.3
# --no-binary=datumaro: workaround for pip to install
# opencv-headless instead of regular opencv, to actually run setup script
# --no-binary=pycocotools: workaround for binary incompatibility on numpy 1.20
Expand Down
12 changes: 9 additions & 3 deletions cvat/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ def add_ssh_keys():
'cvat.apps.opencv',
'django_rq',
'compressor',
'cacheops',
'sendfile',
'django_sendfile',
'dj_pagination',
'revproxy',
'rules',
Expand Down Expand Up @@ -225,7 +224,11 @@ def add_ssh_keys():

# Django Auth
DJANGO_AUTH_TYPE = 'BASIC'
DJANGO_AUTH_DEFAULT_GROUPS = []
env_default_groups = os.getenv('DJANGO_AUTH_DEFAULT_GROUPS')
if env_default_groups:
DJANGO_AUTH_DEFAULT_GROUPS = env_default_groups.split(',')
else:
DJANGO_AUTH_DEFAULT_GROUPS = [ ]
LOGIN_URL = 'rest_login'
LOGIN_REDIRECT_URL = '/'

Expand Down Expand Up @@ -482,3 +485,6 @@ def add_ssh_keys():

USE_CACHE = True

# Django-sendfile requires to set SENDFILE_ROOT
# https://github.com/moggers87/django-sendfile2
SENDFILE_ROOT = BASE_DIR
4 changes: 2 additions & 2 deletions cvat/settings/development.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
ALLOWED_HOSTS.append('testserver')

# Django-sendfile:
# https://github.com/johnsensible/django-sendfile
SENDFILE_BACKEND = 'sendfile.backends.development'
# https://github.com/moggers87/django-sendfile2
SENDFILE_BACKEND = 'django_sendfile.backends.development'

# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
Expand Down
4 changes: 2 additions & 2 deletions cvat/settings/production.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
CACHEOPS_REDIS['host'] = os.getenv('CVAT_REDIS_HOST', 'cvat_redis')

# Django-sendfile:
# https://github.com/johnsensible/django-sendfile
SENDFILE_BACKEND = 'sendfile.backends.xsendfile'
# https://github.com/moggers87/django-sendfile2
SENDFILE_BACKEND = 'django_sendfile.backends.xsendfile'

# Database
# https://docs.djangoproject.com/en/2.0/ref/settings/#databases
Expand Down
28 changes: 21 additions & 7 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ services:

cvat:
container_name: cvat
image: openvino/cvat_server
build:
context: .
dockerfile: Dockerfile
restart: always
depends_on:
- cvat_redis
Expand All @@ -42,26 +44,37 @@ services:
- traefik.enable=true
- traefik.http.services.cvat.loadbalancer.server.port=8080
- traefik.http.routers.cvat.rule=Host(`${CVAT_HOST:-localhost}`) &&
PathPrefix(`/api/`, `/git/`, `/opencv/`, `/analytics/`, `/static/`, `/admin`, `/documentation/`, `/django-rq`)
PathPrefix(`${BASENAME}/api/`, `${BASENAME}/git/`, `${BASENAME}/opencv/`, `${BASENAME}/analytics/`, `${BASENAME}/static/`, `${BASENAME}/admin`, `${BASENAME}/documentation/`, `${BASENAME}/django-rq`)
- traefik.http.routers.cvat.entrypoints=web
- traefik.http.routers.cvat.middlewares=add-cvat
- traefik.http.middlewares.add-cvat.stripprefix.prefixes=${BASENAME}
- traefik.http.middlewares.add-cvat.stripprefix.forceSlash=true
volumes:
- cvat_data:/home/django/data
- cvat_keys:/home/django/keys
- cvat_logs:/home/django/logs
ports:
- "8080:8080"
networks:
- cvat

cvat_ui:
container_name: cvat_ui
image: openvino/cvat_ui
build:
context: .
dockerfile: Dockerfile.ui
restart: always
depends_on:
- cvat
labels:
- traefik.enable=true
- traefik.http.services.cvat-ui.loadbalancer.server.port=80
- traefik.http.routers.cvat-ui.rule=Host(`${CVAT_HOST:-localhost}`)
- traefik.http.routers.cvat-ui.rule=Host(`${CVAT_HOST:-localhost}`) &&
PathPrefix(`${BASENAME}`, `/cvat-static`)
- traefik.http.routers.cvat-ui.entrypoints=web
- traefik.http.routers.cvat-ui.middlewares=add-cvat-ui
- traefik.http.middlewares.add-cvat-ui.stripprefix.prefixes=${BASENAME}
- traefik.http.middlewares.add-cvat-ui.stripprefix.forceSlash=true
networks:
- cvat

Expand All @@ -72,7 +85,7 @@ services:
command:
- "--providers.docker.exposedByDefault=false"
- "--providers.docker.network=cvat"
- "--entryPoints.web.address=:8080"
- "--entryPoints.web.address=:80"
# Uncomment to get Traefik dashboard
# - "--entryPoints.dashboard.address=:8090"
# - "--api.dashboard=true"
Expand All @@ -82,7 +95,7 @@ services:
# - traefik.http.routers.dashboard.service=api@internal
# - traefik.http.routers.dashboard.rule=Host(`${CVAT_HOST:-localhost}`)
ports:
- 8080:8080
- 80:80
- 8090:8090
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
Expand All @@ -92,8 +105,9 @@ services:
volumes:
cvat_db:
cvat_data:
postgres_data_auth:
cvat_keys:
cvat_logs:

networks:
cvat:
cvat:
5 changes: 3 additions & 2 deletions tests/cypress.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{
"video": false,
"baseUrl": "http://localhost:8080",
"baseUrl": "http://localhost:8080/cvat-annotation",
"viewportWidth": 1300,
"viewportHeight": 960,
"defaultCommandTimeout": 25000,
"downloadsFolder": "cypress/fixtures",
"env": {
"user": "admin",
"email": "[email protected]",
"password": "12qwaszx"
"password": "12qwaszx",
"basename": "/cvat-annotation"
},
"testFiles": [
"auth_page.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ context('Dump/Upload annotation.', { browser: '!firefox' }, () => {
cy.get('input[type=file]').attachFile(annotationArchiveName);
});
confirmUpdate('.cvat-modal-content-load-job-annotation');
cy.intercept('GET', '/api/v1/jobs/**/annotations**').as('uploadAnnotationsGet');
cy.intercept('GET', `${Cypress.env('basename')}/api/v1/jobs/**/annotations**`).as('uploadAnnotationsGet');
cy.wait('@uploadAnnotationsGet').its('response.statusCode').should('equal', 200);
cy.get('#cvat_canvas_shape_1').should('exist');
cy.get('#cvat-objects-sidebar-state-item-1').should('exist');
Expand Down
Loading