Nuclio as a plugin in CVAT, improved system to check installed plugins (#2192)
* allow to run cvat without nuclio * fix new line * fix comments * Updated core version * refactoring * minor refactoring, fixed eslint issues, added documentation to cvat-core, updated ui version, updated changelog * move plugins to serverViewSet Co-authored-by: Boris Sekachev <boris.sekachev@yandex.ru>main
parent
6370f980eb
commit
f2c84a2653
@ -0,0 +1,7 @@
|
||||
## Serverless for Computer Vision Annotation Tool (CVAT)
|
||||
|
||||
### Run docker container
|
||||
```bash
|
||||
# From project root directory
|
||||
docker-compose -f docker-compose.yml -f components/serverless/docker-compose.serverless.yml up -d
|
||||
```
|
||||
@ -0,0 +1,28 @@
|
||||
version: '2.3'
|
||||
services:
|
||||
serverless:
|
||||
container_name: nuclio
|
||||
image: quay.io/nuclio/dashboard:1.4.8-amd64
|
||||
restart: always
|
||||
networks:
|
||||
default:
|
||||
aliases:
|
||||
- nuclio
|
||||
volumes:
|
||||
- /tmp:/tmp
|
||||
- /var/run/docker.sock:/var/run/docker.sock
|
||||
environment:
|
||||
http_proxy:
|
||||
https_proxy:
|
||||
no_proxy: 172.28.0.1,${no_proxy}
|
||||
NUCLIO_CHECK_FUNCTION_CONTAINERS_HEALTHINESS: "true"
|
||||
ports:
|
||||
- "8070:8070"
|
||||
|
||||
cvat:
|
||||
environment:
|
||||
CVAT_SERVERLESS: 1
|
||||
no_proxy: kibana,logstash,nuclio,${no_proxy}
|
||||
|
||||
volumes:
|
||||
cvat_events:
|
||||
@ -1,29 +0,0 @@
|
||||
// Copyright (C) 2020 Intel Corporation
|
||||
//
|
||||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import getCore from 'cvat-core-wrapper';
|
||||
import { SupportedPlugins } from 'reducers/interfaces';
|
||||
import isReachable from './url-checker';
|
||||
|
||||
const core = getCore();
|
||||
|
||||
// Easy plugin checker to understand what plugins supports by a server
|
||||
class PluginChecker {
|
||||
public static async check(plugin: SupportedPlugins): Promise<boolean> {
|
||||
const serverHost = core.config.backendAPI.slice(0, -7);
|
||||
|
||||
switch (plugin) {
|
||||
case SupportedPlugins.GIT_INTEGRATION: {
|
||||
return isReachable(`${serverHost}/git/repository/meta/get`, 'OPTIONS');
|
||||
}
|
||||
case SupportedPlugins.ANALYTICS: {
|
||||
return isReachable(`${serverHost}/analytics/app/kibana`, 'GET');
|
||||
}
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default PluginChecker;
|
||||
Loading…
Reference in New Issue