All Products
Search
Document Center

Function Compute:Configure common layers for a function

Last Updated:Feb 02, 2024

Function Compute provides common layers. You can configure layers for functions without the need to customize layers. This topic describes how to configure common layers for a function.

Common layers in Function Compute

Function Compute supports the following common layers that are described in the table of the "Custom runtimes" section. For information about the official common layers in Function Compute, see Common layers.

If the common layers in the table cannot meet your business requirements, contact us.

Custom runtimes

The table in this section describes layers that are compatible with specific custom runtimes, such as Python 3.10 and Node.js 17. In the table, specific dependency libraries are included. For example, the common layer Python310-Package-Collection includes specific common Python dependency libraries.

Common layer

Compatible runtime

Description

References

Python310

  • Custom

  • Custom.Debian10

Python 3.10.5 runtime layer

README.md

Python310-Package-Collection

  • Custom

  • Custom.Debian10

A collection of common dependency libraries for the Python 3.10 runtime

README.md

Python39

  • Custom

  • Custom.Debian10

Python 3.9.13 runtime layer

README.md

Python39-Package-Collection

  • Custom

  • Custom.Debian10

A collection of common dependency libraries for the Python 3.9 runtime

README.md

Python38

  • Custom

  • Custom.Debian10

Python 3.8.13 runtime layer

README.md

Python38-Package-Collection

  • Custom

  • Custom.Debian10

A collection of common dependency libraries for the Python 3.8.13 runtime

README.md

Python36

Custom

Python 3.6.15 runtime layer

README.md

Python36-Package-Collection

Custom

A collection of common dependency libraries for the Python 3.6.15 runtime

README.md

Dotnet6

Custom

ASP.NET 6.0.5 runtime layer

README.md

PHP81

Custom

PHP 8.1 runtime layer

README.md

PHP80

Custom

PHP 8.0 runtime layer

README.md

PHP72

Custom

PHP 7.2 runtime layer

README.md

Java8

Custom.Debian10

Java 8 runtime layer

README.md

Java11

Custom

Java 11 runtime layer

README.md

Java17

Custom

Java 17 runtime layer

README.md

Nodejs18

Custom.Debian10

Node.js 18 runtime layer

README.md

Nodejs17

Custom

Node.js 17 runtime layer

README.md

Nodejs16

  • Custom

  • Custom.Debian10

Node.js 16 runtime layer

README.md

Nodejs14

Custom

Node.js 14 runtime layer

README.md

Nodejs12

Custom

Node.js 12 runtime layer

README.md

Go118

Custom

Go 1.x runtime layer

README.md

Common dependency libraries

Common layer

Compatible runtime

Description

Version (only the version of the core library)

References

Python39-Pandas1x

  • Python 3.9

  • Custom

  • Custom.Debian10

An open source data analysis and processing tool based on NumPy

  • pandas==1.4.3

  • numpy==1.23.2

README.md

Python39-SciPy1x

  • Python 3.9

  • Custom

An open source scientific computing library

  • scipy==1.9.0

  • numpy==1.23.2

README.md

Python36-SciPy1x

  • Python 3.6

  • Custom

An open source scientific computing library

  • scipy-1.5.4

  • numpy-1.19.5

README.md

Python39-PyTorch1x

  • Python 3.9

  • Custom

  • Custom.Debian10

An open source machine learning framework (CPU edition)

  • torch==1.12.1+cpu

  • torchaudio==0.12.1+cpu

  • torchvision==0.13.1+cpu

README.md

Python36-PyTorch1x

  • Python 3.6

  • Custom

An open source machine learning framework (CPU edition)

  • torch==1.10.2+cpu

  • torchaudio==0.10.2+cpu

  • torchvision==0.11.3+cpu

README.md

Python3-Flask2x

  • Python 3.9

  • Python 3.10

  • Custom

  • Custom.Debian10

A Python-based lightweight web framework

v2.2.2

README.md

Nodejs-Puppeteer17x

  • Node.js 16

  • Node.js 14

  • Custom

  • Custom.Debian10

A Headless Chrome tool

puppeteer-v17.1.0

README.md

Nodejs-Puppeteer10x

  • Node.js 16

  • Node.js 14

  • Node.js 12

  • Custom

A Headless Chrome tool

puppeteer-v10.2.0

README.md

Python310-Opencv4x

  • Python 3.10

  • Custom.Debian10

A cross-platform library for computer vision

v4.7.0.68

README.md

SQLite3

  • Python 3.9

  • Node.js 16

  • Node.js 14

  • Java 11

  • Java 8

  • Custom

A lightweight and in-process relational database

3.41.1

README.md

FFmpeg6x

  • Python 3.10

  • Python 3.9

  • Node.js 16

  • Node.js 14

  • Java 11

  • Java 8

  • Custom

  • Custom.Debian10

An open source software project that consists of a large suite of programs used to record audio and videos, convert audio and video formats, and stream audio and video files

6.0

README.md

Nodejs-Puppeteer19x

Custom.Debian10

A Headless Chrome tool

puppeteer-v19.8.5

README.md

Python38-Playwright

Custom.Debian10

puppeteer-v19.8.5

1.31.1

README.md

Poppler22x-Pdf2image

Python 3.10

A library for rendering PDF documents

22.12.0

README.md

ServerlessDevs

  • Python 3.10

  • Python 3.9

  • Python 3

  • Node.js 16

  • Node.js 14

  • Java 11

  • Java 8

  • Go 1

  • .NetCore 3.1

  • PHP 7.2

  • Custom

  • Custom.Debian10

An open source serverless platform that provides a robust set of tools for developers

2.1.14

README.md

Web framework

Common layer

Compatible runtime

Version (only the version of the core library)

References

Python3-Flask2x

  • Python 3.9

  • Custom

flask-2.2.2

README.md

Alibaba Cloud SDKs

Common layer

Compatible runtime

Description

References

Aliyun-DataX

  • Python 2.7

  • Python 3

  • Python 3.6

  • Python 3.9

  • Custom

  • Custom.Debian10

Open source edition of Alibaba Cloud DataWorks Data Integration

README.md

Python39-Aliyun-SDK

  • Python 3.9

  • Custom

Common Alibaba Cloud SDKs for Python 3.9

README.md

Python36-Aliyun-SDK

  • Python 3.6

  • Custom

Common Alibaba Cloud SDKs for Python 3.6

README.md

Nodejs-Aliyun-SDK

  • Node.js 16

  • Node.js 14

  • Node.js 12

  • Custom

  • Custom.Debian10

Common Alibaba Cloud SDKs for Node.js16, Node.js 14, and Node.js 12

README.md

Configure common layers in the Function Compute console

Prerequisites

A function is created. For more information, see the "Create a function" section of the Manage functions topic.

Procedure

  1. Log on to the Function Compute console. In the left-side navigation pane, click Function.

  2. In the top navigation bar, select a region. On the Function page, click the name of the function that you want to manage.

  3. On the page that appears, click the Configuration tab.

  4. In the left-side navigation pane, click the Layers tab. On the Layers tab, click Modify. In the Layer panel, choose + Add Layer > Add Official Common Layer.

  5. In the Official Common Layer drop-down list, view the description and license information of the layer and select an official common layer. In the Layer Version drop-down list, select a layer version and click OK.

Note
  • A function can be configured with a maximum of five layers, including custom layers and public layers.

  • When multiple layers are configured for a function, the content of these layers is merged to the /opt directory in reverse order. If layers contain files with the same name, the files in the first configured layer overwrites the files with the same names in the later configured layer.