A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.alibabacloud.com/help/en/functioncompute/fc-2-0/user-guide/overview-10 below:

Information about custom runtimes - Function Compute

This topic describes custom runtimes in which you can write functions in Function Compute.

Background

Custom runtimes allow you to customize runtime environments. In a custom runtime, you can create an exclusive function execution environment based on your business requirements. The following items list common scenarios:

Container environments

The following table shows the execution environments that are supported by custom runtimes in Function Compute.

Runtime

Identifier

OS

Architecture

Custom runtimes (Debian10)

custom.debian10

Debian 10

x86_64

Custom runtimes (Debian 9)

custom

Debian 9

x86_64

Custom runtimes (Debian 10) (in public preview) Custom runtimes (Debian 9) Environment information Custom runtimes (Debian10)

The following programming languages are built into Debian 10-based custom runtimes. You can create custom runtimes of the following programming languages without the need to install third-party interpreters or configure layers.

The following table describes the details. For some programming languages, environment variables must be configured.

Programming language

Installation directory

Version

Environment variable

Node.js 20

/var/fc/lang/nodejs20

v20.10.0

PATH=/var/fc/lang/nodejs20/bin:$PATH

Node.js 18

/var/fc/lang/nodejs18

v18.19.0

PATH=/var/fc/lang/nodejs18/bin:$PATH

Python 3.10

/var/fc/lang/python3.10

3.10.9

PATH=/var/fc/lang/python3.10/bin:$PATH

Python 2.7

Default installation directory in the system

2.7.16

N/A

Custom runtimes ( Debian 9)

The following programming languages are built into Debian 9-based custom runtimes. You can create custom runtimes of the following programming languages without the need to install third-party interpreters or configure layers.

Use a non-built-in programming language

If you want to create a custom runtime by using a non-built-in programming language, you must compress the interpreter or runtime of the language and your code file into a package and deploy the package in Function Compute so that your functions can run as expected. For example, if you want to use Node.js 16, you must download the interpreter required for Node.js 16, compress the interpreter and your code file into a package, and then deploy the package in Function Compute. Perform the following operations:

  1. Download Node.js of a 64-bit Linux version to the code package directory.

    wget http://mirrors.nju.edu.cn/nodejs/v16.14.2/node-v16.14.2-linux-x64.tar.gz -O node-v16.14.2-linux-x64.tar.gz && tar -zxvf node-v16.14.2-linux-x64.tar.gz && rm -rf node-v16.14.2-linux-x64.tar.gz
  2. Configure the startup command of Node.js in the custom runtime.

    customRuntimeConfig:
      command:
        - /code/node-v16.14.2-linux-x64/bin/node
      args:
        - 'server.js'
    
    # You can also configure the following environment variables for the function: PATH=/code/node-v16.14.2-linux-x64/bin:/usr/local/bin/apache-maven/bin:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/local/ruby/bin. 
    # After the configuration is complete, you can directly use Node.js to start an HTTP server. 
Install dependencies

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4