mirror of https://github.com/hpcaitech/ColossalAI
[doc] updated readme regarding pypi installation (#2406)
parent
d3f5ce9efb
commit
85e045b063
|
@ -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>
|
||||
|
|
28
README.md
28
README.md
|
@ -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 .
|
||||
```
|
||||
|
|
Loading…
Reference in New Issue