Skip to content

Commit

Permalink
refine
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouzaida committed Jul 24, 2022
1 parent 567dd97 commit 6f625a9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
22 changes: 12 additions & 10 deletions README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,17 +55,19 @@ MMCV 支持多种平台,包括:

MMCV 有两个版本:

- **mmcv-full**: 完整版,包含所有的特性以及丰富的开箱即用的 CUDA 算子。
- **mmcv**: 精简版,不包含 CUDA 算子但包含其余所有特性和功能,类似 MMCV 1.0 之前的版本。如果你不需要使用 CUDA 算子的话,精简版可以作为一个考虑选项。
- **mmcv-full**: 完整版,包含所有的特性以及丰富的开箱即用的 CPU 和 CUDA 算子。
- **mmcv**: 精简版,不包含 CPU 和 CUDA 算子但包含其余所有特性和功能,类似 MMCV 1.0 之前的版本。如果你不需要使用算子的话,精简版可以作为一个考虑选项。

**注意**: 请不要在同一个环境中安装两个版本,否则可能会遇到类似 `ModuleNotFound` 的错误。在安装一个版本之前,需要先卸载另一个。`如果CUDA可用,强烈推荐安装mmcv-full`

### 安装 mmcv-full

在安装 mmcv-full 之前,请确保 PyTorch 已经成功安装在环境中,可以参考 [PyTorch 官方安装文档](https://github.com/pytorch/pytorch#installation)

在 Linux 和 Windows 平台安装 mmcv-full 的命令如下
在 Linux 和 Windows 平台安装 mmcv-full 的命令如下(如果你的系统是 macOS,请参考[源码安装 mmcv-full](https://mmcv.readthedocs.io/zh_CN/latest/get_started/build.html#macos-mmcv-full)

```bash
pip install openmim
pip install -U openmim
mim install mmcv-full
```

Expand All @@ -75,19 +77,19 @@ mim install mmcv-full
mim install mmcv-full==1.5.0
```

如果发现上述的安装命令没有使用 mmcv-full 预编译包安装,则表示没有提供对应 PyTorch 或者 CUDA 或者 mmcv-full 版本的预编译包,此时,请参考[源码安装 mmcv-full](https://mmcv.readthedocs.io/zh_CN/latest/get_started/build.html#mmcv-full)
如果发现上述的安装过程没有使用 mmcv-full 预编译包安装,则可能是没有对应 PyTorch 或者 CUDA 或者 mmcv-full 版本的预编译包,那么,你可能需要[源码安装 mmcv-full](https://mmcv.readthedocs.io/zh_CN/latest/get_started/build.html#mmcv-full)

如果想要在 macOS 平台安装 mmcv-full,请参考[源码安装 mmcv-full](https://mmcv.readthedocs.io/zh_CN/latest/get_started/build.html#macos-mmcv-full)
更多安装方式请参考[安装文档](https://mmcv.readthedocs.io/zh_CN/latest/get_started/installation.html)

### 安装 mmcv

如果你需要使用和 PyTorch 相关的模块,请确保 PyTorch 已经成功安装在环境中,可以参考 [PyTorch 官方安装文档](https://github.com/pytorch/pytorch#installation)

```bash
pip install openmim
pip install -U openmim
mim install mmcv
```

如果想从源码编译 MMCV,请参考[源码安装 mmcv](https://mmcv.readthedocs.io/zh_CN/latest/get_started/build.html#mmcv)

## 支持的部分开源项目

- [MIM](https://github.com/open-mmlab/mim): MIM 是 OpenMMlab 项目、算法、模型的统一入口
Expand All @@ -111,7 +113,7 @@ mim install mmcv

## FAQ

如果你遇到了安装问题,CUDA 相关的问题或者 RuntimeErrors,可以首先参考[问题解决页面](https://mmcv.readthedocs.io/zh_CN/latest/faq.html)查看是否已经有解决方案。如果问题没有解决,欢迎提 [issue](https://github.com/open-mmlab/mmcv/issues)
如果你遇到了安装问题,CUDA 相关的问题或者 RuntimeError,可以先参考[问题解决页面](https://mmcv.readthedocs.io/zh_CN/latest/faq.html)查看是否已有解决方案。如果问题仍然没有解决,欢迎提 [issue](https://github.com/open-mmlab/mmcv/issues)

## 贡献指南

Expand Down
8 changes: 5 additions & 3 deletions docs/zh_cn/get_started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
MMCV 有两个版本:

- **mmcv-full**: 完整版,包含所有的特性以及丰富的开箱即用的 CPU 和 CUDA 算子。注意完整版本可能需要更长时间来编译。
- **mmcv**: 精简版,不包含 CPU 和 CUDA 算子但包含其余所有特性和功能,类似 MMCV 1.0 之前的版本。如果你不需要使用 CUDA 算子的话,精简版可以作为一个考虑选项。
- **mmcv**: 精简版,不包含 CPU 和 CUDA 算子但包含其余所有特性和功能,类似 MMCV 1.0 之前的版本。如果你不需要使用算子的话,精简版可以作为一个考虑选项。

```{warning}
请不要在同一个环境中安装两个版本,否则可能会遇到类似 `ModuleNotFound` 的错误。在安装一个版本之前,需要先卸载另一个。`如果CUDA可用,强烈推荐安装mmcv-full`。
Expand Down Expand Up @@ -49,7 +49,7 @@ mim install mmcv-full -i https://pypi.tuna.tsinghua.edu.cn/simple

安装完成后可以运行 [check_installation.py](https://github.com/open-mmlab/mmcv/.dev_scripts/check_installation.py) 脚本检查 mmcv-full 是否安装成功。

如果发现上述的安装命令没有使用 mmcv-full 预编译包安装,则表示没有提供对应 PyTorch 或者 CUDA 或者 mmcv-full 版本的预编译包,此时,请参考[源码安装 mmcv-full](https://mmcv.readthedocs.io/zh_CN/latest/get_started/build.html)
如果发现上述的安装命令没有使用 mmcv-full 预编译包安装,则可能是没有对应 PyTorch 或者 CUDA 或者 mmcv-full 版本的预编译包,那么,你可能需要[源码安装 mmcv-full](https://mmcv.readthedocs.io/zh_CN/latest/get_started/build.html)

#### 使用 pip 安装

Expand Down Expand Up @@ -123,7 +123,7 @@ pip install mmcv-full -f https://download.openmmlab.com/mmcv/dist/cu111/torch1.9

:::

如果上面的下拉框中没有找到对应的版本,则表示没有提供对应 PyTorch 或者 CUDA 或者 mmcv-full 版本的预编译包,此时,请参考[源码安装 mmcv-full](https://mmcv.readthedocs.io/zh_CN/latest/get_started/build.html)
如果上面的下拉框中没有找到对应的版本,则可能是没有对应 PyTorch 或者 CUDA 或者 mmcv-full 版本的预编译包,那么,你可能需要[源码安装 mmcv-full](https://mmcv.readthedocs.io/zh_CN/latest/get_started/build.html)

#### 使用 docker 镜像

Expand Down Expand Up @@ -162,6 +162,8 @@ docker build -t mmcv -f docker/release/Dockerfile \

### 安装 mmcv

如果你需要使用和 PyTorch 相关的模块,请确保 PyTorch 已经成功安装在环境中,可以参考 [PyTorch 官方安装文档](https://github.com/pytorch/pytorch#installation)

```python
pip install mmcv
```

0 comments on commit 6f625a9

Please sign in to comment.