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

[WIP] Migrated to Node 15, npm 7 #2885

Closed
wants to merge 9 commits into from
Closed
Show file tree
Hide file tree
Changes from all 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
6 changes: 2 additions & 4 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: 15

- name: Run checks
run: |
Expand All @@ -21,9 +21,7 @@ jobs:
done

if [[ ! -z ${changed_files_eslint} ]]; then
for package_files in `find -maxdepth 2 -name "package.json" -type f`; do
cd $(dirname $package_files) && npm ci && cd ${{ github.workspace }}
done
npm ci
npm install eslint-detailed-reporter --save-dev
mkdir -p eslint_report

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: 12
node-version: 15
- name: Build CVAT
env:
HOST_COVERAGE_DATA_DIR: ${{ github.workspace }}
Expand Down
7 changes: 2 additions & 5 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ patches and features.
```

```sh
# Node and npm (you can use default versions of these packages from apt (8.*, 3.*), but we would recommend to use newer versions)
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash -
sudo apt-get install -y nodejs
```

Expand Down Expand Up @@ -67,9 +66,7 @@ patches and features.
- Install npm packages for UI and start UI debug server (run the following command from CVAT root directory):

```sh
npm ci && \
cd cvat-core && npm ci && \
cd ../cvat-ui && npm ci && npm start
npm ci && cd cvat-ui && npm start
```

> Note for Mac users
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.ci
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ RUN apt-get update && \
&& \
curl https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && \
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' | tee /etc/apt/sources.list.d/google-chrome.list && \
curl https://deb.nodesource.com/setup_12.x | bash - && \
curl https://deb.nodesource.com/setup_15.x | bash - && \
DEBIAN_FRONTEND=noninteractive apt-get --no-install-recommends install -yq \
google-chrome-stable \
nodejs \
Expand Down
24 changes: 6 additions & 18 deletions Dockerfile.ui
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:lts-alpine AS cvat-ui
FROM node:15.10.0-alpine3.10 AS cvat-ui

ARG http_proxy
ARG https_proxy
Expand All @@ -18,30 +18,16 @@ ENV TERM=xterm \
RUN apk add python3 g++ make

# Install dependencies
COPY package*.json /tmp/
COPY postcss.config.js /tmp/
COPY cvat-core/package*.json /tmp/cvat-core/
COPY cvat-canvas/package*.json /tmp/cvat-canvas/
COPY cvat-canvas3d/package*.json /tmp/cvat-canvas3d/
COPY cvat-ui/package*.json /tmp/cvat-ui/
COPY cvat-data/package*.json /tmp/cvat-data/

# Install cvat-data dependencies
WORKDIR /tmp/cvat-data/
RUN npm ci

# Install cvat-core dependencies
WORKDIR /tmp/cvat-core/
RUN npm ci

# Install cvat-canvas dependencies
WORKDIR /tmp/cvat-canvas/
RUN npm ci

# Install cvat-canvas dependencies
WORKDIR /tmp/cvat-canvas3d/
RUN npm ci

# Install cvat-ui dependencies
WORKDIR /tmp/cvat-ui/
WORKDIR /tmp
RUN npm ci

# Build source code
Expand All @@ -50,6 +36,8 @@ COPY cvat-core/ /tmp/cvat-core/
COPY cvat-canvas3d/ /tmp/cvat-canvas3d/
COPY cvat-canvas/ /tmp/cvat-canvas/
COPY cvat-ui/ /tmp/cvat-ui/

WORKDIR /tmp/cvat-ui
RUN npm run build

FROM nginx:stable-alpine
Expand Down
Loading