update installation in README

This commit is contained in:
root 2022-09-07 15:32:40 +08:00
parent 83622edc97
commit 2c8279ebe8
4 changed files with 87 additions and 113 deletions

View File

@ -2,6 +2,7 @@
![Jittor Logo](https://cg.cs.tsinghua.edu.cn/jittor/favicon_package_v0/JittorLogo_Final1220.svg)
[快速开始](#快速开始) | [安装](#安装) | [教程](#教程) | [English](./README.md)
@ -18,6 +19,7 @@ Jittor前端语言为Python。前端使用了模块化和动态图执行的设
* [Jittor文档](https://cg.cs.tsinghua.edu.cn/jittor/assets/docs/index.html)
* [Github](https://github.com/jittor/jittor) [Gitee](https://gitee.com/jittor/jittor)
* [Jittor 论坛](https://discuss.jittor.org/)
* [Jittor 精选仓库](https://github.com/Jittor/jittor/blob/master/AWESOME-JITTOR-LIST.md)
* 即时通信: QQ Group(761222083)
@ -88,40 +90,18 @@ for i,(x,y) in enumerate(get_data(n)):
## 安装
Jittor框架对环境要求如下:
Jittor 支持**Linux**(e.g. Ubuntu/CentOS/Arch), **macOS**,**Windows** 其中**Linux**和**macOS**的依赖如下:
* Python版本 >= 3.7
* C++编译器 (需要下列至少一个)
- g++ >=5.4.0 for linux
- clang >=8.0 for mac
* GPU 编译器可选nvcc >=10.0
* GPU 加速库可选cudnn-dev (cudnn开发版, 推荐使用tar安装方法[参考链接](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installlinux-tar))
Jittor 目前还支持主流国产Linux操作系统如统信、麒麟、普华、龙芯Loongnix安装方式可参考 Linux pip安装方法准备好python和g++即可。
**Windows**对环境的要求为:
* Python版本 >= 3.8(建议从Python官网安装<https://www.python.org/downloads/windows/>)
* x86_64处理器
* Windows 10及以上。
如果您不希望手动配置环境,我们推荐使用 Docker 进行安装。
除此之外,您还可以使用 pip 安装和手动安装。
注意1macOS 用户需要安装额外依赖,请参考 [macOS 安装](#macOS-安装)。
| OS | CPU | Python | Compiler | (Optional) GPU platform |
|--------------------------------------------------------|-------------------------------------|--------|--------------|---------------------------------------------|
| Linux<br>(Ubuntu, CentOS, Arch, <br>UOS, KylinOS, ...) | x86 <br>x86_64 <br>ARM <br>loongson | >= 3.7 | g++ >=5.4 | Nvidia CUDA >= 10.0, [cuDNN](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installlinux-tar) <br> or [AMD ROCm](https://docs.amd.com/) >= 4.0 <br> or [Hygon DCU DTK](https://tycloud.hpccube.com/doc/1.0.6/11277/general-handbook/software-tutorial/jittor.html) >= 22.04 |
| macOS <br>(>= 10.14 Mojave) | intel<br>Apple Silicon | >= 3.7 | clang >= 8.0 | - |
| Windows 10 & 11 | x86_64 | [>= 3.8](https://www.python.org/downloads/windows/) | - | Nvidia CUDA >= 10.2 [cuDNN](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#install-windows) |
Jittor 提供了三种安装方法pip、docker和手动安装
## Pip 安装
@ -142,11 +122,11 @@ jittor会自动在路径中寻找合适的编译器, 如果您希望手动指定
### macOS 安装
macOS 请使用 [homebrew](https://brew.sh) 安装额外的依赖 (python>=3.7, onednn)
macOS 请使用 [homebrew](https://brew.sh) 安装额外的依赖。
```bash
brew install python@3.7 onednn libomp
brew install onednn libomp
```
之后您可以通过 pip 安装 jittor并测试是否可以成功运行。
@ -157,7 +137,7 @@ python3.7 -m pip install jittor
python3.7 -m jittor.test.test_example
```
目前在macOS中jittor 只支持 CPU 计算。
目前在 macOS jittor 只支持 CPU 计算。
### Windows安装
@ -439,3 +419,4 @@ Jittor目前由[清华大学计算机图形学组](https://cg.cs.tsinghua.edu.cn
如LICENSE.txt文件中所示Jittor使用Apache 2.0版权协议。

View File

@ -91,34 +91,14 @@ We provide some jupyter notebooks to help you quick start with Jittor.
Jittor environment requirements:
* System: **Linux**(e.g. Ubuntu/CentOS/Arch), **macOS**, or **Windows**, enviroment requirements of **Linux** and **Mac** are list below:
| OS | CPU | Python | Compiler | (Optional) GPU platform |
|--------------------------------------------------------|-------------------------------------|--------|--------------|---------------------------------------------|
| Linux<br>(Ubuntu, CentOS, Arch, <br>UOS, KylinOS, ...) | x86 <br>x86_64 <br>ARM <br>loongson | >= 3.7 | g++ >=5.4 | Nvidia CUDA >= 10.0, [cuDNN](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installlinux-tar) <br> or [AMD ROCm](https://docs.amd.com/) >= 4.0 <br> or [Hygon DCU DTK](https://tycloud.hpccube.com/doc/1.0.6/11277/general-handbook/software-tutorial/jittor.html) >= 22.04 |
| macOS <br>(>= 10.14 Mojave) | intel<br>Apple Silicon | >= 3.7 | clang >= 8.0 | - |
| Windows 10 & 11 | x86_64 | [>= 3.8](https://www.python.org/downloads/windows/) | - | Nvidia CUDA >= 10.2 [cuDNN](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#install-windows) |
* Python version >= 3.7
* CPU compiler (require at least one of the following)
* g++ (>=5.4.0)
* clang (>=8.0)
* GPU compiler (optional)
* nvcc (>=10.0 for g++ or >=10.2 for clang)
* GPU library: cudnn-dev (recommend tar file installation, [reference link](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installlinux-tar))
**Windows** requirements atr:
* Python: version >= 3.8(recommend install from <https://www.python.org/downloads/windows/>)
* x86_64 CPU processor
* Windows 10 or above
Note#1: macOS users have to install additional dependencies, see [macOS install](#macOS-install).
Jittor offers three ways to install: pip, docker, or manual.
@ -142,7 +122,7 @@ python3.7 -m jittor.test.test_example
Please first install additional dependencies with [homebrew](https://brew.sh).
```bash
brew install python@3.7 onednn libomp
brew install onednn libomp
```
@ -433,3 +413,4 @@ Jittor is currently maintained by the [Tsinghua CSCG Group](https://cg.cs.tsingh
Jittor is Apache 2.0 licensed, as found in the LICENSE.txt file.

View File

@ -5,7 +5,7 @@
[Quickstart](#quickstart) | [Install](#install) | [Tutorial](#tutorial) | [Chinese](./README.cn.md)
[快速开始](#快速开始) | [安装](#安装) | [教程](#教程)
[快速开始](#快速开始) | [安装](#安装) | [教程](#教程) | [English](./README.md)
Jittor is a high-performance deep learning framework based on JIT compiling and meta-operators. The whole framework and meta-operators are compiled just-in-time. A powerful op compiler and tuner are integrated into Jittor. It allowed us to generate high-performance code with specialized for your model. Jittor also contains a wealth of high-performance model libraries, including: image recognition, detection, segmentation, generation, differentiable rendering, geometric learning, reinforcement learning, etc. .
@ -22,6 +22,7 @@ Related Links:
* [Jittor Documents](https://cg.cs.tsinghua.edu.cn/jittor/assets/docs/index.html)
* [Github](https://github.com/jittor/jittor), [Gitee](https://gitee.com/jittor/jittor)
* [Jittor Forum](https://discuss.jittor.org/)
* [Awesome Jittor List](https://github.com/Jittor/jittor/blob/master/AWESOME-JITTOR-LIST.md)
* IM: QQ Group(761222083)
相关链接:
@ -31,6 +32,7 @@ Related Links:
* [Jittor文档](https://cg.cs.tsinghua.edu.cn/jittor/assets/docs/index.html)
* [Github](https://github.com/jittor/jittor) [Gitee](https://gitee.com/jittor/jittor)
* [Jittor 论坛](https://discuss.jittor.org/)
* [Jittor 精选仓库](https://github.com/Jittor/jittor/blob/master/AWESOME-JITTOR-LIST.md)
* 即时通信: QQ Group(761222083)
@ -115,52 +117,17 @@ We provide some jupyter notebooks to help you quick start with Jittor.
## 安装
Jittor框架对环境要求如下:
Jittor 支持**Linux**(e.g. Ubuntu/CentOS/Arch), **macOS**,**Windows** 其中**Linux**和**macOS**的依赖如下:
* Python版本 >= 3.7
* C++编译器 (需要下列至少一个)
- g++ >=5.4.0 for linux
- clang >=8.0 for mac
* GPU 编译器可选nvcc >=10.0
* GPU 加速库可选cudnn-dev (cudnn开发版, 推荐使用tar安装方法[参考链接](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installlinux-tar))
Jittor 目前还支持主流国产Linux操作系统如统信、麒麟、普华、龙芯Loongnix安装方式可参考 Linux pip安装方法准备好python和g++即可。
**Windows**对环境的要求为:
* Python版本 >= 3.8(建议从Python官网安装<https://www.python.org/downloads/windows/>)
* x86_64处理器
* Windows 10及以上。
如果您不希望手动配置环境,我们推荐使用 Docker 进行安装。
除此之外,您还可以使用 pip 安装和手动安装。
注意1macOS 用户需要安装额外依赖,请参考 [macOS 安装](#macOS-安装)。
Jittor 提供了三种安装方法pip、docker和手动安装
Jittor environment requirements:
* System: **Linux**(e.g. Ubuntu/CentOS/Arch), **macOS**, or **Windows**, enviroment requirements of **Linux** and **Mac** are list below:
| OS | CPU | Python | Compiler | (Optional) GPU platform |
|--------------------------------------------------------|-------------------------------------|--------|--------------|---------------------------------------------|
| Linux<br>(Ubuntu, CentOS, Arch, <br>UOS, KylinOS, ...) | x86 <br>x86_64 <br>ARM <br>loongson | >= 3.7 | g++ >=5.4 | Nvidia CUDA >= 10.0, [cuDNN](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installlinux-tar) <br> or [AMD ROCm](https://docs.amd.com/) >= 4.0 <br> or [Hygon DCU DTK](https://tycloud.hpccube.com/doc/1.0.6/11277/general-handbook/software-tutorial/jittor.html) >= 22.04 |
| macOS <br>(>= 10.14 Mojave) | intel<br>Apple Silicon | >= 3.7 | clang >= 8.0 | - |
| Windows 10 & 11 | x86_64 | [>= 3.8](https://www.python.org/downloads/windows/) | - | Nvidia CUDA >= 10.2 [cuDNN](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#install-windows) |
* Python version >= 3.7
* CPU compiler (require at least one of the following)
* g++ (>=5.4.0)
* clang (>=8.0)
* GPU compiler (optional)
* nvcc (>=10.0 for g++ or >=10.2 for clang)
* GPU library: cudnn-dev (recommend tar file installation, [reference link](https://docs.nvidia.com/deeplearning/cudnn/install-guide/index.html#installlinux-tar))
**Windows** requirements atr:
* Python: version >= 3.8(recommend install from <https://www.python.org/downloads/windows/>)
* x86_64 CPU processor
* Windows 10 or above
Note#1: macOS users have to install additional dependencies, see [macOS install](#macOS-install).
Jittor 提供了三种安装方法pip、docker和手动安装
Jittor offers three ways to install: pip, docker, or manual.
@ -186,12 +153,12 @@ jittor会自动在路径中寻找合适的编译器, 如果您希望手动指定
### macOS install
macOS 请使用 [homebrew](https://brew.sh) 安装额外的依赖 (python>=3.7, onednn)
macOS 请使用 [homebrew](https://brew.sh) 安装额外的依赖。
Please first install additional dependencies with [homebrew](https://brew.sh).
```bash
brew install python@3.7 onednn libomp
brew install onednn libomp
```
之后您可以通过 pip 安装 jittor并测试是否可以成功运行。
@ -203,7 +170,7 @@ python3.7 -m pip install jittor
python3.7 -m jittor.test.test_example
```
目前在macOS中jittor 只支持 CPU 计算。
目前在 macOS jittor 只支持 CPU 计算。
Currently jittor only supports CPU in macOS.

View File

@ -19,23 +19,69 @@ def check_is_en(src):
return en_cnt == len(src)
def check_is_both(src):
if src.startswith("!"):
return True
return len(src) < 2
def splite_markdown_blocks(src):
''' split markdown document into text, code, table blocks
'''
blocks = []
block = ""
status = "text"
def commit_block():
blocks.append((block, status))
for line in src.split('\n'):
line = line + "\n"
if line.startswith("```"):
assert status in ["text", "code"]
if status == "text":
commit_block()
status = "code"
block = line
elif status == "code":
block += line
commit_block()
status = "text"
block = ""
elif line.strip().startswith('|') and line.strip().endswith('|'):
assert status in ["text", "table"]
if status == "text":
commit_block()
status = "table"
block = line
else:
block += line
else:
if status == "table":
commit_block()
status = "text"
block = line
else:
block += line
if status != "code":
commit_block()
return blocks
for mdname in all_src_md:
print(mdname)
with open(mdname, "r", encoding='utf8') as f:
src = f.read()
src = src.split("```")
en_src = []
cn_src = []
for i, s in enumerate(src):
if i%2==1:
en_src.append(s)
cn_src.append(s)
src_blocks = splite_markdown_blocks(src)
en_src = ""
cn_src = ""
for block, status in src_blocks:
if status == "code" or status == "table":
en_src += block
cn_src += block
else:
en_s = []
cn_s = []
for line in s.split('\n'):
for line in block.split('\n'):
if check_is_both(line):
en_s.append(line)
cn_s.append(line)
@ -43,10 +89,9 @@ for mdname in all_src_md:
en_s.append(line)
else:
cn_s.append(line)
en_src.append("\n".join(en_s))
cn_src.append("\n".join(cn_s))
en_src = "```".join(en_src)
cn_src = "```".join(cn_src)
en_src += "\n".join(en_s)
cn_src += "\n".join(cn_s)
with open(mdname.replace(".src.md", ".md"), 'w', encoding='utf8') as f:
f.write(en_src)
with open(mdname.replace(".src.md", ".cn.md"), 'w', encoding='utf8') as f: