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

[Docs] Add brief installation steps in README(_zh-CN).md #800

Merged
merged 2 commits into from
Mar 19, 2022
Merged
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
29 changes: 28 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,34 @@ Please refer to [changelog.md](docs/en/changelog.md) for details and release his

## Installation

Please refer to [install.rst](docs/en/install.rst) for installation.
MMEditing depends on [PyTorch](https://pytorch.org/) and [MMCV](https://github.com/open-mmlab/mmcv).
Below are quick steps for installation.

**Step 1.**
Install PyTorch following [official instructions](https://pytorch.org/get-started/locally/), e.g.
Copy link

@ZwwWayne ZwwWayne Mar 23, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest simply putting a script here for copy-paste.

conda create -n open-mmlab python=3.7 -y
conda activate open-mmlab
conda install cudatoolkit=11.0 pytorch=1.9 -c pytorch -y
pip install openmim
mim install mmcv-full
git clone https://github.com/open-mmlab/mmediting.git
cd mmediting && pip install -e .

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think three pieces of code are better.

  • Github provides functions to copy by a single click, so coping three pieces does not require more effort.
  • Multiple commands are buggier when they are interrupted by errors. Command followed will still execute to cause more errors. For example if conda commands failed, the following pip install will install to another environment (probably base or the OS's python environment) and may even break that environment.
  • Multiple sections separated by functionalities are clear to show and we can also add some descriptive words.

If this is considered too long to show in README we can move it to docs.
And if one prefer conda install pytorch instead of pip, this PR #816 changed it.


```
pip3 install torch torchvision
```

**Step 2.**
Install MMCV with [MIM](https://github.com/open-mmlab/mim).

```
pip3 install openmim
mim install mmcv-full
```

**Step 3.**
Install MMEditing from source.

```
git clone https://github.com/open-mmlab/mmediting.git
cd mmediting
pip3 install -e .[all]
```

Please refer to [install.md](docs/en/install.rst) for more detailed instruction.

## Getting Started

Expand Down
28 changes: 27 additions & 1 deletion README_zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,33 @@ MMEditing 缜密地设计新的框架并将其精心实现,希望能够为您

## 安装

请参考[安装指南](docs/zh_cn/install.md)进行安装。
MMEditing 依赖 [PyTorch](https://pytorch.org/) 和 [MMCV](https://github.com/open-mmlab/mmcv),以下是安装的简要步骤。

**步骤 1.**
依照[官方教程](https://pytorch.org/get-started/locally/)安装PyTorch,例如

```
pip3 install torch torchvision
```

**步骤 2.**
使用 [MIM](https://github.com/open-mmlab/mim) 安装 MMCV

```
pip3 install openmim
mim install mmcv-full
```

**步骤 3.**
从源码安装 MMEditing

```
git clone https://github.com/open-mmlab/mmediting.git
cd mmediting
pip3 install -e .[all]
```

更详细的安装指南请参考 [install.md](docs/en/install.rst) .

## 开始使用

Expand Down