From 3dc4371f984319db2b0057df049d9f96e011189d Mon Sep 17 00:00:00 2001 From: Alexander Ivkin Date: Thu, 10 Mar 2022 10:53:14 -0500 Subject: [PATCH] Feature/fixed build macos (#4414) --- CHANGELOG.md | 1 + cvat/requirements/base.txt | 8 ++++---- .../contributing/development-environment.md | 20 ++++++++++++++++++- 3 files changed, 24 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 43166e4b..22dde342 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -64,6 +64,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - API versioning scheme: using accept header versioning instead of namespace versioning () - Replaced 'django_sendfile' with 'django_sendfile2' () - Use drf-spectacular instead of drf-yasg for swagger documentation () +- Update development-environment manual to work under MacOS, supported Mac with Apple Silicon () ### Deprecated - Job field "status" is not used in UI anymore, but it has not been removed from the database yet () diff --git a/cvat/requirements/base.txt b/cvat/requirements/base.txt index e2a98b2e..72db5421 100644 --- a/cvat/requirements/base.txt +++ b/cvat/requirements/base.txt @@ -32,17 +32,17 @@ drf-spectacular==0.21.2 Shapely==1.7.1 pdf2image==1.14.0 django-rest-auth[with_social]==0.9.5 -opencv-python-headless==4.4.0.42 -h5py==2.10.0 +opencv-python-headless==4.5.5.62 +h5py==3.6.0 django-cors-headers==3.5.0 furl==2.1.0 av==8.0.2 --no-binary=av -tensorflow==2.8.0 # Optional requirement of Datumaro +tensorflow==2.8.0 # Optional requirement of Datumaro. Use tensorflow-macos==2.8.0 for Mac M1 # The package is used by pyunpack as a command line tool to support multiple # archives. Don't use as a python module because it has GPL license. patool==1.12 diskcache==5.0.2 -open3d==0.11.2 +open3d==0.14.1 boto3==1.17.61 azure-storage-blob==12.8.1 google-cloud-storage==1.42.0 diff --git a/site/content/en/docs/contributing/development-environment.md b/site/content/en/docs/contributing/development-environment.md index 812b1f2c..7150d1f4 100644 --- a/site/content/en/docs/contributing/development-environment.md +++ b/site/content/en/docs/contributing/development-environment.md @@ -23,7 +23,7 @@ description: 'Installing a development environment for different operating syste MacOS 10.15 ```bash - brew install git python pyenv redis curl openssl node + brew install git python pyenv redis curl openssl node sqlite3 geos ``` - Install Chrome @@ -42,6 +42,10 @@ description: 'Installing a development environment for different operating syste - [licenser](https://marketplace.visualstudio.com/items?itemName=ymotongpoo.licenser) - [Trailing Spaces](https://marketplace.visualstudio.com/items?itemName=shardulm94.trailing-spaces) +- Make sure to use Python 3.9.0 or higher + ``` + python3 --version + ``` - Install CVAT on your local host: @@ -61,6 +65,20 @@ description: 'Installing a development environment for different operating syste > 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 + > + > Make sure Homebrew lib path is in `DYLD_LIBRARY_PATH`. For Apple Silicon: `export DYLD_LIBRARY_PATH=/opt/homebrew/lib:$DYLD_LIBRARY_PATH` + > + > Homebrew will install FFMpeg 5.0 by default, which does not work, so you should install 4.X. + > You can install older 4.X FFMpeg using Homebrew like that: + > ``` + > cd "$(brew --repo homebrew/core)" + > git checkout addd616edc9134f057e33694c420f4900be59db8 + > brew unlink ffmpeg + > HOMEBREW_NO_AUTO_UPDATE=1 brew install ffmpeg + > git checkout master + > ``` + > On Mac with Apple Silicon (M1) in order to install TensorFlow you will have to edit `cvat/requirements/base.txt`. + > Change `tensorflow` to `tensorflow-macos` - Create a super user for CVAT: