wsl安装英特尔openvino

一、安装miniconda

从miniconda官网安装下载器

 

~/miniconda3/bin/conda init bash

source ~/.bashrc

二、配置conda源,创建环境

sudo apt-get update

sudo apt-get upgrade

vi .condarc
default_channels:
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/main
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/r
  - http://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/msys2
custom_channels:
  conda-forge: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  msys2: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  bioconda: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  menpo: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  pytorch-lts: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
  simpleitk: https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud
conda update --all
!!!重启terminal后再创建环境!一定要重启terminal!!!


conda create -n openvivo_env_py37 python=3.7.13

注意,支持的版本为3.7.13及以下的。

三、离线安装

下载离线安装包

Download Intel® Distribution of OpenVINO™ Toolkit

安装jupyter lab,启动

利用jupyter lab上传安装包。

tar -xvf l_openvino_toolkit_p_2021.4.752.tgz
cd l_openvino_toolkit_p_2021.4.752
sh install.sh

 

 enter

accept 

出了一些小问题,需要sudo权限

 但是不是sudo 的问题

pcilib: Cannot open /proc/bus/pci
lspci: Cannot find any working access method.

需要: pip install grpcio

同时,pip配置华为源

vi /home/user01/.config/pip/pip.conf

添加如下内容

[global]
index-url = https://repo.huaweicloud.com/repository/pypi/simple
trusted-host = repo.huaweicloud.com
timeout = 120

跳过预处理

 1 

 1 接受

 设置环境变量

配置模型文件

https://docs.openvinotoolkit.org/2021.4.1/_docs_install_guides_installing_openv
ino_linux.html

先按照官网说明配置

 

  1. Go to the install_dependencies directory:

    cd /opt/intel/openvino_2021/install_dependencies
  2. Run a script to download and install the external software dependencies:

    sudo -E ./install_openvino_dependencies.sh

    Once the dependencies are installed, continue to the next section to set your environment variables.

Step 2: Install External Software Dependencies

Note

If you installed the Intel® Distribution of OpenVINO™ to a non-default directory, replace /opt/intel with the directory in which you installed the software.

These dependencies are required for:

  • Intel-optimized build of OpenCV library

  • Deep Learning Inference Engine

  • Deep Learning Model Optimizer tools

  1. Go to the install_dependencies directory:

    cd /opt/intel/openvino_2021/install_dependencies
  2. Run a script to download and install the external software dependencies:

    sudo -E ./install_openvino_dependencies.sh

    Once the dependencies are installed, continue to the next section to set your environment variables.

Step 3: Configure the Environment

You must update several environment variables before you can compile and run OpenVINO™ applications. Set persistent environment variables as follows, using vi (as below) or your preferred editor:

  1. Open the .bashrc file in /home/<USER> :

    vi ~/.bashrc
  2. Press the i key to switch to insert mode.

  3. Add this line to the end of the file:

    source /opt/intel/openvino_2021/bin/setupvars.sh
    
    特别注意:如果此时环境变量生效不能成功,则需要关闭所有terminial或者重启wsl电脑,
    如果这句话不加入 ~/.bashrc,则每次运行需要额外生效一次环境变量。
    
  4. Save and close the file: press the Esc key and type :wq.

  5. To verify the change, open a new terminal. You will see [setupvars.sh] OpenVINO environment initialized.

    Optional: If you don’t want to change your shell profile, you can run the following script to temporarily set your environment variables for each terminal instance when working with OpenVINO™:

    source /opt/intel/openvino_2021/bin/setupvars.sh

The environment variables are set. Next, you will configure the Model Optimizer.

Step 4: Configure the Model Optimizer

Note

Since the TensorFlow framework is not officially supported on CentOS*, the Model Optimizer for TensorFlow can’t be configured and run on that operating system.

The Model Optimizer is a Python*-based command line tool for importing trained models from popular deep learning frameworks such as Caffe*, TensorFlow*, Apache MXNet*, ONNX* and Kaldi*.

The Model Optimizer is a key component of the Intel Distribution of OpenVINO toolkit. Performing inference on a model (with the exception of ONNX and nGraph models) requires running the model through the Model Optimizer. When you run a pre-trained model through the Model Optimizer, your output is an Intermediate Representation (IR) of the network. The Intermediate Representation is a pair of files that describe the whole model:

  • .xml : Describes the network topology

  • .bin : Contains the weights and biases binary data

For more information about the Model Optimizer, refer to the Model Optimizer Developer Guide.

  1. Go to the Model Optimizer prerequisites directory:

    cd /opt/intel/openvino_2021/deployment_tools/model_optimizer/install_prerequisites
  2. Run the script to configure the Model Optimizer for Caffe, TensorFlow 2.x, MXNet, Kaldi, and ONNX:

    sudo ./install_prerequisites.sh
  3. Optional: You can choose to configure each framework separately instead. If you see error messages, make sure you installed all dependencies. From the Model Optimizer prerequisites directory, run the scripts for the model frameworks you want support for. You can run more than one script.

Note

You can choose to install Model Optimizer support for only certain frameworks. In the same directory are individual scripts for Caffe, TensorFlow 1.x, TensorFlow 2.x, MXNet, Kaldi, and ONNX (install_prerequisites_caffe.sh, etc.).

The Model Optimizer is configured for one or more frameworks.

You have now completed all required installation, configuration, and build steps in this guide to use your CPU to work with your trained models.

To enable inference on other hardware, see below:

Or proceed to the Start Using the Toolkit section to learn the basic OpenVINO™ toolkit workflow and run code samples and demo applications.

Step 5 (Optional): Configure Inference on non-CPU Devices:

Optional: Steps for Intel® Processor Graphics (GPU)

The steps in this section are required only if you want to enable the toolkit components to use processor graphics (GPU) on your system.

  1. Go to the install_dependencies directory:

    cd /opt/intel/openvino_2021/install_dependencies/
  2. Install the Intel® Graphics Compute Runtime for OpenCL™ driver components required to use the GPU plugin and write custom layers for Intel® Integrated Graphics. The drivers are not included in the package. To install, run this script:

    sudo -E ./install_NEO_OCL_driver.sh

    Note

    To use the Intel® Iris® Xe MAX Graphics, see the Intel® Iris® Xe MAX Graphics with Linux* page for driver installation instructions.

    The script compares the driver version on the system to the current version. If the driver version on the system is higher or equal to the current version, the script does not install a new driver. If the version of the driver is lower than the current version, the script uninstalls the lower version and installs the current version with your permission:

    Higher hardware versions require a higher driver version, namely 20.35 instead of 19.41. If the script fails to uninstall the driver, uninstall it manually. During the script execution, you may see the following command line output:

    Add OpenCL user to video group

    Ignore this suggestion and continue.

    You can also find the most recent version of the driver, installation procedure and other information on the Intel® software for general purpose GPU capabilities site.

  3. Optional: Install header files to allow compilation of new code. You can find the header files at Khronos OpenCL™ API Headers.

You’ve completed all required configuration steps to perform inference on processor graphics. Proceed to the Start Using the Toolkit section to learn the basic OpenVINO™ toolkit workflow and run code samples and demo applications.

至此就安装全部完成了。

WSL (Windows Subsystem for Linux) 是 Windows 10 中内置的一项功能,它让你能够在 Windows 上像使用真正的 Linux 发行版一样运行 Linux 应用程序,包括机器人操作系统 (ROS, Robot Operating System)。安装 ROS 在 WSL 中通常涉及以下步骤: 1. **设置WSL**: 首先,确保你的 Windows 10 版本支持 WSL,并启用它(如果你的系统没有开启,可以在“设置” > “更新和安全” > “对于开发者”的部分进行设置)。 2. **选择Linux发行版**: WSL 支持多个 Linux 分发版,如 Ubuntu、Debian 等。Ubuntu是最常见的选择,因为其社区广泛且ROS支持较好。下载并安装适用于 WSL 的 Linux 发行版 ISO 文件。 3. **安装WSL**: 使用 Microsoft Store 或命令提示符(管理员权限)来安装 WSL。在命令提示符中输入 `wsl --install` 并根据提示操作。 4. **启动和登录**: 安装完成后,在命令提示符或PowerShell中输入 `wsl` 启动新安装的 Linux 命令环境,然后使用你的Linux用户名和密码登录。 5. **更新和升级**: 进入Linux后,使用 `sudo apt update && sudo apt upgrade` 更新系统软件包。 6. **安装ROS**: 在终端中,使用 `sudo apt install ros-<distro>-<package_name>` 来安装特定版本的ROS,比如 `ros-noetic-desktop-full`。这里的 `<distro>` 是ROS的发行版代号,如 `noetic`,`<package_name>` 是你需要的特定ROS软件包。 7. **配置网络**: 如果在 Windows 和 WSL 之间共享文件夹,可能需要额外配置,例如在 `/etc/wsl.conf` 中添加 `network = host`。 8. **开始使用**: 现在你可以使用 ROS 工具链进行编程、部署节点和调试了。 **相关问题--:** 1. WSL 是否能完美模拟所有 Linux 功能? 2. 如何解决 ROS 和 WSL 网络通信问题? 3. 在不同版本的 ROS 中,哪些依赖可能会有所变化?
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值