Container creation method, device and system and storage medium

By caching container instance snapshots and driver executable files of parallel processing units in the cache pool of the storage cluster, the problem of container cold startup delay in Serverless scenarios is solved, and the container creation and startup speed is improved.

CN119512678APending Publication Date: 2025-02-25HANGZHOU ALICLOUD FEITIAN INFORMATION TECH CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202311034259.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-16
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

The delay problem caused by the cold startup of container instances in Serverless scenarios affects the container startup speed.

Method used

By pre-cacheting the executable files of the container instance snapshot and parallel processing unit drivers in the cache pool of the storage cluster, reading from the cache pool through the intranet during container creation, reducing the download of the mirror layer and the compilation and installation time of the drivers.

Benefits of technology

This improves the container creation speed, thereby speeding up the container startup speed, and solves the problem of container startup delay in Serverless scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512678A_ABST
    Figure CN119512678A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a container creating method, device and system and a storage medium. In the embodiment of the invention, the snapshot of the container instance and the compiled driver of the parallel processing unit are cached in the cache pool of the storage cluster in advance, namely the executable file of the cache driver is cached. When the container is created, the container mirror image snapshot and the executable file of the driver of the parallel processing unit are read from the cache pool through the intranet, and the container mirror image and the driver do not need to be pulled from a mirror image warehouse through a public network, so that on one hand, downloading of a mirror image layer is reduced, and the container creation speed can be increased; on the other hand, the executable file of the driver is directly obtained, the driver does not need to be compiled and installed in the instance creating process, the compiling and installing time of the driver can be shortened, and the container creating speed is further increased. The increase of the container creation speed is beneficial to increase of the container starting speed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of cloud computing technology, and in particular to a container creation method, device, system and storage medium. Background Art

[0002] Serverless computing is a model of cloud computing. Based on Platform as a Service (PaaS), Serverless provides a micro-architecture where end customers do not need to deploy, configure or manage server services. The server services required for code execution are all provided by the cloud platform.

[0003] While Serverless brings high elasticity and flexibility, it also leads to the inevitable cold start problem. Since container instances are usually released after executing requests, when a request arrives, if there is no available instance, a new container instance needs to be started from scratch to process the request. That is, in the Serverless scenario, the container instance is started as a cold start, and all resources are cold started, including the preparation of computing, storage and network resources, as well as the pulling and creation of container images.

[0004] When a cold start occurs, the Serverless service platform needs to perform a series of operations such as instance scheduling, container image pulling, instance creation, resource configuration, operating environment initialization, and code loading. The delay caused by this process can usually be several times the actual execution time of the request. Therefore, how to accelerate container startup has become a technical problem that needs to be solved in this field. Summary of the invention

[0005] Multiple aspects of the present application provide a container creation method, device, system and storage medium to increase the container creation speed and thereby increase the container startup speed.

[0006] In a first aspect, an embodiment of the present application provides a container creation method, which is applicable to a control node in a computing system, wherein the computing system is connected to an intranet of a storage cluster; the storage cluster is provided with a cache pool; the cache objects in the cache pool include: a container image snapshot and an executable file of a driver; the driver is used to drive a parallel processing unit;

[0007] The method comprises:

[0008] Get the container creation request;

[0009] Based on the container creation request, determining a target container image snapshot and a target driver that satisfy the container creation request from cache objects in the cache pool;

[0010] Controlling a computing node to obtain the target container image snapshot and the executable file of the target driver from the storage cluster; the computing node belongs to a computing cluster in the computing system;

[0011] Controlling the computing node to create a target container instance on a target parallel processing unit to which the computing node is communicatively connected based on the target container image snapshot;

[0012] The computing node is controlled to run the target driver in the target container instance based on the executable file of the target driver.

[0013] In a second aspect, an embodiment of the present application further provides a container creation method, which is applicable to a computing node in a computing system, wherein the computing system is connected to an intranet of a storage cluster; the storage cluster is provided with a cache pool; the cache objects in the cache pool include: a container image snapshot and an executable file of a driver; the driver is used to drive a parallel processing unit;

[0014] The method comprises:

[0015] Receiving an identifier of a target container image snapshot and an identifier of a target driver sent by a control node in the computing system; the target container image snapshot and the target driver satisfy the container creation request;

[0016] Based on the identifier of the target container image snapshot and the identifier of the target driver, obtaining the target container image snapshot and the executable file of the target driver from the cache pool;

[0017] Based on the target container image snapshot, create a target container instance on the target parallel processing unit;

[0018] Based on the executable file of the target driver, the target driver is run in the target container instance.

[0019] In a third aspect, an embodiment of the present application further provides a container creation method, which is applicable to a control node in a computing system, wherein the computing system is connected to an intranet of a storage cluster; the storage cluster is provided with a cache pool; the cache objects in the cache pool include: a container image snapshot and an executable file of a graphics processing unit GPU driver; the GPU driver is used to drive the GPU;

[0020] The method comprises:

[0021] Obtain a container creation request provided by a target application; the container creation request is used to request the creation of a target container instance of a model training service or an image processing service required by the target application;

[0022] Based on the container creation request, determining a target container image snapshot and a target GPU driver that satisfy the container creation request from cache objects in the cache pool;

[0023] Controlling a computing node to obtain the target container image snapshot and the executable file of the target GPU driver from the storage cluster; the computing node belongs to a computing cluster in the computing system;

[0024] Control the computing node to create a target container instance on a target GPU to which the computing node is communicatively connected based on the target container image snapshot;

[0025] The computing node is controlled to run the target GPU driver in the target container instance based on the executable file of the target driver, so as to run the target container instance to provide the model training service or the image processing service to the target application.

[0026] In a fourth aspect, an embodiment of the present application further provides a container creation method, which is applicable to a computing node in a computing system, wherein the computing system is connected to an intranet of a storage cluster; the storage cluster is provided with a cache pool; the cache objects in the cache pool include: a container image snapshot and an executable file of a graphics processing unit GPU driver; the GPU driver is used to drive the GPU;

[0027] The method comprises:

[0028] Receive an identifier of a target container image snapshot and an identifier of a target GPU driver sent by a control node in the computing system; the target container image snapshot and the target GPU driver satisfy a container creation request; the container creation request is used to request creation of a target container instance of a model training service or an image processing service required by the target application;

[0029] Based on the identifier of the target container image snapshot and the identifier of the target GPU driver, obtaining the target container image snapshot and the executable file of the target GPU driver from the cache pool;

[0030] Based on the target container image snapshot, create a target container instance on a target GPU to which the computing node is communicatively connected;

[0031] Based on the executable file of the target GPU driver, the target GPU driver is run in the target container instance to run the target container instance to provide the model training service or the image processing service to the target application.

[0032] The embodiment of the present application also provides a computing system, including: a management and control node and a computing cluster; the computing system and the storage cluster communicate via an intranet; the computing cluster includes: a computing node; the computing node is communicatively connected to a target parallel processing unit;

[0033] The storage cluster is provided with a cache pool; the cache objects in the cache pool include: a container image snapshot, an executable file of a driver, and a container instance snapshot; the driver is used to drive a parallel processing unit; the container instance snapshot includes: a combination of the container image snapshot and the executable file of the driver;

[0034] The control node is used to execute the steps in the container creation method provided in the first aspect and / or the third aspect above;

[0035] The computing node is used to execute the steps in the container creation method provided in the second aspect and / or the fourth aspect.

[0036] In a fifth aspect, an embodiment of the present application further provides a computing device, comprising: a memory and a processor; wherein the memory is used to store a computer program;

[0037] The processor is coupled to the memory, and is configured to execute the computer program to execute the steps in the container creation method provided in the first aspect, the second aspect, the third aspect and / or the fourth aspect.

[0038] In a sixth aspect, an embodiment of the present application further provides a computer-readable storage medium storing computer instructions, which, when executed by one or more processors, causes the one or more processors to execute the steps in the container creation method provided in the first, second, third and / or fourth aspects above.

[0039] In an embodiment of the present application, the container instance snapshot and the compiled parallel processing unit driver are cached in advance in the cache pool of the storage cluster, that is, the cache driver executable file. When the container is created, the container image snapshot and the executable file of the driver of the parallel processing unit are read from the cache pool through the intranet, without pulling the container image and driver from the image warehouse through the public network. On the one hand, the download of the image layer is reduced, which can speed up the container creation speed; on the other hand, the driver executable file is directly obtained, and there is no need to compile and install the driver during the instance creation process, which can reduce the compilation and installation time of the driver and further improve the container creation speed. The improvement of container creation speed helps to improve the container startup speed. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0041] Figure 1 A schematic diagram of the structure of a computing system provided in an embodiment of the present application;

[0042] Figure 2 A schematic diagram of a cache object provided in an embodiment of the present application;

[0043] Figure 3 A schematic diagram of the process of making a cache object provided in an embodiment of the present application;

[0044] Figure 4-Figure 7 A schematic diagram of a process for creating a container provided in an embodiment of the present application;

[0045] Figure 8 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to make the purpose, technical solution and advantages of the present application clearer, the technical solution of the present application will be clearly and completely described below in combination with the specific embodiments of the present application and the corresponding drawings. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present application.

[0047] The inventor of the present application has found that during the cold start of a container instance, container image pulling is the main bottleneck that affects the time consumption of container startup, and the container image pulling time ranges from a few seconds to a few hours. In the existing solution, during the cold start of a container instance, the container image is pulled from the image repository in the cloud, and the container image pulling time is relatively long.

[0048] In some solutions, in order to improve the service efficiency of Serverless, heterogeneous resources are used to offload container instances to heterogeneous resource devices, and the heterogeneous resource devices run container instances to provide computing services, etc., thereby realizing the offloading of Serverless services. Among them, heterogeneous resource devices refer to devices or devices with computing resources in other forms besides central processing units (CPUs). For example, graphics processing units (GPUs), field-programmable gate arrays (FPGAs), etc. This way of providing Serverless services by offloading heterogeneous resources can accelerate services on the one hand; on the other hand, since container instances are offloaded to heterogeneous resource devices, the CPU load of the device is reduced, the CPU resource consumption is reduced, and the probability of CPU performance bottlenecks is reduced.

[0049] In the scenario of unloading container instances with heterogeneous resources, the compilation and installation of the drivers of heterogeneous resources is also very time-consuming, and it takes minutes from driver compilation to installation. Obviously, in the Serverless scenario where the startup speed of container instances is required to be high, these time-consuming constraints do not meet the latency requirements of Serverless.

[0050] In order to improve the container startup speed in the Serverless scenario, in some embodiments of the present application, the container instance snapshot and the compiled parallel processing unit driver are cached in advance in the cache pool of the storage cluster, that is, the cache driver executable file. When the container is created, the container image snapshot and the executable file of the driver of the parallel processing unit are read from the cache pool through the intranet, without pulling the container image and driver from the image repository through the public network. On the one hand, the download of the image layer is reduced, which can speed up the container creation speed; on the other hand, the driver executable file is directly obtained, and there is no need to compile and install the driver during the instance creation process, which can reduce the driver compilation and installation time and further improve the container creation speed. The improvement of container creation speed helps to improve the container startup speed.

[0051] The technical solutions provided by various embodiments of the present application are described in detail below in conjunction with the accompanying drawings.

[0052] It should be noted that the same reference numerals denote the same objects in the following drawings and embodiments, and therefore, once an object is defined in one drawing or embodiment, it does not need to be further discussed in the subsequent drawings and embodiments.

[0053] Figure 1 This is a schematic diagram of the structure of the computing system provided in the embodiment of the present application. Figure 1As shown, the computing system S10 includes: a management and control node 10 and a computing cluster 20. The computing cluster 20 includes: a computing node 201. The computing node 201 is generally multiple. Multiple means 2 or more.

[0054] The computing node 201 is in communication connection with the parallel processing unit 202. In this embodiment, the computing node 201 can be any computer device with computing, storage and communication functions, that is, a physical machine. For example, the computing node 201 can be a server, a computer, a mobile phone, etc. Of course, the computing node 201 can also be a virtual machine deployed on a physical machine, etc.

[0055] In this embodiment, the computing node 201 may include: a general processing unit, etc. In this embodiment, the number of general processing units is not limited. There may be at least one general processing unit, that is, one or more general processing units; each general processing unit may be a single-core processing unit or a multi-core processing unit.

[0056] In this embodiment, the general processing unit is generally a processing chip arranged on the mainboard of the computing node 201, such as the CPU of the computing node 201 (not shown in the accompanying drawings), etc., and single-machine expansion cannot be achieved. The general processing unit can be any processing device with processing and computing capabilities. The general processing unit can be a serial processing unit or a parallel processing unit. For example, the general processing unit can be a general-purpose processor, such as a CPU. A parallel processing unit refers to a processing device that can perform parallel computing and processing. For example, the parallel processing unit can be a graphics processing unit (GPU) or a field programmable gate array (FPGA). Optionally, the memory of the general processing unit is greater than the memory of the parallel processing unit.

[0057] The parallel processing unit 202 is any device or apparatus having a parallel computing function, and can be a GPU or a programmable hardware device.

[0058] Among them, the programmable hardware device can be a hardware processor built by an electronic device, or a hardware processor that uses a hardware description language (HDL) for data processing. Among them, the hardware description language can be a very high-speed integrated circuit hardware description language (VHDL), Verilog HDL, System Verilog or System C, etc. Correspondingly, the parallel processing unit 202 can be an FPGA, a programmable array logic device (PAL), a general array logic device (GAL), a complex programmable logic device (CPLD), etc. Alternatively, the parallel processing unit 202 can also be an application specific integrated circuit (ASIC) or a data processing unit (DPU), etc. Among them, the DPU is a dedicated electronic circuit with hardware acceleration function, which is used for data-centric computing.

[0059] In the present embodiment, the parallel processing unit 202 is connected to the computing node 201 by communication, and specifically, the parallel processing unit 202 is connected to the CPU of the computing node 201 by communication. Specifically, the parallel processing unit 202 and the computing node 201 can be connected to each other by communication through a bus interface. Wherein, the bus interface can be a serial bus interface, such as a peripheral component interconnect Express (PCIe) bus interface, a peripheral component interconnect (PCI) bus interface, an Ultra Path Interconnect (UPI) bus interface, a universal serial bus (USB) serial interface, an RS485 interface or an RS232 interface, etc. Preferably, the bus interface is a PCIe interface, which can improve the data transmission rate between the parallel processing unit 202 and the computing node 201.

[0060] The bus interface of the computing node 201 can be expanded according to the specifications of the physical machine corresponding to the computing node 201. Generally, the communication interface of the physical machine is multiple. "Multiple" in the embodiments of the present application refers to more than one, that is, two or more. When the parallel processing unit 202 is connected to the computing node 201 through a bus interface communication, the parallel processing unit 202 may be one or more. The implementation forms of multiple parallel processing units 202 may be the same, or may be partially or completely different. For example, in some embodiments, the multiple parallel processing units 202 may all be FPGAs, or all may be DPUs, ASICs, or GPUs, etc. In other embodiments, the multiple parallel processing units 202 may be partially FPGAs, partially DPUs, ASIC chips, or GPUs, etc., but are not limited to this.

[0061] In some embodiments, the parallel processing unit 202 and the computing node 201 may be arranged in different physical machines, and the computing node 201 and the parallel processing unit 202 may be connected via network communication. For example, the computing node 201 and the parallel processing unit 202 may be arranged in different cloud servers, and connected via network communication; and so on. Figure 1 The figure only illustrates that the computing node 201 and the parallel processing unit 202 are arranged on the same physical machine, but this does not constitute a limitation.

[0062] In this embodiment, the computing system S10 and the storage cluster S20 communicate via an intranet. The intranet may be a local area network, a virtual private cloud (VPC) or a virtual private network (VPN). In this way, the computing system S10 and the storage cluster S20 communicate via an intranet, which can increase the communication speed compared to communicating via a public network, thereby increasing the speed at which the computing system S10 accesses the storage cluster S20.

[0063] In this embodiment, in order to reduce the pressure on the CPU of the computing node 201 and reduce the probability of the CPU reaching a performance bottleneck, the computing node 201 can map the parallel processing unit 202 to a virtual device of the computing node through virtualization technology; and through the mapped virtual device, the container instance is unloaded to the parallel processing unit 202. Due to its strong parallel computing capability, the parallel processing unit 202 can increase the running speed of the application corresponding to the container instance.

[0064] In order to enable the parallel processing unit 202 to operate, the container instance unloaded to the parallel processing unit 202 must also be installed with the driver of the parallel processing unit 202. Among them, the driver of the parallel processing unit 202 refers to the computer program that drives the parallel processing unit 202. It is the software corresponding to the hardware and is used to drive the parallel processing unit. In each embodiment of the present application, the driver refers to the driver of the parallel processing unit. For example, if the parallel processing unit is a GPU, the driver is a GPU driver.

[0065] Since the container instance is unloaded in the parallel processing unit to realize the scenario of accelerating the operation of the application corresponding to the container instance, the speed of container startup is mainly limited by the pulling of the container image of the container instance and the compilation and installation of the driver of the parallel processing unit. Therefore, in order to realize the acceleration of container startup, the pre-installation function of the container image cache and the driver of the parallel processing unit is provided in this embodiment. The container image to be used can be made into a container image snapshot in advance and stored in the storage cluster S20. When creating a container instance, a container instance can be created based on the container image snapshot, avoiding or reducing the download of the image layer, improving the creation speed of the container instance, and then improving the container startup speed. On the other hand, the driver to be used is cached in advance, and the driver is compiled and installed in advance to obtain the executable file of the driver. In this way, after the container instance is created, the driver can be run in the container instance to further improve the container startup speed.

[0066] Based on the above analysis, in this embodiment, if Figure 2 As shown, a cache pool can be set in the storage cluster S20. The cache objects in the cache pool may include: container image snapshots and driver executable files. Among them, the driver refers to the driver of the parallel processing unit. The container image snapshot and the driver executable file can be stored in the cache pool in an independent form; of course, the container image snapshot and the driver executable file can also be stored in the cache pool in the form of a container instance snapshot. Among them, the container instance snapshot includes a combination of a container image snapshot and a driver executable file. The container image snapshot is stored in the cache pool in an independent form and the driver executable file is stored in the cache pool in an independent form, both compared to being stored in the cache pool in the form of a container instance snapshot. Among them, the container image snapshot mainly refers to the container image snapshot stored in the cache pool as an independent file. The driver executable file is stored in the cache pool in an independent form, which mainly refers to the driver executable file being stored in the cache pool as an independent file.

[0067] A container image is a lightweight, executable, independent software package used to package a software runtime environment and software developed based on the runtime environment. It contains all the content required to run a piece of software, including code, runtime, libraries, environment variables, and configuration files. A container image snapshot is a copy of a container image. A container image can be a general container image or a user-defined container image, called a custom container image. A general container image is a container image provided by the cloud service platform and is available to all users. A custom container image is a container image hosted by a user on the cloud service platform and is only available to the user who provided the custom container image. Accordingly, container image snapshots can also be divided into general container image snapshots and custom container image snapshots. Among them, a general container image snapshot is a snapshot of a general container image and is available to all users; a custom container image snapshot is a snapshot of a custom container image and is only available to the user who provided the custom container image.

[0068] Users can also customize system configuration information. System configuration information refers to the kernel information that the container depends on to run, including but not limited to: kernel version information and memory parameter information. Some custom container image snapshots are compatible with general system configuration information, while some custom container image snapshots have special requirements for kernel information, which requires users to provide customized system configuration information. Among them, general system configuration information refers to the system configuration information provided by the cloud service platform based on the general container image, which can be compatible with general container image snapshots, and can also be compatible with custom container image snapshots that have no special requirements for system configuration information.

[0069] In this embodiment, the driver of the parallel processing unit carries system configuration information, which includes user-defined system configuration information and general system configuration information.

[0070] Based on the custom container image snapshot and the universal container image snapshot, the cache objects in the cache pool may include the following scenarios: (1) a driver carrying custom system configuration information; (2) a driver carrying universal system configuration information; (3) a driver carrying custom system configuration information, combined with a container image snapshot; (4) a driver carrying a universal container image, combined with a universal container image snapshot; (5) a custom container image snapshot, etc.

[0071] The above-mentioned driver with custom system configuration information can only be used in combination with a custom container image snapshot, and can only be used by users who provide custom container images. The combination of a driver with custom system configuration information and a container image snapshot can only be used by users who provide custom system configuration information.

[0072] Accordingly, in some embodiments, the control node 10 may provide a configuration interface for the container image and system configuration information, such as an application programming interface (API). Based on the configuration interface for the container image and system configuration information, the user may independently configure the container image and system configuration information to obtain a customized container image and customized system configuration information. Accordingly, the control node 10 may obtain the customized container image and customized system configuration information provided through the configuration interface.

[0073] In this embodiment, the management and control node 10 can create a cache object. Specifically, Figure 3 As shown, the control node 10 can obtain the container image to be cached and the driver to be cached. Among them, the container image to be cached can be one or more. Multiple means two or more. The container image to be cached can include a general container image or a custom container image.

[0074] The drivers to be cached may include: drivers carrying general system configuration information, and drivers carrying customized system configuration information. The number of drivers to be cached may be one or more. Multiple means two or more. The number of drivers carrying general system configuration information may also be one or more. Of course, the number of drivers carrying customized system configuration information may also be one or more.

[0075] In this embodiment, the specific implementation method of the control node 10 obtaining the container image to be cached and the driver to be cached is not limited. In some embodiments, the container image to be cached may be a hot container image, that is, a container image that is frequently used within a period of time, which can be defined as a container image whose usage frequency meets the set frequency requirement within a set time period. The set frequency requirement can be: the usage frequency is greater than or equal to the set frequency threshold; it can also be: the usage frequency is the maximum, etc., but is not limited thereto.

[0076] Accordingly, the management and control node 10 can obtain the historical usage data of the container image in the image repository within the set historical time period; the historical time period is the same time period as the prediction time window in the set scheduling cycle. The prediction time window is a time window used to predict hot container images for a period of time in the future. For example, the current time is 8:00 on July 3, 2023, and the prediction time window is the next hour (ie, 8:00-9:00), then the setting scheduling cycle can be 1 day, and the same time period in the setting scheduling cycle is 8:00-9:00 every day. Accordingly, the historical time period is historical 8:00-9:00, such as 8:00-9:00 every day in the last week, 2 weeks, one month or 2 months from the current time. For another example, if the prediction time window is Tuesday this week, the setting scheduling cycle can be 1 week, and the same time period in the setting scheduling cycle can be every Tuesday. Accordingly, the historical time period can be Tuesdays in the past, such as every Tuesday in the last 1 month, 2 months or 3 months from the current time.

[0077] Based on the historical usage data of the container images in the image repository within the set historical time period, the management and control node 10 can determine the hot container images within the predicted time window from the container images in the image repository as the container images to be cached.

[0078] In some embodiments, the control node 10 may use a big data statistical method to determine the hot container image. Specifically, the control node 10 may determine the usage frequency of the container images in the image repository in the historical time period based on the historical usage data of the container images in the image repository in the historical time period; and select the hot container image whose usage frequency meets the set frequency requirement from the container images in the image repository as the container image to be cached.

[0079] In other embodiments, in order to improve the accuracy of determining the hotspot container image, a neural network model can be introduced. In the embodiments of the present application, the specific implementation form of the neural network model is not limited. Optionally, the neural network model may be a convolutional neural network (CNN), a deep learning neural network (DNN), a recurrent neural network (RNN), or a convolutional neural tensor network (CNTN), etc., or the neural network model may also be a classification model, such as a random forest model, a gradient boosting decision tree (GBDT), or a boosting tree model (XGBoost), etc., but is not limited thereto.

[0080] The neural network model is used to predict hot container images, which is defined as a hot container image prediction model. The hot container image prediction model is obtained by using the historical usage data of container image samples that are pre-labeled with hot and cold identifiers as training samples. The historical usage data of the container image samples includes: the usage time of the container image samples and the identifier of the container image samples, but is not limited to this. When used online, the input of the hot container image prediction model can be: the historical usage data of the container image, and the output is: the hot and cold classification of the container image, that is, whether the container image is a hot container image or a cold container image.

[0081] In this embodiment, the minimization of the loss function is used as the training objective, and the historical usage data of the container image samples pre-labeled with hot and cold identifications are used as training samples. The initial model corresponding to the hot container image prediction model is trained to obtain the hot container image prediction model. Among them, the loss function is determined by the difference between the predicted hot and cold identifications of the container image samples output by the model training and the hot and cold identifications pre-labeled by the container image samples. For example, in some embodiments, the loss function can be implemented as: the mean square error, variance or standard deviation between the predicted hot and cold identifications of the container image samples output by the model and the hot and cold identifications of the pre-labeled container image samples.

[0082] In some embodiments, assuming that the container image sample is a hot container image, the hot and cold flags are pre-marked as 1; if the container image sample is a cold container image, the hot and cold flags are pre-marked as 0, and the loss function can be expressed as:

[0083]

[0084] Wherein, in the above formula (1), N represents the total number of container image samples, and i represents the i-th container image sample. i=1, 2, ..., N. p i represents the pre-labeled hot and cold labels of the i-th container image sample, p i Equal to 0 or 1. Indicates the value corresponding to the predicted hot and cold flags of the i-th container image sample, which is generally any value between 0 and 1.

[0085] The implementation forms of the loss functions shown in the above embodiments are only exemplary and do not constitute limitations.

[0086] Based on the trained hot container image prediction model, the management and control node 10 can use the hot container image prediction model to predict hot container images for the historical usage data of the container images in the image repository within the historical time period, so as to determine the hot container images of the container images in the image repository within the prediction time window as the container images to be cached.

[0087] Specifically, the management and control node 10 can use the hot container image prediction model to perform hot container image prediction on the historical usage data of the container images in the image repository within the historical time period to determine the hot and cold identifiers of each container image in the image repository; according to the hot and cold identifiers of each container image in the image repository, select the container image with the hot identifier as the hot identifier from the image repository, that is, the hot container image, as the container image to be cached.

[0088] In some embodiments, the historical usage data of the container image may also include: the driver running on the container instance corresponding to the container image. Accordingly, the management and control node 10 may also obtain the driver running on the container instance corresponding to the container image to be cached in the historical time period from the historical usage data of the container image to be cached in the historical time period as the driver to be cached.

[0089] The implementation methods of obtaining the container image to be cached and the driver to be cached shown in the above embodiment are only exemplary and do not constitute a limitation.

[0090] For the driver to be cached, the management and control node 10 can compile the driver to be cached to obtain the executable file of the driver to be cached. Specifically, the driver to be cached is compiled into assembly language; further, the assembly language can be translated into target machine language; and each segment contained in the target machine language is written into the segment position corresponding to the relocatable file; thereafter, the name, relative address and size of each segment contained in the target machine language are written into the segment header of the relocatable file, thereby obtaining the relocatable file of the driver to be cached. Further, the relocatable file can be linked to obtain the information segment of the executable file. Further, the information segment of the executable file can be relocated from the relative address to the absolute address to obtain the executable file of the driver to be cached.

[0091] For the container image to be cached and the driver to be cached, the container image to be cached can be independently used as a cache object and stored in the cache pool, and the executable file of the driver to be cached can also be independently used as a cache object and stored in the cache pool. Of course, the container image to be cached and the executable file of the driver to be cached can also be combined as a cache object and stored in the cache pool.

[0092] For an embodiment in which a combination of a container image to be cached and an executable file of a driver to be cached is stored in a cache pool as a cache object, the management node 10 may create a container instance based on the container image to be cached; and install the executable file of the driver to be cached in the container instance; thereafter, a snapshot of the container instance with the executable file of the driver to be cached installed may be stored in the cache pool as a cache object. The snapshot of the container instance with the executable file of the driver to be cached installed may be referred to as a container instance snapshot, including: a combination of a container image snapshot corresponding to the container instance and the executable file of the driver running in the container instance.

[0093] The above embodiment exemplifies the process of making cache objects, but does not constitute a limitation. In the embodiment of the present application, in addition to providing a method for making cache objects, dynamic updates of cache objects can also be supported. Specifically, the management and control node 10 can also monitor the usage of cache objects in the cache pool; if there are cache objects in the cache pool that have not been used within a set time period after the predicted time window is reached, the cache objects that have not been used within the set time period are deleted from the cache pool, and non-hotspot cache objects are automatically eliminated, ensuring the smallest possible cache quantity, which helps to accelerate the startup of containers across the entire network.

[0094] Based on the cache objects in the above-mentioned cache pool, an embodiment of the present application provides a container creation method based on cache objects. This method can read the container image snapshot and the executable file of the driver of the parallel processing unit from the storage cluster through the intranet. Compared with the traditional solution of pulling the container image and driver from the image warehouse through the public network, it reduces the download of the image layer and can speed up the container creation speed. On the other hand, in the traditional solution, during the container startup process, the driver is compiled and installed on the parallel processing unit, while the present application can obtain the driver's executable file directly from the cache pool through the intranet, without the need to compile and install the driver, which can reduce the driver's compilation and installation time and further improve the container startup speed.

[0095] Specifically, Figure 1 As shown, the user terminal 30 can send a container creation request (corresponding to Figure 1 Step 1). Specifically, the target application of the user end 30 can be used to request the creation of a container instance that provides the required services. The services required by the target application include, but are not limited to, data processing services, video services, and online education services. The data processing service can be a model (neural network model) training service or an image processing service. The management node 10 can determine the target container image snapshot and the target driver (corresponding to the target container image snapshot) that meet the container creation request from the cache objects in the cache pool according to the container creation request. Figure 1 Step 2).

[0096] In some embodiments, the user may specify the container image to be used through the user terminal 30. Accordingly, the container creation request may include: the container image identifier to be used. The container image identifier is the identifier of the target container image snapshot. Accordingly, the management and control node 10 may obtain the identifier of the target container image snapshot from the container creation request; and use the identifier of the target container image snapshot to match the cache objects stored in the cache pool to determine the target cache object containing the target container image snapshot. Among them, the target cache object may be one or more. Multiple means two or more. The target cache object may include container image snapshots stored in an independent form, and may also include container instance snapshots.

[0097] If the target cache object is a container instance snapshot, the target driver can be determined from the container instance snapshot determined as the target cache object. Specifically, in some embodiments, the user can specify the driver type and version information requested, and the container creation request may include: the driver type and version information requested. Accordingly, the type and version information of the driver requested can be obtained from the container creation request; and from the container instance snapshot determined as the target cache object, a driver whose driver type and version information are consistent with the type and version information of the driver requested as described above is determined as the target driver.

[0098] In some embodiments, the driver type and version information used by default can be pre-set. Then, when the driver type and version information are not included in the container creation request, the management node 10 can select a driver with a default driver type and default version information from the container instance snapshot determined as the target cache object as the target driver.

[0099] In other embodiments, the use priority of the driver, i.e., the driver priority, may be pre-configured. Accordingly, when the container creation request does not include the driver type and version information, the management node 10 may select the driver with the highest driver priority as the target driver from the container instance snapshot determined as the target cache object according to the pre-configured driver priority.

[0100] In some embodiments, the target cache object is a target container image snapshot. In some embodiments, the user can specify the driver type and version information requested, and the container creation request may include: the driver type and version information requested. Accordingly, the management and control node 10 can obtain the type and version information of the driver requested from the container creation request; and determine the driver whose driver type and version information are consistent with the type and version information of the driver requested from the drivers stored in an independent form in the cache pool, as the target driver.

[0101] Alternatively, the default driver type and version information may be pre-set. Then, when the driver type and version information are not included in the container creation request, the management node 10 may select a driver whose driver type is the default driver type and whose version information is the default version information from the drivers stored in an independent form in the cache pool as the target driver.

[0102] In other embodiments, the use priority of the driver, i.e., the driver priority, may be pre-configured. Accordingly, when the container creation request does not include the driver type and version information, the management node 10 may select the driver with the highest driver priority from the drivers stored in an independent form in the cache pool according to the pre-configured driver priority as the target driver.

[0103] The above embodiment exemplifies the specific implementation method of determining the target container image snapshot and target driver that meet the container creation request, but does not constitute a limitation. In short, the embodiment of the present application can automatically select a suitable container image snapshot and a driver of the parallel processing unit for the container creation request from the cache objects in the cache pool based on the container image request. During the whole process, the user table only needs to specify the container image to be used, and the user is unaware of the whole selection process.

[0104] After determining the target container image snapshot and the target driver of the parallel processing unit, the control node 10 may provide the identifier of the target container image snapshot and the identifier of the target driver to the computing node 201 (corresponding to Figure 1 Step 3).

[0105] The computing node 201 can obtain the target container image snapshot and the executable file of the target driver (corresponding to the target container image snapshot) from the cache pool of the storage cluster S20 based on the identifier of the target container image snapshot and the identifier of the target driver. Figure 1 Step 4); further, based on the target container image snapshot, a target container instance can be created on the target parallel processing unit 202 to which the computing node 201 is connected in communication; and based on the executable file of the target driver, the target driver (corresponding to Figure 1 Step 5).

[0106] Furthermore, the target parallel processing unit 202 may run a target container instance to provide required services to the target application, such as a model training service or an image processing service.

[0107] In this embodiment, the container instance snapshot and the compiled parallel processing unit driver are cached in advance in the cache pool of the storage cluster, that is, the executable file of the cache driver is cached. When the container is created, the container image snapshot and the executable file of the driver of the parallel processing unit are read from the cache pool through the intranet, without pulling the container image and driver from the image repository through the public network. On the one hand, the download of the image layer is reduced, which can speed up the container creation speed; on the other hand, the driver executable file is directly obtained, and there is no need to compile and install the driver during the instance creation process, which can reduce the compilation and installation time of the driver and further improve the container creation speed. In short, the embodiment of the present application decouples the container image pulling time and the parallel processing unit driver compilation and installation time from the Serverless container cold start time, which can achieve container startup acceleration in the Serverless scenario.

[0108] In addition, since the container instance can provide a sandbox environment, the data between users of the container instance is isolated from each other, which can ensure data security. In the above embodiment, the cache pool does not restrict the format of the container image, and can support the caching of container images in various formats without being affected by the container image format.

[0109] In an embodiment of the present application, in addition to providing a method for accelerating container creation, cache pool upgrades are also supported. Accordingly, the management and control node 10 can monitor cache upgrade events for the cache pool. In an embodiment of the present application, the specific implementation form of the cache upgrade event is not limited. In some embodiments, the cache upgrade event can be implemented as an upgrade or update of a cache object. Accordingly, the management and control node 10 can determine the cache object to be upgraded from the cache pool according to a set grayscale ratio when a cache update event for the cache pool is detected; based on the cache upgrade event, the cache object to be upgraded is cached and upgraded.

[0110] In addition to the above system embodiments, the embodiments of the present application also provide a container creation method. The container creation method provided in the embodiments of the present application is exemplarily described below.

[0111] Figure 4 The following is a flow chart of a container creation method provided in an embodiment of the present application. Figure 4 As shown, the container creation method mainly includes:

[0112] 401. Get container creation request.

[0113] 402. Based on the container creation request, determine a target container image snapshot and a target driver that satisfy the container creation request from cache objects in the cache pool.

[0114] 403. Control the computing node to obtain the target container image snapshot and the executable file of the target driver from the storage cluster; the computing node belongs to the computing cluster in the computing system.

[0115] 404. Control the computing node to create a target container instance on a target parallel processing unit to which the computing node is communicatively connected based on the target container image snapshot.

[0116] 405. The control computing node runs the target driver in the target container instance based on the executable file of the target driver.

[0117] The above container creation method is mainly applicable to the control node in the computing system. The computing system includes: a control node and a computing cluster. Among them, the computing cluster includes: a computing node. The computing node is connected to the parallel processing unit for communication. For the description of the implementation form and connection method of the control node, the computing node and the parallel processing unit, please refer to the relevant content of the above system embodiment, which will not be repeated here.

[0118] In this embodiment, the computing system and the storage cluster communicate via an intranet, which can increase the communication speed compared to communicating via a public network, thereby increasing the speed at which the computing system accesses the storage cluster.

[0119] In this embodiment, in order to reduce the pressure on the computing node and reduce the probability of the CPU reaching a performance bottleneck, the computing node can map the parallel processing unit to a virtual device of the computing node through virtualization technology; and unload the container instance to the parallel processing unit through the mapped virtual device. The parallel processing unit can increase the running speed of the application corresponding to the container instance due to its strong parallel computing capability.

[0120] In order to enable the parallel processing unit to operate, the container instance unloaded to the parallel processing unit must also be installed with the driver of the parallel processing unit. Since the container instance is unloaded by the parallel processing unit to realize the scenario of accelerating the operation of the application corresponding to the container instance, the speed of container startup is mainly limited by the pulling of the container image of the container instance and the compilation and installation of the driver of the parallel processing unit. Therefore, in order to realize the acceleration of container startup, the pre-installation function of the container image cache and the driver of the parallel processing unit is provided in this embodiment. The container image to be used can be made into a container image snapshot in advance and stored in the storage cluster. When creating a container instance, a container instance can be created based on the container image snapshot, avoiding or reducing the download of the image layer, improving the creation speed of the container instance, and then improving the container startup speed. On the other hand, the driver to be used is pre-cached, and the driver is pre-compiled and installed to obtain the executable file of the driver. In this way, after the container instance is created, the driver can be run in the container instance to further improve the container startup speed.

[0121] Based on the above analysis, a cache pool can be set in the storage cluster. The cache objects in the cache pool may include: container image snapshots and driver executable files. The driver refers to the driver of the parallel processing unit. The container image snapshot and the driver executable file can be stored in the cache pool in an independent form or in the form of a container instance snapshot. The container instance snapshot includes a combination of a container image snapshot and a driver executable file.

[0122] A container image snapshot is a copy of a container image. A container image can be a general container image or a user-defined container image, called a custom container image. Accordingly, container image snapshots can also be divided into general container image snapshots and custom container image snapshots.

[0123] Users can also customize system configuration information. Some customized container image snapshots are compatible with general system configuration information, while some customized container image snapshots have special requirements for kernel information, which requires users to provide customized system configuration information. Among them, general system configuration information refers to the system configuration information provided by the cloud service platform based on general container images, which can be compatible with general container image snapshots or customized container image snapshots that have no special requirements for system configuration information.

[0124] In this embodiment, the driver of the parallel processing unit carries system configuration information, which includes user-defined system configuration information and general system configuration information.

[0125] Based on the custom container image snapshot and the universal container image snapshot, the cache objects in the cache pool may include the following scenarios: (1) a driver carrying custom system configuration information; (2) a driver carrying universal system configuration information; (3) a driver carrying custom system configuration information, combined with a container image snapshot; (4) a driver carrying a universal container image, combined with a universal container image snapshot; (5) a custom container image snapshot, etc.

[0126] The above-mentioned driver with custom system configuration information can only be used in combination with a custom container image snapshot, and can only be used by users who provide custom container images. The combination of a driver with custom system configuration information and a container image snapshot can only be used by users who provide custom system configuration information.

[0127] Accordingly, in some embodiments, a configuration interface for container images and system configuration information, such as an API, etc., may be provided. Based on the configuration interface for container images and system configuration information, users may independently configure container images and system configuration information to obtain customized container images and customized system configuration information. Accordingly, customized container images and customized system configuration information provided through the configuration interface may be obtained.

[0128] In this embodiment, the control node can create a cache object. Specifically, the container image to be cached and the driver to be cached can be obtained. Among them, the container image to be cached can be one or more. Multiple means 2 or more. The container image to be cached can include a general container image and a custom container image.

[0129] The drivers to be cached may include: drivers carrying general system configuration information, and drivers carrying customized system configuration information. The number of drivers to be cached may be one or more. Multiple means two or more. The number of drivers carrying general system configuration information may also be one or more. Of course, the number of drivers carrying customized system configuration information may also be one or more.

[0130] In this embodiment, the specific implementation method of obtaining the container image to be cached and the driver to be cached is not limited. In some embodiments, the container image to be cached may be a hot container image, that is, a container image that is frequently used within a period of time, which can be defined as a container image whose usage frequency meets the set frequency requirement within a set time period. The set frequency requirement can be: the usage frequency is greater than or equal to the set frequency threshold; it can also be: the usage frequency is the maximum, etc., but is not limited thereto.

[0131] Accordingly, the historical usage data of the container images in the image repository within the set historical time period can be obtained; the historical time period is the same period as the predicted time window in the set scheduling cycle. Based on the historical usage data of the container images in the image repository within the set historical time period, the hot container images within the predicted time window can be determined from the container images in the image repository as the container images to be cached.

[0132] In some embodiments, a big data statistical method can be used to determine hot container images. Specifically, the usage frequency of container images in the image repository in the historical time period can be determined based on the historical usage data of container images in the image repository in the historical time period; and the hot container images whose usage frequency meets the set frequency requirements are selected from the container images in the image repository as the container images to be cached.

[0133] In other embodiments, in order to improve the accuracy of determining the hotspot container image, a neural network model may be introduced. For the specific implementation of the neural network model, please refer to the relevant content of the above embodiment, which will not be repeated here.

[0134] The neural network model is used to predict hot container images, which is defined as a hot container image prediction model. The hot container image prediction model is obtained by using the historical usage data of container image samples that are pre-labeled with hot and cold identifiers as training samples. The historical usage data of container image samples include: the usage time of container image samples and the identifier of container image samples, but are not limited to this. When used online, the input of the hot container image prediction model can be: the historical usage data of the container image, the historical wake-up behavior data of the virtual machine, and the output is: the hot and cold classification of the container image, that is, whether the container image is a hot container image or a cold container image.

[0135] In this embodiment, the minimization of the loss function is used as the training goal, and the historical usage data of the container image samples pre-labeled with hot and cold labels are used as training samples. The initial model corresponding to the hot container image prediction model is trained to obtain the hot container image prediction model. Among them, the loss function is determined by the difference between the predicted hot and cold labels of the container image samples output by the model training and the hot and cold labels pre-labeled by the container image samples. For the representation of the loss function, please refer to the relevant content of the above embodiment, which will not be repeated here.

[0136] Based on the trained hot container image prediction model, the hot container image prediction model can be used to predict hot container images for the historical usage data of the container images in the image repository within the historical time period, so as to determine the hot container images of the container images in the image repository within the prediction time window as the container images to be cached.

[0137] Specifically, the hot container image prediction model can be used to predict hot container images based on the historical usage data of container images in the image repository within a historical time period, so as to determine the hot and cold identifiers of each container image in the image repository; according to the hot and cold identifiers of each container image in the image repository, the container image with the hot identifier as the cold and hot identifier is selected from the image repository, that is, the hot container image, as the container image to be cached.

[0138] In some embodiments, the historical usage data of the container image may also include: the driver running on the container instance corresponding to the container image. Accordingly, the driver running on the container instance corresponding to the container image to be cached in the historical time period may also be obtained from the historical usage data of the container image to be cached in the historical time period as the driver to be cached.

[0139] The implementation methods of obtaining the container image to be cached and the driver to be cached shown in the above embodiment are only exemplary and do not constitute a limitation.

[0140] For the driver to be cached, the driver to be cached can be compiled to obtain the executable file of the driver to be cached. Specifically, the driver to be cached is compiled into assembly language; further, the assembly language can be translated into target machine language; and each segment contained in the target machine language is written into the segment position corresponding to the relocatable file; then, the name, relative address and size of each segment contained in the target machine language is written into the segment header of the relocatable file, thereby obtaining the relocatable file of the driver to be cached. Further, the relocatable file can be linked to obtain the information segment of the executable file. Further, the information segment of the executable file can be relocated from the relative address to the absolute address to obtain the executable file of the driver to be cached.

[0141] For the container image to be cached and the driver to be cached, the container image to be cached can be independently used as a cache object and stored in the cache pool, and the executable file of the driver to be cached can also be independently used as a cache object and stored in the cache pool. Of course, the container image to be cached and the executable file of the driver to be cached can also be combined as a cache object and stored in the cache pool.

[0142] For an embodiment of combining a container image to be cached and an executable file of a driver to be cached as a cache object and storing them in a cache pool, a container instance may be created based on the container image to be cached; and the executable file of the driver to be cached may be installed in the container instance; then, a snapshot of the container instance with the executable file of the driver to be cached installed may be stored in the cache pool as a cache object. The snapshot of the container instance with the executable file of the driver to be cached installed may be called a container instance snapshot, including: a snapshot of the container image corresponding to the container instance and the executable file of the driver running in the container instance.

[0143] The above embodiment exemplifies the process of making cache objects, but does not constitute a limitation. In the embodiment of the present application, in addition to providing a method for making cache objects, dynamic updates of cache objects can also be supported. Specifically, the usage of cache objects in the cache pool can also be monitored; if there are cache objects in the cache pool that have not been used within a set time after the predicted time window is reached, the cache objects that have not been used within the set time are deleted from the cache pool, and non-hotspot cache objects are automatically eliminated, ensuring the smallest possible cache quantity, which helps to accelerate the startup of containers across the entire network.

[0144] Based on the cache objects in the above-mentioned cache pool, an embodiment of the present application provides a container creation method based on cache objects. This method can read the container image snapshot and the executable file of the driver of the parallel processing unit from the storage cluster through the intranet, without pulling the container image and driver from the image repository through the public network. On the one hand, it reduces the download of the image layer and speeds up the container creation speed; on the other hand, it directly obtains the executable file of the driver without the need to compile and install the driver, which can reduce the compilation and installation time of the driver and further improve the container startup speed.

[0145] Specifically, the user end can send a container creation request to the computing system according to its own needs. Accordingly, in step 401, the container creation request can be obtained; and in step 402, according to the container creation request, the target container image snapshot and the target driver that meet the container creation request are determined from the cache objects in the cache pool.

[0146] In some embodiments, a user may specify a container image to be used through a user terminal. Accordingly, a container creation request may include: an identifier of the container image to be used. The container image identifier is the identifier of the target container image snapshot. Accordingly, step 402 may be implemented as follows: obtaining the identifier of the target container image snapshot from the container creation request; and using the identifier of the target container image snapshot, matching the cache objects stored in the cache pool to determine the target cache object containing the target container image snapshot. Among them, the target cache object may be one or more. Multiple means two or more. The target cache object may include a container image snapshot stored in an independent form, and may also include a container instance snapshot.

[0147] If the target cache object is a container instance snapshot, the target driver can be determined from the container instance snapshot determined as the target cache object. Specifically, in some embodiments, the user can specify the driver type and version information requested, and the container creation request may include: the driver type and version information requested. Accordingly, the type and version information of the driver requested can be obtained from the container creation request; and from the container instance snapshot determined as the target cache object, a driver whose driver type and version information are consistent with the type and version information of the driver requested as described above is determined as the target driver.

[0148] In some embodiments, the driver type and version information used by default can be pre-set. Then, when the driver type and version information are not included in the container creation request, a driver whose driver type is the default driver type and whose version information is the default version information can be selected from the container instance snapshot determined as the target cache object as the target driver.

[0149] In other embodiments, the use priority of the driver, i.e., the driver priority, may be preconfigured. Accordingly, when the container creation request does not include the driver type and version information, the driver with the highest driver priority may be selected as the target driver from the container instance snapshot determined as the target cache object according to the preconfigured driver priority.

[0150] In some embodiments, the target cache object is a target container image snapshot. In some embodiments, the user may specify the driver type and version information requested, and the container creation request may include: the driver type and version information requested. Accordingly, the driver type and version information requested may be obtained from the container creation request; and the driver whose driver type and version information are consistent with the driver type and version information requested may be determined from the drivers stored in an independent form in the cache pool as the target driver.

[0151] Alternatively, the default driver type and version information may be pre-set. Then, when the driver type and version information are not included in the container creation request, a driver having a default driver type and a default version information may be selected from the drivers stored in an independent form in the cache pool as the target driver.

[0152] In other embodiments, the use priority of the driver, i.e., the driver priority, may be preconfigured. Accordingly, when the container creation request does not include the driver type and version information, the driver with the highest driver priority may be selected from the drivers stored in an independent form in the cache pool according to the preconfigured driver priority as the target driver.

[0153] The above embodiment exemplifies the specific implementation method of determining the target container image snapshot and target driver that meet the container creation request, but does not constitute a limitation. In short, the embodiment of the present application can automatically select a suitable container image snapshot and a driver of the parallel processing unit for the container creation request from the cache objects in the cache pool based on the container image request. During the whole process, the user table only needs to specify the container image to be used, and the user is unaware of the whole selection process.

[0154] After determining the target container image snapshot and the target driver of the parallel processing unit, in step 403, the computing node can be controlled to obtain the target container image snapshot and the executable file of the target driver from the cache pool of the storage cluster. Specifically, the identifier of the target container image snapshot and the identifier of the target driver can be provided to the computing node. The computing node can obtain the target container image snapshot and the executable file of the target driver from the cache pool of the storage cluster S20 based on the identifier of the target container image snapshot and the identifier of the target driver.

[0155] Further, in step 404, the computing node can be controlled to create a target container instance on the target parallel processing unit to which the computing node is communicatively connected based on the target container image snapshot; and in step 405, the target driver is run in the target container instance based on the executable file of the target driver to obtain the target container instance.

[0156] In this embodiment, the container instance snapshot and the compiled parallel processing unit driver are cached in advance in the cache pool of the storage cluster, that is, the executable file of the cache driver is cached. When the container is created, the container image snapshot and the executable file of the driver of the parallel processing unit are read from the cache pool through the intranet, without pulling the container image and driver from the image repository through the public network. On the one hand, the download of the image layer is reduced, which can speed up the container creation speed; on the other hand, the driver executable file is directly obtained, and there is no need to compile and install the driver during the instance creation process, which can reduce the compilation and installation time of the driver and further improve the container creation speed. In short, the embodiment of the present application decouples the container image pulling time and the parallel processing unit driver compilation and installation time from the Serverless container cold start time, which can achieve container startup acceleration in the Serverless scenario.

[0157] In addition, since the container instance can provide a sandbox environment, the data between users of the container instance is isolated from each other, which can ensure data security. In the above embodiment, the cache pool does not restrict the format of the container image, and can support the caching of container images in various formats without being affected by the container image format.

[0158] In an embodiment of the present application, in addition to providing a method for accelerating container creation, cache pool upgrades are also supported. Accordingly, cache upgrade events for the cache pool can be monitored. In an embodiment of the present application, the specific implementation form of the cache upgrade event is not limited. In some embodiments, the cache upgrade event can be implemented as an upgrade or update of a cache object. Accordingly, when a cache update event for the cache pool is detected, the cache object to be upgraded can be determined from the cache pool according to a set grayscale ratio; based on the cache upgrade event, the cache object to be upgraded is cached and upgraded.

[0159] Accordingly, for computing nodes, the container creation method can be implemented as Figure 5 .like Figure 5 As shown, the container creation method mainly includes:

[0160] 501. Receive an identifier of a target container image snapshot and an identifier of a target driver sent by a control node in a computing system; the target container image snapshot and the target driver satisfy a container creation request.

[0161] 502. Based on the identifier of the target container image snapshot and the identifier of the target driver, obtain the target container image snapshot and the executable file of the target driver from the cache pool.

[0162] 503. Create a target container instance on a target parallel processing unit based on the target container image snapshot.

[0163] 504. Based on the executable file of the target driver, run the target driver in the target container instance.

[0164] Regarding the specific implementation method of the control node determining the identifier of the target container image snapshot and the identifier of the target driver, please refer to the relevant content of the above embodiment, which will not be repeated here. In this embodiment, the container instance snapshot and the compiled parallel processing unit driver are cached in advance in the cache pool of the storage cluster, that is, the cache driver executable file. When the container is created, the computing node can read the executable file of the container image snapshot and the driver of the parallel processing unit from the cache pool through the intranet, without having to pull the container image and driver from the image warehouse through the public network. On the one hand, the download of the image layer is reduced, which can speed up the container creation speed; on the other hand, the computing node can directly obtain the driver executable file, without the need to compile and install the driver during the instance creation process, which can reduce the driver compilation and installation time, and further improve the container creation speed. The improvement of container creation speed helps to improve the container startup speed.

[0165] The container creation method provided in the embodiment of the present application can be applied to create a container instance of a service required by any application. The following is an exemplary description using the service required by the target application as a model training service or an image processing service, and the parallel processing unit as a GPU.

[0166] For the management and control node provided in the above embodiment, the container creation method can be implemented as follows: Figure 6The container creation method shown. Specifically, the cache objects in the cache pool include: a container image snapshot and an executable file of a GPU driver; the GPU driver is used to drive the GPU. In this embodiment, the container image snapshot cached by the cache pool includes a container image snapshot of a container instance that provides a service required by the target application. In this embodiment, the service required by the target application is a model training service or an image processing service. For the production process of the cache objects in the cache pool, please refer to the relevant content of the above embodiment, which will not be repeated here.

[0167] like Figure 6 As shown, the container creation method mainly includes:

[0168] 601. Obtain a container creation request provided by a target application; the container creation request is used to request the creation of a target container instance of a model training service or an image processing service required by the target application.

[0169] 602. Based on the container creation request, determine a target container image snapshot and a target GPU driver that satisfy the container creation request from cache objects in the cache pool;

[0170] 603. Control the computing node to obtain the target container image snapshot and the executable file of the target GPU driver from the storage cluster; the computing node belongs to the computing cluster in the computing system.

[0171] 604. Control the computing node to create a target container instance on a target GPU to which the computing node is communicatively connected based on the target container image snapshot.

[0172] 605. Control the computing node to run the target GPU driver in the target container instance based on the executable file of the target driver, so as to run the target container instance to provide model training services or image processing services to the target application.

[0173] Accordingly, for computing nodes, the container creation method can be implemented as Figure 7 .like Figure 7 As shown, the container creation method mainly includes:

[0174] 701. Receive the identifier of the target container image snapshot and the identifier of the target GPU driver sent by the control node in the computing system; the target container image snapshot and the target GPU driver satisfy the container creation request; the container creation request is used to request the creation of a target container instance of the model training service or image processing service required by the target application.

[0175] 702. Based on the identifier of the target container image snapshot and the identifier of the target GPU driver, obtain the target container image snapshot and the executable file of the target GPU driver from the cache pool.

[0176] 703. Based on the target container image snapshot, create a target container instance on the target GPU to which the computing node is communicatively connected.

[0177] 704. Based on the executable file of the target GPU driver, run the target GPU driver in the target container instance to run the target container instance to provide model training services or image processing services to the target application.

[0178] In the above embodiment, the target application is an upper-layer application of the control node, which can be an application deployed on the user side, or of course, it can also be an application deployed on other computing devices, such as an application deployed on a computing node. In this embodiment, when the target application needs a certain service, it can request the computing system to create and start a target container instance that provides the service; and provide related services by running the target container instance. In this embodiment, the service required by the target application is a model training service or an image processing service.

[0179] In this embodiment, the container instance snapshot and the compiled GPU driver that provide the services required by the target application are pre-cached in the cache pool of the storage cluster, that is, the GPU driver executable file is cached. When the container is created, the container image snapshot and the executable file of the driver of the parallel processing unit can be read from the cache pool through the intranet, without pulling the container image and GPU driver from the image warehouse through the public network. On the one hand, the download of the image layer is reduced, which can speed up the container creation speed; on the other hand, the GPU driver executable file can be directly obtained, and there is no need to compile and install the GPU driver during the instance creation process, which can reduce the compilation and installation time of the GPU driver and further improve the container creation speed. The improvement of container creation speed helps to improve the container startup speed.

[0180] In this embodiment, the target container instance can be run on the target GPU to provide model training services or image processing services to the target application.

[0181] It should be noted that the execution subject of each step of the method provided in the above embodiment can be the same device, or the method can be executed by different devices. For example, the execution subject of steps 401 and 402 can be device A; for another example, the execution subject of step 401 can be device A, and the execution subject of step 402 can be device B; and so on.

[0182] In addition, in some of the processes described in the above embodiments and the accompanying drawings, multiple operations appearing in a specific order are included, but it should be clearly understood that these operations may not be executed in the order in which they appear in this document or may be executed in parallel, and the sequence numbers of the operations, such as 401, 402, etc., are only used to distinguish between different operations, and the sequence numbers themselves do not represent any execution order. In addition, these processes may include more or fewer operations, and these operations may be executed in sequence or in parallel.

[0183] Accordingly, an embodiment of the present application further provides a computer-readable storage medium storing computer instructions. When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the above-mentioned container creation method.

[0184] Figure 8 A schematic diagram of the structure of a computing device provided in an embodiment of the present application. The computing device can be implemented as a control node in a computing system, the computing system is connected to the intranet of a storage cluster; the storage cluster is provided with a cache pool; the cache objects in the cache pool include: a container image snapshot and a driver executable file; the driver is used to drive a parallel processing unit.

[0185] like Figure 8 As shown, the computing device mainly includes: a memory 80a and a processor 80b. The memory 80a is used to store computer programs.

[0186] The processor 80b is coupled to the memory 80a, and is used to execute a computer program for: obtaining a container creation request; based on the container creation request, determining a target container image snapshot and a target driver that satisfy the container creation request from a cache object in a cache pool; controlling a computing node through a communication component 80c to obtain a target container image snapshot and an executable file of a target driver from a storage cluster; the computing node belongs to a computing cluster in a computing system; and, controlling the computing node through the communication component 80c to create a target container instance on a target parallel processing unit to which the computing node is communicatively connected based on the target container image snapshot; and controlling the computing node to run the target driver in the target container instance based on the executable file of the target driver.

[0187] In some embodiments, the container image snapshot and the executable file of the driver are stored in the cache pool in an independent form; and / or, the container image snapshot and the executable file of the driver are stored in the cache pool in the form of a container instance snapshot. When the processor 80b determines the target container image snapshot and the target driver that meet the container creation request from the cache objects of the cache pool set in the storage cluster connected to the intranet based on the container creation request, it is specifically used to: obtain the identifier of the target container image snapshot from the container creation request; use the identifier of the target container image snapshot to match the cache objects stored in the cache pool to determine the target cache object containing the target container image snapshot; if the target cache object is a container instance snapshot, determine the target driver from the container instance snapshot determined as the target cache object.

[0188] Further, when the processor 80b determines the target driver from the container instance snapshot determined as the target cache object, it is specifically used to: obtain the type and version information of the driver used in the request from the container creation request; determine, from the container instance snapshot determined as the target cache object, a driver whose driver type and version information are consistent with the type and version information of the driver used in the request as the target driver; or, from the container instance snapshot determined as the target cache object, select a driver whose driver type is a default driver type and whose version information is a default version information as the target driver; or, according to a pre-configured driver priority, select a driver with the highest driver priority from the container instance snapshot determined as the target cache object as the target driver.

[0189] Correspondingly, the processor 80b is further used to: if the target cache object is a target container image snapshot, obtain the type and version information of the driver used in the request from the container creation request; determine, from the drivers stored in an independent form in the cache pool, a driver whose driver type and version information are consistent with the type and version information of the driver used in the request as the target driver; or, from the drivers stored in an independent form in the cache pool, select a driver whose driver type is a default driver type and whose version information is default version information as the target driver; or, according to the pre-configured driver priority, select a driver with the highest driver priority from the drivers stored in an independent form in the cache pool as the target driver.

[0190] In some embodiments, the processor 80b is further used to: obtain the container image to be cached and the driver to be cached; the container image to be cached includes a target container image snapshot; the driver to be cached includes: a target driver; compile the driver to be cached to obtain an executable file of the driver to be cached; create a container instance based on the container image to be cached, and install the executable file of the driver to be cached in the container instance; store the snapshot of the container instance with the executable file of the driver to be cached as a container instance snapshot in the cache pool; and store the snapshot of the container image to be cached as a cache object in the cache pool in an independent form; and store the executable file of the driver to be cached as a cache object in the cache pool in an independent form.

[0191] Optionally, when obtaining the container image to be cached and the driver to be cached, the processor 80b is specifically used to: obtain historical usage data of the container image in the image repository within a set historical time period; the historical time period is the same period as the predicted time window in the set scheduling cycle; according to the historical usage data of the container image in the image repository within the historical time period, determine the hot container image within the predicted time window from the container images in the image repository as the container image to be cached; wherein the hot container image refers to a container image whose usage frequency meets the set frequency requirement; from the historical usage data of the container image to be cached within the historical time period, obtain the driver running the container instance corresponding to the container image to be cached within the historical time period as the driver to be cached.

[0192] Further, when the processor 80b determines the hot container image within the prediction time window from the container images in the image repository based on the historical usage data of the container images in the image repository within the historical time period, it is specifically used to: determine the usage frequency of the container images in the image repository within the historical time period based on the historical usage data of the container images in the image repository within the historical time period; and select, from the container images in the image repository, a container image whose usage frequency meets the set frequency requirement as the hot container image; or, use a hot container image prediction model to perform hot container image prediction on the historical usage data of the container images in the image repository within the historical time period, so as to determine the hot container image of the container images in the image repository within the prediction time window as the container image to be cached.

[0193] Among them, the hot container image prediction model is trained with the minimization of the loss function as the training goal, and the historical usage data of container image samples pre-labeled with hot and cold labels are used as training samples; the loss function is determined by the difference between the predicted hot and cold labels of the container image samples output by the model training and the hot and cold labels pre-labeled by the container image samples.

[0194] Optionally, the processor 80b is further used to: monitor the usage of the cache objects in the cache pool; if there are cache objects that have not been used within a set time period after the predicted time window is reached, delete the cache objects that have not been used within the set time period from the cache pool.

[0195] Optionally, the processor 80b is further used to: monitor cache upgrade events for the cache pool; when a cache update event for the cache pool is detected, determine the cache object to be upgraded from the cache pool according to a set grayscale ratio; and based on the cache upgrade event, perform cache upgrade on the cache object to be upgraded.

[0196] In some embodiments, the parallel processing unit is a GPU, and the driver is a GPU driver. The GPU driver is used to drive the GPU. The processor 80b can also be used to: obtain a container creation request provided by the target application; the container creation request is used to request the creation of a target container instance of a model training service or an image processing service required by the target application; based on the container creation request, determine the target container image snapshot and the target GPU driver that meet the container creation request from the cache object of the cache pool; control the computing node to obtain the target container image snapshot and the executable file of the target GPU driver from the storage cluster; the computing node belongs to a computing cluster in the computing system; control the computing node to create a target container instance on the target GPU to which the computing node is connected based on the target container image snapshot; control the computing node to run the target GPU driver in the target container instance based on the executable file of the target driver, so as to run the target container instance to provide model training services or image processing services to the target application.

[0197] In some embodiments of the present application, the computing device may also be implemented as a computing node in a computing cluster. Accordingly, the processor 80b may be used to: receive the identifier of the target container image snapshot and the identifier of the target driver sent by the control node in the computing system through the communication component 80c; the target container image snapshot and the target driver satisfy the container creation request; based on the identifier of the target container image snapshot and the identifier of the target driver, obtain the executable file of the target container image snapshot and the target driver from the cache pool; based on the target container image snapshot, create a target container instance on the target parallel processing unit to which the computing device is connected in communication; based on the executable file of the target driver, run the target driver in the target container instance.

[0198] In some embodiments, the parallel processing unit is a GPU, and the driver is a GPU driver. The GPU driver is used to drive the GPU. The processor 80b can also be used to: receive the identifier of the target container image snapshot and the identifier of the target driver sent by the control node in the computing system through the communication component 80c; the target container image snapshot and the target driver satisfy the container creation request; the container creation request is used to request the creation of a target container instance for the model training service or image processing service required by the target application; based on the identifier of the target container image snapshot and the identifier of the target driver, obtain the target container image snapshot and the executable file of the target driver from the cache pool; based on the target container image snapshot, create a target container instance on the target GPU connected to the computing device; based on the executable file of the target driver, run the target driver in the target container instance to run the target container instance to provide the model training service or image processing service to the target application.

[0199] In some optional embodiments, such as Figure 8 As shown, the computing device may also include: power supply component 80d and other components. In some embodiments, the computing device may be implemented as a terminal device such as a computer or a workstation. Accordingly, the computing device may also include: display component 80e and audio component 80f and other components. Figure 8 The components are shown schematically only and do not necessarily include Figure 8 The components shown do not necessarily mean that the computing device can only include Figure 8 Components shown.

[0200] In this embodiment, the container instance snapshot and the compiled parallel processing unit driver are cached in advance in the cache pool of the storage cluster, that is, the executable file of the cache driver. When the container is created, the container image snapshot and the executable file of the driver of the parallel processing unit are read from the cache pool through the intranet, without pulling the container image and driver from the image warehouse through the public network. On the one hand, the download of the image layer is reduced, which can speed up the container creation speed; on the other hand, the driver executable file is directly obtained, and there is no need to compile and install the driver during the instance creation process, which can reduce the compilation and installation time of the driver and further improve the container creation speed. The improvement of container creation speed helps to improve the container startup speed.

[0201] In an embodiment of the present application, the memory is used to store a computer program and can be configured to store various other data to support operations on the device where it is located. Among them, the processor can execute the computer program stored in the memory to implement the corresponding control logic. The memory can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (Static Random-Access Memory, SRAM), electrically erasable programmable read only memory (Electrically Erasable Programmable Read Only Memory, EEPROM), erasable programmable read only memory (Electrical Programmable Read Only Memory, EPROM), programmable read only memory (Programmable Read Only Memory, PROM), read only memory (Read Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.

[0202] In the embodiment of the present application, the processor can be any hardware processing device that can execute the logic of the above method. Optionally, the processor can be a central processing unit (CPU), a graphics processing unit (GPU) or a microcontroller unit (MCU); it can also be a field programmable gate array (FPGA), a programmable array logic device (PAL), a general array logic device (GAL), a complex programmable logic device (CPLD) and other programmable devices; or an application specific integrated circuit (ASIC) chip; or an advanced reduced instruction set (RISC) processor (Advanced RISC Machines, ARM) or a system on chip (SoC), etc., but not limited to this.

[0203] In an embodiment of the present application, the communication component is configured to facilitate wired or wireless communication between the device in which it is located and other devices. The device in which the communication component is located can access a wireless network based on a communication standard, such as Wireless Fidelity (WiFi), 2G or 3G, 4G, 5G or a combination thereof. In an exemplary embodiment, the communication component receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component can also be based on Near Field Communication (NFC) technology, Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wide Band (UWB) technology, Bluetooth (BT) technology or other technologies.

[0204] In an embodiment of the present application, the display component may include a liquid crystal display (LCD) and a touch panel (TP). If the display component includes a touch panel, the display component may be implemented as a touch screen to receive input signals from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation.

[0205] In an embodiment of the present application, a power supply component is configured to provide power to various components of the device in which it is located. The power supply component may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to the device in which the power supply component is located.

[0206] In an embodiment of the present application, the audio component may be configured to output and / or input audio signals. For example, the audio component includes a microphone (Microphone, MIC), and when the device where the audio component is located is in an operating mode, such as a call mode, a recording mode, and a speech recognition mode, the microphone is configured to receive an external audio signal. The received audio signal may be further stored in a memory or sent via a communication component. In some embodiments, the audio component also includes a speaker for outputting an audio signal. For example, for a device with a language interaction function, voice interaction with a user can be achieved through an audio component.

[0207] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions, and provide corresponding operation entrances for users to choose to authorize or refuse.

[0208] It should also be noted that the descriptions such as "first" and "second" in this article are used to distinguish different messages, devices, modules, etc., and do not represent the order of precedence, nor do they limit "first" and "second" to different types.

[0209] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, compact disc read-only memory (Compact Disc Read-Only Memory, CD-ROM), optical storage, etc.) that contain computer-usable program code.

[0210] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (or systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0211] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0212] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0213] In a typical configuration, a computing device includes one or more processors (such as a CPU, etc.), an input / output interface, a network interface, and a memory.

[0214] Memory may include non-permanent storage in a computer-readable medium, random-access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0215] The storage medium of a computer is a readable storage medium, which may also be referred to as a readable medium. The readable storage medium includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be a computer-readable instruction, a data structure, a module of a program, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, CD-ROM, digital versatile disc (DVD) or other optical storage, magnetic cassettes, disk storage or other magnetic storage devices or any other non-transmission medium that can be used to store information that can be accessed by a computing device. According to the definition in this article, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0216] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of further restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the above elements.

[0217] The above contents are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A container creation method, applicable to a management and control node in a computing system, characterized in that: The computing system is connected to the storage cluster intranet; the storage cluster is provided with a cache pool; The cache objects in the cache pool include: container image snapshots and driver executable files; the driver is used to drive the parallel processing unit; The method comprises: Get the container creation request; Based on the container creation request, determining a target container image snapshot and a target driver that satisfy the container creation request from cache objects in the cache pool; Controlling a computing node to obtain the target container image snapshot and the executable file of the target driver from the storage cluster; the computing node belongs to a computing cluster in the computing system; Controlling the computing node to create a target container instance on a target parallel processing unit to which the computing node is communicatively connected based on the target container image snapshot; The computing node is controlled to run the target driver in the target container instance based on the executable file of the target driver.

2. The method according to claim 1, characterized in that: The container image snapshot and the executable file of the driver are stored in the cache pool in an independent form; and / or, the container image snapshot and the executable file of the driver are stored in the cache pool in the form of the container instance snapshot; The determining, based on the container creation request, from the cache objects in the cache pool, a target container image snapshot and a target driver that satisfy the container creation request includes: Obtaining an identifier of the target container image snapshot from the container creation request; Using the identifier of the target container image snapshot, matching is performed in the cache objects stored in the cache pool to determine a target cache object containing the target container image snapshot; If the target cache object is a container instance snapshot, the target driver is determined from the container instance snapshot determined as the target cache object.

3. The method according to claim 2, characterized in that The step of determining the target driver from the container instance snapshot determined as the target cache object includes: Acquire the type and version information of the driver used in the request from the container creation request; determine, from the container instance snapshot determined as the target cache object, a driver whose driver type and version information are consistent with the type and version information of the driver used in the request as the target driver; or, From the container instance snapshot determined as the target cache object, select a driver whose driver type is a default driver type and whose version information is a default version information as the target driver; or, According to the pre-configured driver priority, a driver with the highest driver priority is selected from the container instance snapshot determined as the target cache object as the target driver.

4. The method according to claim 2, characterized in that: Also includes: If the target cache object is a target container image snapshot stored in an independent form, obtaining the type and version information of the driver used in the request from the container creation request; and determining, from the drivers cached in an independent form in the cache pool, a driver whose driver type and version information are consistent with the type and version information of the driver used in the request as the target driver; or, From the drivers cached in the cache pool in an independent form, select a driver whose driver type is a default driver type and whose version information is a default version information as the target driver; or, According to the pre-configured driver priorities, a driver with the highest driver priority is selected from the drivers cached in the cache pool in an independent form as the target driver.

5. The method according to claim 1, characterized in that Also includes: Get the container image and driver to be cached; The container image to be cached includes the target container image snapshot; The driver to be cached includes: the target driver; Compiling the driver to be cached to obtain an executable file of the driver to be cached; Based on the container image to be cached, create a container instance, and install the executable file of the driver to be cached in the container instance; Using a snapshot of the container instance in which the executable file of the driver to be cached is installed as the container instance snapshot, and storing it in the cache pool; And, storing the snapshot of the container image to be cached as a cache object in the cache pool in an independent form; The executable file of the driver to be cached is taken as a cache object and stored in the cache pool in an independent form.

6. The method according to claim 5, characterized in that The obtaining of the container image to be cached and the driver to be cached includes: Obtain historical usage data of container images in the image repository within a set historical time period; the historical time period is the same period as the prediction time window within the set scheduling cycle; According to the historical usage data of the container images in the image repository within the historical time period, determine the hot container image within the predicted time window from the container images in the image repository as the container image to be cached; wherein the hot container image refers to a container image whose usage frequency meets the set frequency requirement; A driver running on a container instance corresponding to the container image to be cached in the historical time period is obtained from historical usage data of the container image to be cached in the historical time period as the driver to be cached.

7. The method according to claim 6, characterized in that The determining, from the container images in the image warehouse according to the historical usage data of the container images in the image warehouse during the historical time period, a hotspot container image within the predicted time window includes: Determine the usage frequency of the container images in the image repository within the historical time period according to the historical usage data of the container images in the image repository within the historical time period; and select, from the container images in the image repository, a container image whose usage frequency meets the set frequency requirement as the hotspot container image; or, Using a hot container image prediction model, perform hot container image prediction on historical usage data of container images in the image repository within the historical time period to determine hot container images of container images in the image repository within the prediction time window as the container images to be cached; Among them, the hot container image prediction model is trained with the minimization of the loss function as the training goal, and the historical usage data of container image samples pre-labeled with hot and cold identifications are used as training samples; the loss function is determined by the difference between the predicted hot and cold identifications of the container image samples output by the model training and the hot and cold identifications pre-labeled by the container image samples.

8. The method according to claim 6, characterized in that Also includes: Monitoring usage of cache objects in the cache pool; If there is a cache object that has not been used within a set time period after the predicted time window is reached, the cache object that has not been used within the set time period is deleted from the cache pool.

9. The method according to any one of claims 1 to 8, characterized in that: Also includes: Monitoring cache upgrade events for the cache pool; When a cache update event for the cache pool is detected, a cache object to be upgraded is determined from the cache pool according to a set grayscale ratio; Based on the cache upgrade event, the cache object to be upgraded is cache upgraded.

10. A container creation method, applicable to a computing node in a computing system, characterized in that: The computing system is connected to the storage cluster intranet; the storage cluster is provided with a cache pool; The cache objects in the cache pool include: container image snapshots and driver executable files; the driver is used to drive the parallel processing unit; The method comprises: Receiving an identifier of a target container image snapshot and an identifier of a target driver sent by a control node in the computing system; the target container image snapshot and the target driver satisfy the container creation request; Based on the identifier of the target container image snapshot and the identifier of the target driver, obtaining the target container image snapshot and the executable file of the target driver from the cache pool; Based on the target container image snapshot, create a target container instance on a target parallel processing unit communicatively connected to the computing node; Based on the executable file of the target driver, the target driver is run in the target container instance.

11. A container creation method, applicable to a management and control node in a computing system, characterized in that: The computing system is connected to the storage cluster intranet; the storage cluster is provided with a cache pool; The cache objects in the cache pool include: container image snapshots and executable files of a graphics processing unit (GPU) driver; the GPU driver is used to drive the GPU; The method comprises: Obtain a container creation request provided by a target application; the container creation request is used to request the creation of a target container instance of a model training service or an image processing service required by the target application; Based on the container creation request, determining a target container image snapshot and a target GPU driver that satisfy the container creation request from cache objects in the cache pool; Controlling a computing node to obtain the target container image snapshot and the executable file of the target GPU driver from the storage cluster; the computing node belongs to a computing cluster in the computing system; Control the computing node to create a target container instance on a target GPU to which the computing node is communicatively connected based on the target container image snapshot; The computing node is controlled to run the target GPU driver in the target container instance based on the executable file of the target driver, so as to run the target container instance to provide the model training service or the image processing service to the target application.

12. A container creation method, applicable to a computing node in a computing system, characterized in that: The computing system is connected to the storage cluster intranet; the storage cluster is provided with a cache pool; The cache objects in the cache pool include: container image snapshots and executable files of a graphics processing unit (GPU) driver; the GPU driver is used to drive the GPU; The method comprises: Receive an identifier of a target container image snapshot and an identifier of a target GPU driver sent by a control node in the computing system; the target container image snapshot and the target GPU driver satisfy a container creation request; the container creation request is used to request creation of a target container instance of a model training service or an image processing service required by the target application; Based on the identifier of the target container image snapshot and the identifier of the target driver, obtaining the target container image snapshot and the executable file of the target GPU driver from the cache pool; Based on the target container image snapshot, create a target container instance on a target GPU to which the computing node is communicatively connected; Based on the executable file of the target GPU driver, the target GPU driver is run in the target container instance to run the target container instance to provide the model training service or the image processing service to the target application.

13. A computing system, characterized in that: include: Manage and control nodes and computing clusters; The computing system and storage cluster communicate via the intranet; The computing cluster includes: computing nodes; the computing nodes are communicatively connected with the target parallel processing units; The storage cluster is provided with a cache pool; the cache objects in the cache pool include: container image snapshots and driver executable files; the driver is used to drive the parallel processing unit; The control node is used to execute the steps in the method according to any one of claims 1 to 9 or 11; The computing node is used to execute the steps in the method of claim 10 or 12.

14. A computing device, characterized in that include: A memory and a processor; wherein the memory is used to store a computer program; The processor is coupled to the memory and is configured to execute the computer program to perform the steps of the method according to any one of claims 1 to 12.

15. A computer-readable storage medium storing computer instructions, characterized in that: When the computer instructions are executed by one or more processors, the one or more processors are caused to execute the steps in the method according to any one of claims 1 to 12.

Citation Information

Cited By

  • Container mirror image acquisition method and device, chip, network interface card, equipment, medium and program product

    CN121277611A

  • Container image acquisition method and device, chip, network interface card, equipment, medium and program product

    CN121277611B