---
title: 获取源码
description: "从ONNX Runtime官方网站获取ONNX Runtime源码文件。"
url: https://www.hikunpeng.com/document/detail/zh/SRA/ecosystemEnable/ONNXRuntime/kunpengonnxruntime_02_0010.html
sourcePath: /source/zh/SRA/ecosystemEnable/ONNXRuntime/kunpengonnxruntime_02_0010.html
indexId: a8374df997878584d9a930cd1a47be95d39cd72104028fdf50177682d7d7b4b774
---
# 获取源码

从ONNX Runtime官方网站获取ONNX Runtime源码文件。

1. 进入“/path/to/ONNX_Runtime”目录。
  1 cd /path/to/ONNX_Runtime

2. 配置Git网络代理。
  1 2 3 git config --global http.sslVerify false git config --global https.sslVerify false git config --global http.proxy "http://用户名:密码@代理IP地址:代理端口"

3. 请参见表2获取ONNX Runtime源码。

```
cd /path/to/ONNX_Runtime
git clone -b v1.19.2 https://github.com/microsoft/onnxruntime.git
```


4. 进入“/path/to/ONNX_Runtime/onnxruntime”目录。

```
cd /path/to/ONNX_Runtime/onnxruntime
```


5. 安装Python依赖。
  1 pip install -r requirements.txt --user

  安装过程中若出现如下问题，则设置镜像源安装。 pip install -r requirements.txt --user -i https://repo.huaweicloud.com/repository/pypi/simple --trusted-host repo.huaweicloud.com
