[doc] updated readme regarding pypi installation (#2406)

pull/2410/head
Frank Lee 2023-01-09 17:08:55 +08:00 committed by GitHub
parent d3f5ce9efb
commit 85e045b063
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 58 additions and 16 deletions

View File

@ -255,6 +255,28 @@ Colossal-AI 为您提供了一系列并行组件。我们的目标是让您的
## 安装
### 从PyPI安装
您可以用下面的命令直接从PyPI上下载并安装Colossal-AI。我们默认不会安装PyTorch扩展包
```bash
pip install colossalai
```
但是如果你想在安装时就直接构建PyTorch扩展您可以设置环境变量`CUDA_EXT=1`.
```bash
CUDA_EXT=1 pip install colossalai
```
**否则PyTorch扩展只会在你实际需要使用他们时在运行时里被构建。**
与此同时我们也每周定时发布Nightly版本这能让你提前体验到新的feature和bug fix。你可以通过以下命令安装Nightly版本。
```bash
pip install colossalai-nightly
```
### 从官方安装
您可以访问我们[下载](https://www.colossalai.org/download)页面来安装Colossal-AI在这个页面上发布的版本都预编译了CUDA扩展。
@ -274,10 +296,10 @@ pip install -r requirements/requirements.txt
pip install .
```
如果您不想安装和启用 CUDA 内核融合(使用融合优化器时强制安装):
我们默认在`pip install`时不安装PyTorch扩展而是在运行时临时编译如果你想要提前安装这些扩展的话在使用融合优化器时会用到可以使用一下命令。
```shell
NO_CUDA_EXT=1 pip install .
CUDA_EXT=1 pip install .
```
<p align="right">(<a href="#top">返回顶端</a>)</p>

View File

@ -257,9 +257,32 @@ Acceleration of [AlphaFold Protein Structure](https://alphafold.ebi.ac.uk/)
## Installation
### Install from PyPI
You can easily install Colossal-AI with the following command. **By defualt, we do not build PyTorch extensions during installation.**
```bash
pip install colossalai
```
However, if you want to build the PyTorch extensions during installation, you can set `CUDA_EXT=1`.
```bash
CUDA_EXT=1 pip install colossalai
```
**Otherwise, CUDA kernels will be built during runtime when you actually need it.**
We also keep release the nightly version to PyPI on a weekly basis. This allows you to access the unreleased features and bug fixes in the main branch.
Installation can be made via
```bash
pip install colossalai-nightly
```
### Download From Official Releases
You can visit the [Download](https://www.colossalai.org/download) page to download Colossal-AI with pre-built CUDA extensions.
You can visit the [Download](https://www.colossalai.org/download) page to download Colossal-AI with pre-built PyTorch extensions.
### Download From Source
@ -270,9 +293,6 @@ You can visit the [Download](https://www.colossalai.org/download) page to downlo
git clone https://github.com/hpcaitech/ColossalAI.git
cd ColossalAI
# install dependency
pip install -r requirements/requirements.txt
# install colossalai
pip install .
```