All Products
Search
Document Center

FPGA as a Service:Install faascmd

Last Updated:Nov 17, 2023

This topic describes how to download and install faascmd.

Prerequisites

An FPGA-accelerated instance is created and connected by using a tool. For more information, see Connection method overview.

Preparations

Before you install faascmd, make sure that the following operations are performed:

  1. Obtain the AccessKey ID and AccessKey secret of a Resource Access Management (RAM) user.

    For more information, see Obtain an AccessKey pair.

  2. Install Python modules.

    1. Run the following command to check the Python version:

      python -V

      The following figure shows an example of returned results. In this example, the Python version is 2.7.5. Make sure that the Python version is 2.7.X.

    2. Run the following commands to install Python modules:

      pip -q install oss2
      pip -q install aliyun-python-sdk-core
      pip -q install aliyun-python-sdk-faas
      pip -q install aliyun-python-sdk-ram
  3. Run the following command to check the version of aliyun-python-sdk-core for FPGA as a Service (FaaS) SDK for Python:

    cat /usr/lib/python2.7/site-packages/aliyunsdkcore/__init__.py

    The following figure shows an example of returned results.

    2021-09-19_13-17-10
    Note

    Make sure that the version of aliyun-python-sdk-core is 2.11.0 or later. If the version is earlier than 2.11.0, run the pip install --upgrade aliyun-python-sdk-core command to update aliyun-python-sdk-core to the latest version.

Procedure

  1. Run the following command to download faascmd.

    Log on to the FPGA-accelerated instance and run the following command in a directory to download faascmd:

    wget http://fpga-tools.oss-cn-shanghai.aliyuncs.com/faascmd
    Note

    Make a note of the directory because when you configure faascmd, you must set the PATH environment variable to the absolute path of the directory in which faascmd resides. For more information, see Configure faascmd.

  2. Run the following command to make faascmd executable:

    chmod +x faascmd