---
title: 配置环境
description: "TensorFlow Serving模型推理前需要进行BIOS相关配置，创建并激活conda环境，安装依赖软件包。"
url: https://www.hikunpeng.com/document/detail/zh/SRA/perfEval/benchmarksra/kunpengmodelzoo_06_0013.html
sourcePath: /source/zh/SRA/perfEval/benchmarksra/kunpengmodelzoo_06_0013.html
indexId: f35d68f35d06d6c66eb4c7857201396a4e23b7a2285a09c15f59b681e6d254d265
---
# 配置环境

TensorFlow Serving模型推理前需要进行BIOS相关配置，创建并激活conda环境，安装依赖软件包。

#### BIOS配置说明

测试前需要进行BIOS环境配置，相关配置项、配置说明以及配置路径如表1所示。


**表1 BIOS配置项说明**

| 配置项 | 配置说明 | 菜单路径 | 推荐值 |
| --- | --- | --- | --- |
| Power Policy | 设置电源策略为性能模式 | “Advanced\->Performance Config\->Power Policy” | Performance |
| SMT2 | 设置超线程模式（Simultaneous Multithreading Technology） | “Advanced> Power And Performance Configuration > CPU PM Control > SMT2” | Enabled |
| Support Smmu | 设置SMMU（System Memory Management Unit）模式 | “Advanced > MISC Config > Support Smmu” | Disabled |
| CPU Prefetching Configuration | 设置CPU预取模式 | “Advanced> Power And Performance Configuration > CPU PM Control > CPU Prefetching Configuration” | Enabled |


#### 创建conda环境

1. 创建推理阶段conda虚拟环境。
  1 conda create -n model_zoo_infer python=3.11

2. 创建完成后，激活conda环境。
  1 conda activate model_zoo_infer

3. 安装推理依赖软件包。
  1 pip install tensorflow==2.15.0
