forked from maxjhandsome/jittor
check python version
This commit is contained in:
parent
121c633aa1
commit
11bb7bc884
43
README.cn.md
43
README.cn.md
|
@ -106,7 +106,7 @@ Jittor 支持**Linux**(e.g. Ubuntu/CentOS/Arch), **macOS**,**Windows**, 其中
|
|||
|
||||
注意1:macOS 用户需要安装额外依赖,请参考 [macOS 安装](#macOS-安装)。
|
||||
|
||||
Jittor 提供了三种安装方法:docker,pip和手动安装:
|
||||
Jittor 提供了三种安装方法:pip、docker和手动安装:
|
||||
|
||||
|
||||
|
||||
|
@ -117,24 +117,6 @@ Jittor 提供了三种安装方法:docker,pip和手动安装:
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
## Docker 安装
|
||||
|
||||
我们提供了Docker安装方式,免去您配置环境,Docker安装方法如下:
|
||||
|
||||
|
||||
```
|
||||
# CPU only(Linux)
|
||||
docker run -it --network host jittor/jittor
|
||||
# CPU and CUDA(Linux)
|
||||
docker run -it --network host --gpus all jittor/jittor-cuda
|
||||
# CPU only(Mac and Windows)
|
||||
docker run -it -p 8888:8888 jittor/jittor
|
||||
```
|
||||
|
||||
关于Docker安装的详细教程,可以参考[Windows/Mac/Linux通过Docker安装计图](https://cg.cs.tsinghua.edu.cn/jittor/tutorial/2020-5-15-00-00-docker/)
|
||||
|
||||
## Pip 安装
|
||||
|
||||
|
||||
|
@ -152,7 +134,7 @@ python3.7 -m jittor.test.test_example
|
|||
如果测试运行通过,恭喜你已经安装完成.
|
||||
jittor会自动在路径中寻找合适的编译器, 如果您希望手动指定编译器, 请使用环境变量 `cc_path` 和 `nvcc_path`(可选).
|
||||
|
||||
## macOS 安装
|
||||
### macOS 安装
|
||||
|
||||
|
||||
macOS 请使用 [homebrew](https://brew.sh) 安装额外的依赖 (python>=3.7, onednn)。
|
||||
|
@ -173,7 +155,8 @@ python3.7 -m jittor.test.test_example
|
|||
目前在macOS中,jittor 只支持 CPU 计算。
|
||||
|
||||
|
||||
## Windows安装
|
||||
### Windows安装
|
||||
|
||||
|
||||
Windows 请准备好Python>=3.8,安装方法如下(conda安装需要额外命令):
|
||||
|
||||
|
@ -194,6 +177,24 @@ Windows 下,jittor会自动检测显卡并安装对应的 CUDA, 请确保您
|
|||
python -m jittor_utils.install_cuda
|
||||
```
|
||||
|
||||
|
||||
|
||||
## Docker 安装
|
||||
|
||||
我们提供了Docker安装方式,免去您配置环境,Docker安装方法如下:
|
||||
|
||||
|
||||
```
|
||||
# CPU only(Linux)
|
||||
docker run -it --network host jittor/jittor
|
||||
# CPU and CUDA(Linux)
|
||||
docker run -it --network host --gpus all jittor/jittor-cuda
|
||||
# CPU only(Mac and Windows)
|
||||
docker run -it -p 8888:8888 jittor/jittor
|
||||
```
|
||||
|
||||
关于Docker安装的详细教程,可以参考[Windows/Mac/Linux通过Docker安装计图](https://cg.cs.tsinghua.edu.cn/jittor/tutorial/2020-5-15-00-00-docker/)
|
||||
|
||||
## 手动安装
|
||||
|
||||
|
||||
|
|
40
README.md
40
README.md
|
@ -114,24 +114,7 @@ Jittor environment requirements:
|
|||
|
||||
Note#1: macOS users have to install additional dependencies, see [macOS install](#macOS-install).
|
||||
|
||||
Jittor offers three ways to install: docker, pip, or manual.
|
||||
|
||||
|
||||
## Docker Install
|
||||
|
||||
|
||||
|
||||
We provide a Docker installation method to save you from configuring the environment. The Docker installation method is as follows:
|
||||
|
||||
```
|
||||
# CPU only(Linux)
|
||||
docker run -it --network host jittor/jittor
|
||||
# CPU and CUDA(Linux)
|
||||
docker run -it --network host --gpus all jittor/jittor-cuda
|
||||
# CPU only(Mac and Windows)
|
||||
docker run -it -p 8888:8888 jittor/jittor
|
||||
```
|
||||
|
||||
Jittor offers three ways to install: pip, docker, or manual.
|
||||
|
||||
|
||||
## Pip install
|
||||
|
@ -147,7 +130,7 @@ python3.7 -m jittor.test.test_example
|
|||
|
||||
|
||||
|
||||
## macOS install
|
||||
### macOS install
|
||||
|
||||
|
||||
Please first install additional dependencies with [homebrew](https://brew.sh).
|
||||
|
@ -168,6 +151,8 @@ python3.7 -m jittor.test.test_example
|
|||
Currently jittor only supports CPU in macOS.
|
||||
|
||||
|
||||
### Windows install
|
||||
|
||||
|
||||
|
||||
```bash
|
||||
|
@ -185,6 +170,23 @@ In Windows, jittor will automatically detect and install CUDA, please make sure
|
|||
python -m jittor_utils.install_cuda
|
||||
```
|
||||
|
||||
|
||||
## Docker Install
|
||||
|
||||
|
||||
|
||||
We provide a Docker installation method to save you from configuring the environment. The Docker installation method is as follows:
|
||||
|
||||
```
|
||||
# CPU only(Linux)
|
||||
docker run -it --network host jittor/jittor
|
||||
# CPU and CUDA(Linux)
|
||||
docker run -it --network host --gpus all jittor/jittor-cuda
|
||||
# CPU only(Mac and Windows)
|
||||
docker run -it -p 8888:8888 jittor/jittor
|
||||
```
|
||||
|
||||
|
||||
## manual install
|
||||
|
||||
We will show how to install Jittor in Ubuntu 16.04 step by step, Other Linux distributions may have similar commands.
|
||||
|
|
|
@ -130,7 +130,7 @@ Jittor 支持**Linux**(e.g. Ubuntu/CentOS/Arch), **macOS**,**Windows**, 其中
|
|||
|
||||
注意1:macOS 用户需要安装额外依赖,请参考 [macOS 安装](#macOS-安装)。
|
||||
|
||||
Jittor 提供了三种安装方法:docker,pip和手动安装:
|
||||
Jittor 提供了三种安装方法:pip、docker和手动安装:
|
||||
|
||||
Jittor environment requirements:
|
||||
|
||||
|
@ -154,27 +154,7 @@ Jittor environment requirements:
|
|||
|
||||
Note#1: macOS users have to install additional dependencies, see [macOS install](#macOS-install).
|
||||
|
||||
Jittor offers three ways to install: docker, pip, or manual.
|
||||
|
||||
|
||||
## Docker Install
|
||||
|
||||
## Docker 安装
|
||||
|
||||
我们提供了Docker安装方式,免去您配置环境,Docker安装方法如下:
|
||||
|
||||
We provide a Docker installation method to save you from configuring the environment. The Docker installation method is as follows:
|
||||
|
||||
```
|
||||
# CPU only(Linux)
|
||||
docker run -it --network host jittor/jittor
|
||||
# CPU and CUDA(Linux)
|
||||
docker run -it --network host --gpus all jittor/jittor-cuda
|
||||
# CPU only(Mac and Windows)
|
||||
docker run -it -p 8888:8888 jittor/jittor
|
||||
```
|
||||
|
||||
关于Docker安装的详细教程,可以参考[Windows/Mac/Linux通过Docker安装计图](https://cg.cs.tsinghua.edu.cn/jittor/tutorial/2020-5-15-00-00-docker/)
|
||||
Jittor offers three ways to install: pip, docker, or manual.
|
||||
|
||||
## Pip 安装
|
||||
|
||||
|
@ -194,9 +174,9 @@ python3.7 -m jittor.test.test_example
|
|||
如果测试运行通过,恭喜你已经安装完成.
|
||||
jittor会自动在路径中寻找合适的编译器, 如果您希望手动指定编译器, 请使用环境变量 `cc_path` 和 `nvcc_path`(可选).
|
||||
|
||||
## macOS 安装
|
||||
### macOS 安装
|
||||
|
||||
## macOS install
|
||||
### macOS install
|
||||
|
||||
macOS 请使用 [homebrew](https://brew.sh) 安装额外的依赖 (python>=3.7, onednn)。
|
||||
|
||||
|
@ -219,7 +199,9 @@ python3.7 -m jittor.test.test_example
|
|||
|
||||
Currently jittor only supports CPU in macOS.
|
||||
|
||||
## Windows安装
|
||||
### Windows安装
|
||||
|
||||
### Windows install
|
||||
|
||||
Windows 请准备好Python>=3.8,安装方法如下(conda安装需要额外命令):
|
||||
|
||||
|
@ -241,6 +223,26 @@ In Windows, jittor will automatically detect and install CUDA, please make sure
|
|||
python -m jittor_utils.install_cuda
|
||||
```
|
||||
|
||||
|
||||
## Docker Install
|
||||
|
||||
## Docker 安装
|
||||
|
||||
我们提供了Docker安装方式,免去您配置环境,Docker安装方法如下:
|
||||
|
||||
We provide a Docker installation method to save you from configuring the environment. The Docker installation method is as follows:
|
||||
|
||||
```
|
||||
# CPU only(Linux)
|
||||
docker run -it --network host jittor/jittor
|
||||
# CPU and CUDA(Linux)
|
||||
docker run -it --network host --gpus all jittor/jittor-cuda
|
||||
# CPU only(Mac and Windows)
|
||||
docker run -it -p 8888:8888 jittor/jittor
|
||||
```
|
||||
|
||||
关于Docker安装的详细教程,可以参考[Windows/Mac/Linux通过Docker安装计图](https://cg.cs.tsinghua.edu.cn/jittor/tutorial/2020-5-15-00-00-docker/)
|
||||
|
||||
## 手动安装
|
||||
## manual install
|
||||
|
||||
|
|
8
setup.py
8
setup.py
|
@ -23,6 +23,7 @@ if not platform.system() in ['Linux', 'Darwin']:
|
|||
import setuptools
|
||||
from setuptools import setup, find_packages
|
||||
import os
|
||||
import sys
|
||||
|
||||
path = os.path.dirname(__file__)
|
||||
with open(os.path.join(path, "README.md"), "r", encoding='utf8') as fh:
|
||||
|
@ -36,6 +37,13 @@ with open(os.path.join(path, "python/jittor/__init__.py"), "r", encoding='utf8')
|
|||
else:
|
||||
raise RuntimeError("Unable to find version string.")
|
||||
|
||||
version_require = (3,7)
|
||||
if os.name == 'nt':
|
||||
version_require = (3,8)
|
||||
if sys.version_info < version_require:
|
||||
raise RuntimeError("Python version not match, require %s, current %s"
|
||||
%(version_require, sys.version_info))
|
||||
|
||||
setuptools.setup(
|
||||
name='jittor',
|
||||
version=version,
|
||||
|
|
Loading…
Reference in New Issue