Skip to content
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

Fix AWS deployment #1316

Merged
merged 9 commits into from
Mar 26, 2020
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
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
5 changes: 2 additions & 3 deletions Dockerfile.ui
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ ENV TERM=xterm \
http_proxy=${http_proxy} \
https_proxy=${https_proxy} \
no_proxy=${no_proxy} \
socks_proxy=${socks_proxy}

ENV LANG='C.UTF-8' \
socks_proxy=${socks_proxy} \
LANG='C.UTF-8' \
LC_ALL='C.UTF-8'

# Install dependencies
Expand Down
381 changes: 195 additions & 186 deletions cvat-ui/package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions cvat-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"eslint-plugin-react": "^7.17.0",
"eslint-plugin-react-hooks": "^1.7.0",
"html-webpack-plugin": "^3.2.0",
"less": "^3.10.3",
"less": "^3.11.1",
nmanovic marked this conversation as resolved.
Show resolved Hide resolved
"less-loader": "^5.0.0",
"node-sass": "^4.13.0",
"postcss-loader": "^3.0.0",
Expand All @@ -42,7 +42,7 @@
"style-loader": "^1.0.0",
"tsconfig-paths-webpack-plugin": "^3.2.0",
"typescript": "^3.7.3",
"webpack": "^4.41.2",
"webpack": "^4.42.1",
"webpack-cli": "^3.3.8",
"webpack-dev-server": "^3.8.0"
},
Expand Down
2 changes: 1 addition & 1 deletion cvat-ui/src/components/cvat-app.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
//
// SPDX-License-Identifier: MIT

import 'antd/dist/antd.less';
import 'antd/dist/antd.css';
import '../styles.scss';
import React from 'react';
import { Switch, Route, Redirect } from 'react-router';
Expand Down
10 changes: 5 additions & 5 deletions cvat-ui/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ module.exports = {
},
},
}, {
test: /node_modules\/antd\/[\w\/]*.less$/,
use: ['style-loader', 'css-loader', {
loader: 'less-loader',
test: /node_modules\/antd\/[\w\/]*.css$/,
use: ['style-loader', {
loader: 'css-loader',
options: {
javascriptEnabled: true,
importLoaders: 2,
},
}]
}, 'postcss-loader']
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just removing exclued: /node_modules/ in the rule below will work?

Or another option is to change importLoaders to 1 as it specified here

}, {
test: /\.(css|scss)$/,
exclude: /node_modules/,
Expand Down
28 changes: 7 additions & 21 deletions cvat/apps/documentation/AWS-Deployment-Guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,15 @@ There are two ways of deploying the CVAT.
1. **On Nvidia GPU Machine:** Tensorflow annotation feature is dependent on GPU hardware. One of the easy ways to launch CVAT with the tf-annotation app is to use AWS P3 instances, which provides the NVIDIA GPU. Read more about [P3 instances here.](https://aws.amazon.com/about-aws/whats-new/2017/10/introducing-amazon-ec2-p3-instances/)
Overall setup instruction is explained in [main readme file](https://github.com/opencv/cvat/), except Installing Nvidia drivers. So we need to download the drivers and install it. For Amazon P3 instances, download the Nvidia Drivers from Nvidia website. For more check [Installing the NVIDIA Driver on Linux Instances](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/install-nvidia-driver.html) link.

2. **On Any other AWS Machine:** We can follow the same instruction guide mentioned in the [Readme file](https://github.com/opencv/cvat/). The additional step is to add a [security group and rule to allow incoming connections](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html).
2. **On Any other AWS Machine:** We can follow the same instruction guide mentioned in the
[installation instructions](https://github.com/opencv/cvat/blob/master/cvat/apps/documentation/installation.md).
The additional step is to add a [security group and rule to allow incoming connections](https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/using-network-security.html).

For any of above, don't forget to add exposed AWS public IP address and port to `docker-compose.override.yml`:

You need at least 2 opened ports on your Amazon instance, for UI and Django apps.
For any of above, don't forget to add exposed AWS public IP address or hostname to `docker-compose.override.yml`:

```
version: "2.3"

services:
cvat:
cvat_proxy:
environment:
UI_HOST: *your Amazon AWS instance's url or IP*
UI_PORT: *port for UI app*
ports:
- "REACT_APP_API_PORT specified below:8080"


cvat_ui:
build:
args:
REACT_APP_API_HOST: *your Amazon AWS instance's url or IP*
REACT_APP_API_PORT: *port for Django app*
ports:
- "UI_PORT specified above":80"
```
CVAT_HOST: your-instance.amazonaws.com
```
6 changes: 4 additions & 2 deletions cvat_proxy/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@ http {
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
# For long domain names (e.g. AWS hosts)
server_names_hash_bucket_size 128;

include /etc/nginx/conf.d/*.conf;
client_max_body_size 0;
include /etc/nginx/conf.d/*.conf;
client_max_body_size 0;
}