日本熟妇hd丰满老熟妇,中文字幕一区二区三区在线不卡 ,亚洲成片在线观看,免费女同在线一区二区

EAIS軟件包說明

在您綁定EAIS實例至ECS實例上后,您還需要在ECS實例上安裝EAIS提供的軟件包才能在ECS實例上運行GPU任務。本文為您介紹如何安裝EAIS軟件包及軟件包的使用方法。

軟件包列表

您在使用EAIS的過程中,可能需要安裝的EAIS軟件包如下:

  • eais-tool:必須安裝。

  • eais-cuda:必須安裝。

  • eais-torch:非必須安裝。當您需要使用PyTorch JIT模型進行推理時,才需要安裝eais-torch軟件包。

  • eais-miniconda:非必須安裝。當您想快速體驗使用EAIS推理的流程,才需要安裝eais-miniconda軟件包。例如快速使用EAIS通過Python腳本推理PyTorch模型,具體操作,請參見使用EAIS推理PyTorch模型(Python)

eais-tool

軟件包說明

軟件包信息

說明

安裝要求

必須安裝

用途

eais-tool可以用來管理您的EAIS實例。

當前版本

4.2.5

安裝方法

eais-tool軟件包分為deb和rpm包,您需要根據(jù)ECS實例的操作系統(tǒng)安裝對應的軟件包。

  • ECS實例操作系統(tǒng)為Ubuntu

    1. 執(zhí)行如下命令,安裝eais-tool deb軟件包。

      export VERSION=4.2.5
      wget https://eais-rel-pub.oss-cn-beijing.aliyuncs.com/packages/eais-tool_${VERSION}_amd64.deb
      sudo dpkg -i eais-tool_${VERSION}_amd64.deb
      source /etc/profile
    2. 執(zhí)行如下命令,查看eais-tool deb軟件包安裝結果。

      dpkg -l | grep eais-tool

      回顯信息中包含eais-tool軟件包信息,表示eais-tool deb軟件包安裝成功。

  • ECS實例操作系統(tǒng)為CentOS或Alibaba Cloud Linux

    1. 執(zhí)行如下命令,安裝eais-tool rpm軟件包。

      export VERSION=4.2.5
      wget https://eais-rel-pub.oss-cn-beijing.aliyuncs.com/packages/eais-tool-${VERSION}-1.x86_64.rpm
      sudo rpm -ivh eais-tool-${VERSION}-1.x86_64.rpm --nodeps
      source /etc/profile
    2. 執(zhí)行如下命令,查看eais-tool rpm軟件包安裝結果。

      rpm -qa | grep eais-tool

      回顯信息中包含eais-tool軟件包信息,表示eais-tool rpm軟件包安裝成功。

使用方法

如果您想查看EAIS相關信息,只需在您安裝eais-tool軟件包后,執(zhí)行eais_smi命令,即可在回顯中查看EAIS實例規(guī)格、EAIS GPU使用率等信息,回顯示例如下。eais_smi工具查看硬件信息

eais-cuda

軟件包說明

軟件包信息

說明

安裝要求

必須安裝

用途

eais-cuda可以自動將您在ECS實例上運行的GPU任務放到EAIS實例上運行。

當前版本

4.2.5

依賴軟件

cuda11

安裝方法

eais-cuda軟件包分為deb和rpm包,您需要根據(jù)ECS實例的操作系統(tǒng)安裝對應的軟件包。

  • ECS實例操作系統(tǒng)為Ubuntu

    1. 執(zhí)行如下命令,安裝eais-cuda deb軟件包。

      export VERSION=4.2.5
      wget https://eais-rel-pub.oss-cn-beijing.aliyuncs.com/packages/eais-cuda_${VERSION}_amd64.deb
      sudo dpkg -i eais-cuda_${VERSION}_amd64.deb
    2. 執(zhí)行如下命令,查看eais-cuda deb軟件包安裝結果。

      dpkg -l | grep eais-cuda

      回顯信息中包含eais-cuda軟件包信息,表示eais-cuda deb軟件包安裝成功。

  • ECS實例操作系統(tǒng)為CentOS或Alibaba Cloud Linux

    1. 執(zhí)行如下命令,安裝eais-cuda rpm軟件包。

      export VERSION=4.2.5
      wget https://eais-rel-pub.oss-cn-beijing.aliyuncs.com/packages/eais-cuda-${VERSION}-1.x86_64.rpm
      sudo rpm -ivh eais-cuda-${VERSION}-1.x86_64.rpm --nodeps
    2. 執(zhí)行如下命令,查看eais-cuda rpm軟件包安裝結果。

      rpm -qa | grep eais-cuda

      回顯信息中包含eais-cuda軟件包信息,表示eais-cuda rpm軟件包安裝成功。

使用方法

eais-cuda安裝完畢后,您無需進行其他操作,eais-cuda會自動產(chǎn)生作用。

eais-torch

軟件包說明

軟件包信息

說明

安裝要求

當您需要使用PyTorch JIT模型進行推理時,需要安裝eais-torch軟件包。

用途

eais-torch可以自動將您在ECS實例上運行的PyTorch模型放到EAIS實例上處理并使用神龍AIACC進行推理加速。

當前版本

4.2.5

依賴軟件版本

  • PyTorch:1.9.0或者1.13.1

  • libtorch:1.9.0或者1.13.1

Python版本

3.6~3.11

安裝方法

安裝eais-torch軟件包時,需要指定該軟件包依賴的libtorch軟件包或者PyTorch軟件包版本號。根據(jù)您使用的程序(Python或者C++),安裝步驟如下:

Python程序

您需要安裝eais-torch whl軟件包,安裝前請確保您的運行環(huán)境中已安裝了Python3以及pip3軟件包。安裝操作如下:

  1. 執(zhí)行如下命令,設置EAIS軟件包和PyTorch軟件包的版本號。

    設置軟件包版本號后,后續(xù)步驟可自動獲取該軟件包版本號。

    重要
    • EAIS_PACKAGE_VERSION:EAIS軟件包版本號,目前僅支持設置為4.2.5。

    • pytorch_VERSION:PyTorch軟件包版本號,本文操作步驟以PyTorch 1.13.1為例。

    export EAIS_PACKAGE_VERSION=4.2.5
    export pytorch_VERSION=1.13.1
  2. 下載并安裝eais-torch whl軟件包。

    sudo pip3 install eais-torch${pytorch_VERSION}==${EAIS_PACKAGE_VERSION} \
      -f https://eais-rel-pub.oss-cn-beijing.aliyuncs.com/packages/index.html
  3. 執(zhí)行如下命令,查看eais-torch whl軟件包安裝結果。

    pip3 list | grep eais

    回顯信息中包含eais-torch軟件包信息,表示eais-torch whl軟件包安裝成功。

C++程序

  1. 執(zhí)行如下命令,設置EAIS軟件包和libtorch軟件包的版本號。

    設置軟件包版本號后,后續(xù)步驟可自動獲取該軟件包版本號。

    重要
    • EAIS_PACKAGE_VERSION:EAIS軟件包版本號,目前僅支持設置為4.2.5。

    • libtorch_VERSION:libtorch軟件包版本號,本文操作步驟以libtorch 1.13.1為例。

    export EAIS_PACKAGE_VERSION=4.2.5
    export libtorch_VERSION=1.13.1
  2. 獲取軟件包下載地址。

    EAIS提供以Pre-cxx11 ABI和cxx11 ABI方式編譯生成的依賴于libtorch的軟件包,包含libtorch的EAIS torch軟件包下載地址如下:

    ECS實例操作系統(tǒng)

    編譯方式

    軟件包類型

    EAIS軟件包下載地址

    Ubuntu

    Pre-cxx11 ABI

    deb

    https://eais-rel-pub.oss-cn-beijing.aliyuncs.com/packages/eais-torch${libtorch_VERSION}_${EAIS_PACKAGE_VERSION}_amd64.deb

    cxx11 ABI

    deb

    https://eais-rel-pub.oss-cn-beijing.aliyuncs.com/packages/eais-torch${libtorch_VERSION}-cxx11-abi_${EAIS_PACKAGE_VERSION}_amd64.deb

    CentOS或Alibaba Cloud Linux

    Pre-cxx11 ABI

    rpm

    https://eais-rel-pub.oss-cn-beijing.aliyuncs.com/packages/eais-torch${libtorch_VERSION}-${EAIS_PACKAGE_VERSION}-1.x86_64.rpm

    cxx11 ABI

    rpm

    https://eais-rel-pub.oss-cn-beijing.aliyuncs.com/packages/eais-torch${libtorch_VERSION}-cxx11-abi-${EAIS_PACKAGE_VERSION}-1.x86_64.rpm

  3. 下載并安裝EAIS軟件包。

    • ECS實例操作系統(tǒng)為Ubuntu

      以cxx11 ABI方式編譯的依賴于libtorch的eais-torch deb軟件包為例,操作如下:

      1. 執(zhí)行如下命令,下載并安裝eais-torch deb軟件包。

        wget https://eais-rel-pub.oss-cn-beijing.aliyuncs.com/packages/eais-torch${libtorch_VERSION}-cxx11-abi_${EAIS_PACKAGE_VERSION}_amd64.deb
        dpkg -i eais-torch${libtorch_VERSION}-cxx11-abi_${EAIS_PACKAGE_VERSION}_amd64.deb
        source /etc/profile
      2. 執(zhí)行如下命令,查看eais-torch deb軟件包安裝結果。

        dpkg -l | grep eais-torch

        回顯信息中包含eais-torch軟件包信息,表示eais-torch deb軟件包安裝成功。

    • ECS實例操作系統(tǒng)為CentOS或Alibaba Cloud Linux

      以cxx11 ABI方式編譯的依賴于libtorch的eais-torch rpm軟件包為例,操作如下:

      1. 執(zhí)行如下命令,下載并安裝EAIS torch rpm軟件包。

        wget https://eais-rel-pub.oss-cn-beijing.aliyuncs.com/packages/eais-torch${libtorch_VERSION}-cxx11-abi-${EAIS_PACKAGE_VERSION}-1.x86_64.rpm
        sudo rpm -ivh eais-torch${libtorch_VERSION}-cxx11-abi-${EAIS_PACKAGE_VERSION}-1.x86_64.rpm --nodeps
        source /etc/profile
      2. 執(zhí)行如下命令,查看eais-torch rpm軟件包安裝結果。

        rpm -qa | grep eais-torch

        回顯信息中包含eais-torch軟件包信息,表示eais-torch rpm軟件包安裝成功。

使用方法

Python程序

您需要在您的Python推理腳本中添加如下一行內(nèi)容,eais-torch才會生效。

import eais.torch_eais

C++程序

假設您用于推理PyTorch模型的C++程序名稱為my_program,且使用如下命令運行您的C++程序:

export LD_LIBRARY_PATH=/your/lib/path:$LD_LIBRARY_PATH
./my_program my_model.pt

如果您需要使用EAIS推理您的PyTorch模型,您可以執(zhí)行如下任意一種命令運行您的C++程序,運行過程中eais-torch自動生效:

  • 命令一:

    export LD_LIBRARY_PATH=/your/lib/path:$LD_LIBRARY_PATH
    LD_PRELOAD=libtorcheais.so ./my_program my_model.pt
  • 命令二:

    export LD_LIBRARY_PATH=/your/lib/path:$LD_LIBRARY_PATH
    export LD_PRELOAD=libtorcheais.so
    ./my_program my_model.pt

eais-miniconda

軟件包說明

軟件包信息

說明

安裝要求

如果您想快速體驗使用EAIS推理的流程,您需要安裝eais-miniconda軟件包。

用途

提供使用EAIS推理的示例代碼以及示例推理程序所需要的模型文件和數(shù)據(jù)文件,還可以提供使用Python腳本推理PyTorch模型的環(huán)境。

當前版本

4.2.5

安裝方法

重要

限制操作系統(tǒng)為Ubuntu。

執(zhí)行如下命令,下載并解壓eais-miniconda軟件包。

wget https://eais-rel-pub.oss-cn-beijing.aliyuncs.com/packages/eais-miniconda.zip
sudo apt-get update && sudo apt-get install -y unzip
unzip -q eais-miniconda.zip
說明

下載的eais-miniconda軟件包中已安裝好PyTorch 1.13.1。

使用方法

  1. 執(zhí)行如下命令,進入eais-miniconda軟件包的根目錄。

    說明

    eais-miniconda/目錄為例,實際目錄以您的安裝目錄為準。

    cd eais-miniconda/
  2. 執(zhí)行如下命令,激活EAIS miniconda環(huán)境。

    source bin/activate
  3. 推理PyTorch模型。

    具體操作,請參見步驟六:推理并加速PyTorch模型

  4. 如果您不再使用EAIS miniconda環(huán)境,您需要執(zhí)行如下命令,退出EAIS miniconda環(huán)境。

    source bin/deactivate