From 1aae45b7d3cf3d0cce0e0868a5767c01d5b3dbf9 Mon Sep 17 00:00:00 2001 From: liukuikun <24622904+Harold-lkk@users.noreply.github.com> Date: Thu, 10 Feb 2022 09:41:36 +0800 Subject: [PATCH] [Docs] Relax mmcv version requirement (#775) * update ci and readme * Update docs/en/install.md * Update docs/zh_cn/install.md Co-authored-by: Tong Gao --- .github/workflows/build.yml | 18 +++++++++--------- docs/en/install.md | 8 ++++++++ docs/zh_cn/install.md | 8 ++++++++ 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 524f1f85..cfc64f80 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -87,24 +87,24 @@ jobs: torch: [1.6.0+cu101, 1.7.0+cu101, 1.8.0+cu101] include: - torch: 1.6.0+cu101 - torch_version: 1.6.0 + torch_version: 1.6 torchvision: 0.7.0+cu101 - torch: 1.7.0+cu101 - torch_version: 1.7.0 + torch_version: 1.7 torchvision: 0.8.1+cu101 - torch: 1.8.0+cu101 - torch_version: 1.8.0 + torch_version: 1.8 torchvision: 0.9.0+cu101 - torch: 1.8.0+cu101 - torch_version: 1.8.0 + torch_version: 1.8 torchvision: 0.9.0+cu101 python-version: 3.6 - torch: 1.8.0+cu101 - torch_version: 1.8.0 + torch_version: 1.8 torchvision: 0.9.0+cu101 python-version: 3.8 - torch: 1.8.0+cu101 - torch_version: 1.8.0 + torch_version: 1.8 torchvision: 0.9.0+cu101 python-version: 3.9 steps: @@ -176,14 +176,14 @@ jobs: torch: [1.9.0+cu102] include: - torch: 1.9.0+cu102 - torch_version: 1.9.0 + torch_version: 1.9 torchvision: 0.10.0+cu102 - torch: 1.9.0+cu102 - torch_version: 1.9.0 + torch_version: 1.9 torchvision: 0.10.0+cu102 python-version: 3.8 - torch: 1.9.0+cu102 - torch_version: 1.9.0 + torch_version: 1.9 torchvision: 0.10.0+cu102 python-version: 3.9 steps: diff --git a/docs/en/install.md b/docs/en/install.md index 81e9f150..bd084602 100644 --- a/docs/en/install.md +++ b/docs/en/install.md @@ -57,6 +57,14 @@ Please replace ``{cu_version}`` and ``{torch_version}`` in the url with your des pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu110/torch1.7.0/index.html ``` :::{note} +mmcv-full is only compiled on PyTorch 1.x.0 because the compatibility usually holds between 1.x.0 and 1.x.1. If your PyTorch version is 1.x.1, you can install mmcv-full compiled with PyTorch 1.x.0 and it usually works well. + + ``` + # We can ignore the micro version of PyTorch + pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu110/torch1.7/index.html + ``` +::: +:::{note} Note that mmocr 0.2.1 or later requires mmcv 1.3.8 or later. If it compiles during installation, then please check that the CUDA version and PyTorch version **exactly** matches the version in the `mmcv-full` installation command. For example, PyTorch 1.7.0 and 1.7.1 are treated differently. diff --git a/docs/zh_cn/install.md b/docs/zh_cn/install.md index 30065e04..20ea11d4 100644 --- a/docs/zh_cn/install.md +++ b/docs/zh_cn/install.md @@ -55,6 +55,14 @@ pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/{cu_version}/{ pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu110/torch1.7.0/index.html ``` :::{note} +PyTorch 在 1.x.0 和 1.x.1 之间通常是兼容的,故 mmcv-full 只提供 1.x.0 的编译包。如果你的 PyTorch 版本是 1.x.1,你可以放心地安装在 1.x.0 版本编译的 mmcv-full。 + +``` +# 我们可以忽略 PyTorch 的小版本号 +pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu110/torch1.7/index.html +``` +::: +:::{note} 使用 mmocr 0.2.0 及更高版本需要安装 mmcv 1.3.4 或更高版本。 如果安装时进行了编译过程,请再次确认安装的 `mmcv-full` 版本与环境中 CUDA 和 PyTorch 的版本匹配。即使是 PyTorch 1.7.0 和 1.7.1,`mmcv-full` 的安装版本也是有区别的。