Skip to content

Commit 8cbef86

Browse files
authored
Merge pull request #204 from bitqiang/feature/update-deployment
update: deployment.md
2 parents 1f08bdb + 4c5971d commit 8cbef86

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

deployment.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@
99
+ **GPU硬件要求**:请准备**Volta架构及以上**的Nvidia GPU显卡(配备FP16 Tensor Core),Nvidia各架构对应显卡型号请参见[此文档表格](https://en.wikipedia.org/wiki/CUDA#GPUs_supported)。本文我们以T4显卡为例
1010
+ **CUDA**:推荐[CUDA](https://developer.nvidia.com/cuda-11-6-0-download-archive)版本11.6及以上,本文以11.6为例
1111
+ **CUDNN**:推荐[CUDNN](https://developer.nvidia.com/rdp/cudnn-archive) 8.6.0及以上,本文以8.6.0为例。请注意TensorRT和CUDNN有版本match关系,如TensorRT 8.5.x必须使用CUDNN 8.6.0,详见TensorRT的版本要求
12-
+ **ONNX**请安装`pip install onnx onnxruntime-gpu onnxmltools`注意我们转换TensorRT模型时,将沿着Pytorch → ONNX → TensorRT的步骤,所以准备TensorRT模型也需要先安装ONNX库。本文以onnx版本1.13.0,onnxruntime-gpu版本1.13.1,onnxmltools版本1.11.1为例
13-
+ **TensorRT**:推荐[TensorRT](https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html#trt_8)版本8.5.x,本文以8.5.2.2为例,使用pip即可安装`pip install tensorrt==8.5.2.2`。TensorRT各版本对应的CUDNN匹配版本,请从[文档页面](https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html#trt_8),查阅此TensorRT版本的"NVIDIA TensorRT Support Matrix"
12+
+ **ONNX**:注意我们转换TensorRT模型时,将沿着Pytorch → ONNX → TensorRT的步骤,所以准备TensorRT模型也需要先安装ONNX库。本文以onnx版本1.13.0,onnxruntime-gpu版本1.13.1,onnxmltools版本1.11.1为例
13+
+ **TensorRT**:推荐[TensorRT](https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html#trt_8)版本8.5.x,本文以8.5.2.2为例。TensorRT各版本对应的CUDNN匹配版本,请从[文档页面](https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html#trt_8),查阅此TensorRT版本的"NVIDIA TensorRT Support Matrix"
1414
+ **Pytorch**:推荐1.12.1及以上,本文以1.12.1为例(建议直接pip安装1.12.1+cu116,环境尽量不要再使用conda安装cudatoolkit,避免环境CUDNN版本变化,导致TensorRT报错)
1515
+ [requirements.txt](requirements.txt)要求的其他依赖项
1616

17+
执行代码
18+
```
19+
pip install tensorrt==8.5.2.2 onnx==1.13.0 onnxruntime-gpu==1.13.1 onnxmltools==1.11.1
20+
pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 torchaudio==0.12.1 -f https://download.pytorch.org/whl/torch_stable.html
21+
pip install -r requirements.txt
22+
```
1723

1824
## 转换和运行ONNX模型
1925

deployment_En.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,17 @@ Our latest Chinese-CLIP code supports the conversion of Pytorch models of all sc
99
+ **GPU hardware requirements**: Please prepare Nvidia GPUs **with Volta architecture and above** (equipped with FP16 Tensor Core). Please refer to [this document](https://en.wikipedia.org/wiki/CUDA#GPUs_supported) for the corresponding GPUs of each Nvidia architecture. Here we take T4 GPU as an example.
1010
+ **CUDA**: [CUDA](https://developer.nvidia.com/cuda-11-6-0-download-archive) version 11.6 and above is recommended. We take version 11.6 as an example.
1111
+ **CUDNN**: [CUDNN](https://developer.nvidia.com/rdp/cudnn-archive) version 8.6.0 and above is recommended. We take version 8.6.0 as an example. Please note that TensorRT and CUDNN have version correspondence, e.g. TensorRT 8.5.x must correspond to CUDNN 8.6.0, see the TensorRT version requirements for details.
12-
+ **ONNX**: Please run `pip install onnx onnxruntime-gpu onnxmltools` to install. Note that when we convert the TensorRT model, we will follow the steps Pytorch → ONNX → TensorRT, so preparing the TensorRT model also requires installing the ONNX library first. Here we take onnx version 1.13.0, onnxruntime-gpu version 1.13.1, and onnxmltools version 1.11.1 as examples.
13-
+ **TensorRT**: The recommended [TensorRT](https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html#trt_8) version is 8.5.x. We use 8.5.2.2 as an example, using pip to install `pip install tensorrt==8.5.2.2`. For the CUDNN version corresponding to each TensorRT version, please refer to the "NVIDIA TensorRT Support Matrix" from this [documentation page]((https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html#trt_8)).
12+
+ **ONNX**: Note that when we convert the TensorRT model, we will follow the steps Pytorch → ONNX → TensorRT, so preparing the TensorRT model also requires installing the ONNX library first. Here we take onnx version 1.13.0, onnxruntime-gpu version 1.13.1, and onnxmltools version 1.11.1 as examples.
13+
+ **TensorRT**: The recommended [TensorRT](https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html#trt_8) version is 8.5.x. We use 8.5.2.2 as an example. For the CUDNN version corresponding to each TensorRT version, please refer to the "NVIDIA TensorRT Support Matrix" from this [documentation page]((https://docs.nvidia.com/deeplearning/tensorrt/archives/index.html#trt_8)).
1414
+ **Pytorch**: Pytorch version 1.12.1 and above is recommended. We take version 1.12.1 as an example. (It is recommended to directly pip install 1.12.1 + cu116, and try not to use conda to install cudatoolkit, avoiding TensorRT errors due to CUDNN version changes. )
1515
+ Other dependencies as required in [requirements.txt](requirements.txt).
1616

17+
executable code
18+
```
19+
pip install tensorrt==8.5.2.2 onnx==1.13.0 onnxruntime-gpu==1.13.1 onnxmltools==1.11.1
20+
pip install torch==1.12.1+cu116 torchvision==0.13.1+cu116 torchaudio==0.12.1 -f https://download.pytorch.org/whl/torch_stable.html
21+
pip install -r requirements.txt
22+
```
1723

1824
## Converting and Running ONNX Models
1925

0 commit comments

Comments
 (0)