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:
Obtain the AccessKey ID and AccessKey secret of a Resource Access Management (RAM) user.
For more information, see Obtain an AccessKey pair.
Install Python modules.
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.
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
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.
NoteMake 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
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
NoteMake 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.
Run the following command to make faascmd executable:
chmod +x faascmd