-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Nuclio as a plugin in CVAT, improved system to check installed plugins #2192
Changes from 7 commits
f71dbba
9cbfe23
57aaf41
339c3c5
c8a37d1
fd7ccb9
44fef1f
842b34e
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,18 +26,18 @@ services: | |
context: ./components/analytics/kibana | ||
args: | ||
ELK_VERSION: 6.4.0 | ||
depends_on: ['cvat_elasticsearch'] | ||
depends_on: [ 'cvat_elasticsearch' ] | ||
restart: always | ||
|
||
cvat_kibana_setup: | ||
container_name: cvat_kibana_setup | ||
image: cvat/server | ||
volumes: ['./components/analytics/kibana:/home/django/kibana:ro'] | ||
depends_on: ['cvat'] | ||
volumes: [ './components/analytics/kibana:/home/django/kibana:ro' ] | ||
depends_on: [ 'cvat' ] | ||
working_dir: '/home/django' | ||
entrypoint: ['bash', 'wait-for-it.sh', 'elasticsearch:9200', '-t', '0', '--', | ||
'/bin/bash', 'wait-for-it.sh', 'kibana:5601', '-t', '0', '--', | ||
'/usr/bin/python3', 'kibana/setup.py', 'kibana/export.json'] | ||
entrypoint: [ 'bash', 'wait-for-it.sh', 'elasticsearch:9200', '-t', '0', '--', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you please keep indentation as is? |
||
'/bin/bash', 'wait-for-it.sh', 'kibana:5601', '-t', '0', '--', | ||
'/usr/bin/python3', 'kibana/setup.py', 'kibana/export.json' ] | ||
environment: | ||
no_proxy: elasticsearch,kibana,${no_proxy} | ||
|
||
|
@@ -52,9 +52,9 @@ services: | |
context: ./components/analytics/logstash | ||
args: | ||
ELK_VERSION: 6.4.0 | ||
http_proxy: ${http_proxy} | ||
http_proxy: ${http_proxy} | ||
https_proxy: ${https_proxy} | ||
depends_on: ['cvat_elasticsearch'] | ||
depends_on: [ 'cvat_elasticsearch' ] | ||
restart: always | ||
|
||
cvat: | ||
|
@@ -63,6 +63,7 @@ services: | |
DJANGO_LOG_SERVER_PORT: 5000 | ||
DJANGO_LOG_VIEWER_HOST: kibana | ||
DJANGO_LOG_VIEWER_PORT: 5601 | ||
CVAT_ANALYTICS: 1 | ||
no_proxy: kibana,logstash,nuclio,${no_proxy} | ||
|
||
volumes: | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 | ||
``` |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -65,6 +65,7 @@ interface CVATAppProps { | |
authActionsInitialized: boolean; | ||
notifications: NotificationsState; | ||
user: any; | ||
isModelPluginActive: boolean; | ||
} | ||
|
||
class CVATApplication extends React.PureComponent<CVATAppProps & RouteComponentProps> { | ||
|
@@ -115,6 +116,7 @@ class CVATApplication extends React.PureComponent<CVATAppProps & RouteComponentP | |
userAgreementsInitialized, | ||
authActionsFetching, | ||
authActionsInitialized, | ||
isModelPluginActive, | ||
} = this.props; | ||
|
||
this.showErrors(); | ||
|
@@ -150,7 +152,7 @@ class CVATApplication extends React.PureComponent<CVATAppProps & RouteComponentP | |
loadAbout(); | ||
} | ||
|
||
if (!modelsInitialized && !modelsFetching) { | ||
if (isModelPluginActive && !modelsInitialized && !modelsFetching) { | ||
initModels(); | ||
} | ||
|
||
|
@@ -248,11 +250,12 @@ class CVATApplication extends React.PureComponent<CVATAppProps & RouteComponentP | |
switchSettingsDialog, | ||
user, | ||
keyMap, | ||
isModelPluginActive, | ||
} = this.props; | ||
|
||
const readyForRender = (userInitialized && (user == null || !user.isVerified)) | ||
|| (userInitialized && formatsInitialized | ||
&& pluginsInitialized && usersInitialized && aboutInitialized); | ||
|| (userInitialized && formatsInitialized && pluginsInitialized | ||
&& usersInitialized && aboutInitialized); | ||
|
||
const subKeyMap = { | ||
SWITCH_SHORTCUTS: keyMap.SWITCH_SHORTCUTS, | ||
|
@@ -316,7 +319,8 @@ class CVATApplication extends React.PureComponent<CVATAppProps & RouteComponentP | |
<Route exact path='/tasks/create' component={CreateTaskPageContainer} /> | ||
<Route exact path='/tasks/:id' component={TaskPageContainer} /> | ||
<Route exact path='/tasks/:tid/jobs/:jid' component={AnnotationPageContainer} /> | ||
<Route exact path='/models' component={ModelsPageContainer} /> | ||
{ isModelPluginActive | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree with Boris. It is better to show instructions how to enable the feature in UI. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it better to do in separate PR. |
||
&& <Route exact path='/models' component={ModelsPageContainer} /> } | ||
<Redirect push to='/tasks' /> | ||
</Switch> | ||
</GlobalHotKeys> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the reason to add extra spaces here?