From f6766c71871a9762df4368c493ef358931950ad8 Mon Sep 17 00:00:00 2001 From: Vitaliy Nishukov Date: Mon, 14 Sep 2020 16:53:11 +0300 Subject: [PATCH 1/5] Add Mac OS dependencies notes --- CONTRIBUTING.md | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index afa51684a0b1..6154280597dd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,7 +10,21 @@ patches and features. ## Development environment -Next steps should work on clear Ubuntu 18.04. +## Mac OS 10.15 + +- Install necessary dependencies: + ```sh + brew install git python pyenv redis curl openssl + ``` + +- Install Python 3.6 + ```sh + pyenv update + pyenv install -v 3.6 + pyenv global 3.6 + ``` + +## Ubuntu 18.04 - Install necessary dependencies: ```sh @@ -21,6 +35,7 @@ Next steps should work on clear Ubuntu 18.04. # 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 - sudo apt-get install -y nodejs + ``` - Install [Visual Studio Code](https://code.visualstudio.com/docs/setup/linux#_debian-and-ubuntu-based-distributions) for development @@ -53,6 +68,15 @@ for development cd cvat-core && npm install && \ cd ../cvat-ui && npm install && npm start ``` + ## Note for Mac users + If you faced with error + ```sh + Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (57) + ``` + Run command below and reinstall npm packages for all projects again + ```sh + npm rebuild node-sass + ``` - Open new terminal (Ctrl + Shift + T), run Visual Studio Code from the virtual environment ```sh From 034eb2367b0275204fea8aba6b68c2af29c77cb3 Mon Sep 17 00:00:00 2001 From: Vitaliy Nishukov Date: Tue, 22 Sep 2020 18:16:43 +0300 Subject: [PATCH 2/5] Comments fix --- CONTRIBUTING.md | 62 ++++++++++++++++++++++++++++--------------------- 1 file changed, 35 insertions(+), 27 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6154280597dd..a8ba46b607fb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -9,34 +9,25 @@ they should reciprocate that respect in addressing your issue or assessing patches and features. ## Development environment - -## Mac OS 10.15 - - Install necessary dependencies: - ```sh - brew install git python pyenv redis curl openssl - ``` -- Install Python 3.6 - ```sh - pyenv update - pyenv install -v 3.6 - pyenv global 3.6 - ``` - -## Ubuntu 18.04 - -- Install necessary dependencies: + Ubuntu 18.04 ```sh sudo apt-get update && sudo apt-get --no-install-recommends install -y build-essential curl redis-server python3-dev python3-pip python3-venv python3-tk libldap2-dev libsasl2-dev pkg-config libavformat-dev libavcodec-dev libavdevice-dev libavutil-dev libswscale-dev libswresample-dev libavfilter-dev ``` - Please make sure you have installed FFmpeg libraries (libav*) version 4.0 or higher. ```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 - sudo apt-get install -y nodejs ``` + MacOS 10.15 + ```sh + brew install git python pyenv redis curl openssl node + ``` + +- Install FFmpeg libraries (libav*) version 4.0 or higher. + - Install [Visual Studio Code](https://code.visualstudio.com/docs/setup/linux#_debian-and-ubuntu-based-distributions) for development @@ -44,7 +35,7 @@ for development ```sh git clone https://github.com/opencv/cvat cd cvat && mkdir logs keys - python3 -m venv .env + python -m venv .env . .env/bin/activate pip install -U pip wheel setuptools pip install -r cvat/requirements/development.txt @@ -52,6 +43,23 @@ for development python manage.py migrate python manage.py collectstatic ``` + > Note for Mac users + > + > You may need to reinstal python as a first quick solution if you are faced with errors on step + > + > ```pip install -r cvat/requirements/development.txt``` + > + > Run commands below + > + > ```$ sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.8 && sudo rm -rf '/Applications/Python 3.8' && sudo rm -rf /usr/local/bin/python3``` + > + > ```$ pyenv update && pyenv install -v 3.8 && pyenv global 3.8``` + > + > Then start from the very beginning from step + > + > ```$ python -m venv .env``` + > + > ```...``` - Create a super user for CVAT: ```sh @@ -68,15 +76,15 @@ for development cd cvat-core && npm install && \ cd ../cvat-ui && npm install && npm start ``` - ## Note for Mac users - If you faced with error - ```sh - Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (57) - ``` - Run command below and reinstall npm packages for all projects again - ```sh - npm rebuild node-sass - ``` + > Note for Mac users + > + > If you faced with error + > + > ```Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (57)``` + > + > Run command below and reinstall npm packages for all projects again + > + > ```$ npm rebuild node-sass``` - Open new terminal (Ctrl + Shift + T), run Visual Studio Code from the virtual environment ```sh From 5d33074318bfc5c75a71f8cd9527852eb9312365 Mon Sep 17 00:00:00 2001 From: Vitaliy Nishukov Date: Tue, 22 Sep 2020 18:22:33 +0300 Subject: [PATCH 3/5] Description in CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b7bfb24b625..aa9a696b0378 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - [Datumaro] CLI command for dataset equality comparison () - [Datumaro] Merging of datasets with different labels () - Add FBRS interactive segmentation serverless function () +- MacOS users notes in CONTRIBUTING.md ### Changed - UI models (like DEXTR) were redesigned to be more interactive () From f520c997aeaecff54bf71afe16c0f1c879b0276d Mon Sep 17 00:00:00 2001 From: Vitaliy Nishukov Date: Wed, 23 Sep 2020 12:51:38 +0300 Subject: [PATCH 4/5] CONTRIBUTING.md comments fix --- CONTRIBUTING.md | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 566164f3872c..4698091c4e42 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -35,7 +35,7 @@ for development ```sh git clone https://github.com/opencv/cvat cd cvat && mkdir logs keys - python -m venv .env + python3 -m venv .env . .env/bin/activate pip install -U pip wheel setuptools pip install -r cvat/requirements/development.txt @@ -44,21 +44,7 @@ for development ``` > Note for Mac users > - > You may need to reinstal python as a first quick solution if you are faced with errors on step - > - > ```pip install -r cvat/requirements/development.txt``` - > - > Run commands below - > - > ```$ sudo rm -rf /Library/Frameworks/Python.framework/Versions/3.8 && sudo rm -rf '/Applications/Python 3.8' && sudo rm -rf /usr/local/bin/python3``` - > - > ```$ pyenv update && pyenv install -v 3.8 && pyenv global 3.8``` - > - > Then start from the very beginning from step - > - > ```$ python -m venv .env``` - > - > ```...``` + > If you have any problems with installing dependencies from ```cvat/requirements/*.txt``` files, you may need to reinstall your system python. In some cases after system update it can be configured incorrectly and cannot compile some native modules - Create a super user for CVAT: ```sh @@ -81,9 +67,7 @@ for development > > ```Node Sass does not yet support your current environment: OS X 64-bit with Unsupported runtime (57)``` > - > Run command below and reinstall npm packages for all projects again - > - > ```$ npm rebuild node-sass``` + > Read this article [Node Sass does not yet support your current environment](https://marketplace.visualstudio.com/items?itemName=msjsdiag.debugger-for-chrome) - Open new terminal (Ctrl + Shift + T), run Visual Studio Code from the virtual environment ```sh From 4ca198010004e76cb4fe7830c15ee76c3c3e5344 Mon Sep 17 00:00:00 2001 From: Vitaliy Nishukov Date: Wed, 23 Sep 2020 14:52:23 +0300 Subject: [PATCH 5/5] Linter rules HF --- CONTRIBUTING.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 4698091c4e42..2af4e667e0cc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -44,7 +44,9 @@ for development ``` > Note for Mac users > - > If you have any problems with installing dependencies from ```cvat/requirements/*.txt``` files, you may need to reinstall your system python. In some cases after system update it can be configured incorrectly and cannot compile some native modules + > If you have any problems with installing dependencies from + > ```cvat/requirements/*.txt```, you may need to reinstall your system python + > In some cases after system update it can be configured incorrectly and cannot compile some native modules - Create a super user for CVAT: ```sh