Mirror image generation method and device of development platform, equipment and storage medium

By converting OCI mirrors into lazy mirrors and using lazy loading technology, the problem of poor performance and high storage resource occupation when reading a large number of small files in reading a large number of small files is solved, and the significant container start -up time and the improvement of resource use efficiency.

CN119336344AActive Publication Date: 2025-01-21INSPUR SUZHOU INTELLIGENT TECH CO LTD

Patent Information

Application Number
CN202411380403.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-30
Publication Date
2025-01-21
Estimated Expiration
2044-09-30

AI Technical Summary

Technical Problem

OCI mirroring has performance problems and high storage occupancy, especially when reading a large number of small files.

Method used

By converting the OCI image into a lazy image and using lazy loading technology, it significantly reduces the amount of data required to load when the container startup, and increases the starting speed of the container.

Benefits of technology

It significantly shortens the startup time of the container, improves the startup speed of the container, reduces the load on the master node in the development platform, improves the overall resource usage efficiency, and reduces operating costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119336344A_ABST
    Figure CN119336344A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of computers, and discloses a development platform mirror image generation method, device and equipment and a storage medium, the method comprises the following steps: obtaining a first development platform, configuring a lazy mirror image file on the first development platform, generating a second development platform comprising a lazy mirror image switch, and displaying the lazy mirror image switch on the second development platform; receiving an operation of clicking the lazy mirror image switch by the user; and responding to the operation to trigger making of the lazy mirror image file, converting the format of the first mirror image into a lazy mirror image according to a preset rule, and loading the lazy mirror image into a mirror image warehouse. According to the method, the amount of data needing to be loaded when the container is started is reduced, the starting time of the container is shortened, the starting speed of the container is increased, meanwhile, resource consumption when the container is started is reduced, the load of a main node in a development platform is relieved, and the use efficiency of overall resources is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a mirror image generation method, device, equipment and storage medium for a development platform. Background Art

[0002] The image file used in the development and design of the development platform is the OCI (Open Container Initiative) image format. OCI images are a standard method for packaging and distributing container images. Users use these OCI images to create development environments and perform model training. As a standard image, OCI images offer good compatibility and are easy to integrate and maintain.

[0003] However, OCI images currently have some issues, such as performance. Each layer of an OCI image is stored as a file system, rather than as contiguous blocks. This can lead to performance issues, especially when reading large numbers of small files. Furthermore, this leads to high local storage costs because the same information between different layers is redundant during transmission and storage. Without reading the content, it is impossible to determine whether this redundant information exists, so storage resources are required to store this information and redundant data. Summary of the Invention

[0004] In view of this, the present invention provides a method, apparatus, device and storage medium for generating an image of a development platform to solve the performance problems and high storage resource usage problems of OCI images.

[0005] In a first aspect, the present invention provides a method for image acceleration of a development platform, the method comprising:

[0006] Obtaining a first development platform, where the first development platform supports loading and creating a first image;

[0007] Configuring a lazy image file on the first development platform to generate a second development platform including a lazy image switch, and displaying the lazy image switch on the second development platform;

[0008] Receive an operation of a user clicking the lazy mirroring switch;

[0009] In response to the operation, the creation of a lazy image file is triggered, the format of the first image is converted into a lazy image according to a preset rule, and the lazy image is loaded into an image repository.

[0010] In conjunction with the first aspect, in one possible implementation, configuring a lazy image file on the first development platform to generate a second development platform including a lazy image switch includes:

[0011] Obtaining an installation package of the first development platform, wherein the installation package includes configuration information for at least one functional item of the first development platform;

[0012] According to the configuration information of the at least one function item in the installation package, a configuration item of a lazy mirror switch is added to generate a second development platform including the lazy mirror switch.

[0013] In combination with the first aspect, in another possible implementation, the configuration information of at least one function item includes a nydus configuration item;

[0014] Adding a configuration item of a lazy mirror switch according to the configuration information of the at least one function item in the installation package, and generating a second development platform including the lazy mirror switch, including:

[0015] Add a lazy mirror function in the nydus configuration item and generate a lazy mirror switch, which is used to trigger the format conversion function of the image file;

[0016] The lazy mirror switch is added to the first development platform to generate a second development platform including the lazy mirror switch.

[0017] In conjunction with the first aspect, in another possible implementation, in response to the operation, triggering the creation of a lazy image file, and converting the format of the first image into a lazy image according to a preset rule includes:

[0018] When detecting that the user clicks the lazy mirroring switch, sending an interface request for mirroring conversion;

[0019] Read the first image file and obtain the format of the first image file;

[0020] Determine whether the format of the first image file is OCI format;

[0021] If the format is not OCI, an error message is fed back, where the error message indicates that the first image format does not support format conversion.

[0022] If it is in OCI format, the cluster node selection process is triggered and the current cluster information is displayed, which includes relevant information of at least one cluster node;

[0023] receiving a selection operation by the user on at least one cluster node of the current cluster information;

[0024] Acquire a selected target node according to the selection operation of the user, and establish a communication link with the target node;

[0025] Downloading the first image file to the target node using the communication link;

[0026] The first image file is format-converted on the target node to generate the lazy image.

[0027] In combination with the first aspect, in yet another possible implementation, obtaining the selected target node and establishing a communication link with the target node includes:

[0028] Obtaining the address of the selected target node;

[0029] According to the address, an SSH link is established with the target node according to the SSH network security protocol.

[0030] In conjunction with the first aspect, in another possible implementation, after converting the format of the first image into a lazy image according to a preset rule, the method further includes:

[0031] Generate a log and progress record according to the format conversion process of the first image;

[0032] The log and progress record are transmitted back to the second development platform.

[0033] In combination with the first aspect, in yet another possible implementation, the method further includes:

[0034] During the process of converting the format of the first image into the lazy image, monitoring the conversion progress in real time;

[0035] When the monitoring conversion reaches the threshold, the image acquisition refresh function is triggered;

[0036] An image list is pulled from the image repository and displayed on the second development platform. The second development platform simultaneously displays the lazy image and the first image.

[0037] In a second aspect, the present invention provides an image generation device for a development platform, the device comprising:

[0038] An acquisition module, configured to acquire a first development platform, wherein the first development platform supports loading and making a first image;

[0039] a configuration module, configured to configure a lazy image file on the first development platform, generate a second development platform including a lazy image switch, and display the lazy image switch on the second development platform;

[0040] A receiving module, configured to receive an operation of a user clicking the lazy mirroring switch;

[0041] The processing module is configured to trigger the creation of a lazy image file in response to the operation, convert the format of the first image into a lazy image according to a preset rule, and load the lazy image into an image repository.

[0042] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the computer instructions to thereby execute the image generation method of the development platform of the above-mentioned first aspect or any corresponding embodiment thereof.

[0043] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the image generation method of the development platform of the above-mentioned first aspect or any corresponding embodiment thereof.

[0044] In addition, the present invention provides a computer program product, including computer instructions, which are used to enable a computer to execute the image generation method of the development platform described in the first aspect or any corresponding embodiment thereof.

[0045] The present invention provides a method, device, and apparatus for generating an image of a development platform, which have the following beneficial effects:

[0046] This method converts the first image into a lazy image and utilizes lazy loading technology. This method significantly reduces the amount of data required to load when the container is started, thereby significantly shortening the container startup time and significantly improving the container startup speed.

[0047] Lazy image technology reduces resource consumption (such as CPU, memory, network bandwidth, etc.) when the container is started by loading image content on demand, reduces the load on the master node in the development platform, improves the overall resource utilization efficiency, and reduces operating costs.

[0048] This method provides users with flexible options by configuring the lazy image switch. Users can decide whether to enable lazy image acceleration based on their needs. This method simplifies the operation process by directly displaying the lazy image switch on the development platform and allowing users to trigger lazy image creation and loading with a simple click. This greatly simplifies the operation process, reducing the user's learning curve and operational difficulty. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the specific embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0050] Figure 1 1 is a flow chart of a method for generating an image of a development platform according to an embodiment of the present invention;

[0051] Figure 2 is a flow chart of another method for generating an image on a development platform according to an embodiment of the present invention;

[0052] Figure 3 1 is a flow chart of another method for generating an image on a development platform according to an embodiment of the present invention;

[0053] Figure 4 1 is a flow chart of another method for generating an image on a development platform according to an embodiment of the present invention;

[0054] Figure 5 This is a structural block diagram of an image generation device for a development platform according to an embodiment of the present invention;

[0055] Figure 6 1 is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0056] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0057] The technical solution provided by the embodiment of the present invention is applied to the field of computer technology, and in particular to an application scenario of loading an image based on a development platform, which includes devices such as servers, server clusters, node clusters, clients, and switches.

[0058] In addition, the application scenarios of the embodiments of the present invention are also applicable to K8s (Kubernetes), which is an open source system for automating the deployment, expansion, and management of containerized applications.

[0059] The technical solution of the present invention involves loading image files including lazy images and OCI images. These two image files are first introduced.

[0060] Lazy images and OCI images are two different container image formats, each with its own advantages and disadvantages. The OCI image format (Open Container Initiative) is a standard method for packaging and distributing container images. Its advantages are: standardization, easy integration, and easy maintenance. Specifically, OCI is an open standard with multiple implementations and supporters. OCI images can be easily integrated into existing tool chains and platforms. And the layers of OCI images are read-only and easy to manage. However, the disadvantages of OCI images include: performance issues and security issues. For example, the performance issue refers to the fact that each layer of the OCI image is stored in a file system manner, rather than in large continuous blocks, which may cause performance problems, especially when reading a large number of small files. The security issue refers to the plaintext storage of the metadata of the OCI image, which may leak sensitive information about the image.

[0061] Lazy mirroring refers to a simplified or automated image processing method that may aim to reduce manual user operations and improve the convenience of system deployment or recovery. It offers the advantages of high performance, high security, and low storage costs. Specifically, lazy images store data in a manner similar to a single file system, providing better read performance. Furthermore, lazy images employ encryption and verification mechanisms to ensure data security. Lazy images also utilize advanced data compression and caching mechanisms to reduce storage space usage.

[0062] Disadvantages of lazy-loading images include compatibility issues, such as the fact that lazy-loading images are an experimental project and lack the standardization and widespread support of OCI. There may also be fewer tools and integration projects available compared to OCI images. There is also a performance penalty: lazy-loading images require an additional caching layer to improve performance, which may result in a certain performance loss.

[0063] In addition, the technical solution of the present invention also involves the following technical terms, which are explained below.

[0064] Docker is an open source application container engine that allows developers to package their applications and dependent packages into a portable image and then publish it to any machine with a popular Linux or Windows operating system, and also implement virtualization.

[0065] Cluster nodes refer to the individual computers or servers that make up the cluster. They are independent entities in the cluster, and each node can run and process tasks independently. Cluster nodes include master nodes. The master node in Kubernetes refers to the cluster control node. In every K8s cluster, there must be a master node to be responsible for the management and control of the entire cluster. Basically, all control commands of K8s are sent to it, and it is responsible for the specific execution process. Therefore, some or all commands to be executed are basically run on the master node. The master node usually occupies an independent server (for example, 3 servers are recommended for high-availability deployment). Because it is the "head" of the entire cluster, in order to prevent downtime or unavailability, which will lead to failure in the management of container applications in the cluster, it is necessary to set up 3 or more servers for redundant backup.

[0066] The development platform currently only supports OCI image files and does not support lazy image file loading, which cannot meet user needs. Furthermore, OCI images have the disadvantages of high storage costs and performance loss. This is because the process of converting OCI images to lazy-loaded images consumes a large amount of CPU and storage resources in the AI ​​(Artificial Intelligence) platform. If these resources are depleted on the cluster master node, the AI ​​platform will experience operational lag, affecting its stability.

[0067] In order to solve the above technical problems, the embodiments of the present invention provide a method and device for generating an image for a development platform. The method optimizes the essential components and configurations of cluster nodes in the AI ​​platform, so that the AI ​​platform supports the image format and image operation of lazy-loaded images.

[0068] In addition, this method is applied to the AI ​​platform to optimize the image management process, ensuring that specific OCI images can be formatted and generated as lazy-loaded images. At the same time, it also supports customers to independently select cluster nodes to avoid the CPU and memory performance loss of the AI ​​platform during the conversion of the OCI image format to a lazy-loaded image, thereby ensuring the performance and stability of the AI ​​platform.

[0069] The technical solutions provided by the embodiments of the present invention are described in detail below.

[0070] According to an embodiment of the present invention, an embodiment of a method for generating an image of a development platform is provided. It should be noted that the steps shown in the flowcharts of the accompanying drawings can be executed in a computer system, such as a set of computer-executable instructions, and although a logical order is shown in the flowcharts, in some cases, the steps shown or described can be executed in an order different from that shown.

[0071] In this embodiment, a method for generating an image of a development platform is provided, which can be used for the above-mentioned client or cluster node, such as the master node. Figure 1 : is a flow chart of a method for generating an image of a development platform according to an embodiment of the present invention. Figure 1 As shown, the method includes:

[0072] Step S101: Acquire a first development platform, which supports loading and making a first image.

[0073] The first development platform can be an AI platform. Furthermore, the development platform can provide deep learning development and training scenarios, fully integrating AI computing resources, training data resources, and AI development tools. Furthermore, an agile and efficient integrated AI development platform is built for AI R&D, providing extremely high-performance computing power support for AI R&D, and improving model development efficiency through agile and standardized development processes. In this embodiment, the development platform is used to provide high-performance AI computing resources, more specifically, cluster node resources.

[0074] Optionally, the first image is an OCI image (such as a pytorch image).

[0075] One implementation method of this step is to obtain a first development platform during the image management and maintenance process. The first development platform supports loading OCI images, which means that the AI ​​platform can receive and identify image files in the OCI format, and then load them into the platform's container environment to ensure that the file system and configuration information in the image can be correctly applied to the container. The development platform supports the creation of OCI images, which means that the AI ​​platform provides tools and processes for building OCI images. Developers can use these tools to use Dockerfile or other build scripts to package applications and their dependencies into images in the OCI format. These images can then be uploaded to the container image repository for other users to download and use.

[0076] Step S102: configuring a lazy image file on the first development platform, generating a second development platform including a lazy image switch, and displaying the lazy image switch on the second development platform.

[0077] Lazy images (or simply lazy images) can refer to images that delay loading certain parts or components in a container image until they are actually needed. Lazy images can be used to optimize resource usage and reduce startup time, especially when the container image is large or contains infrequently used components.

[0078] In this step, based on the first development platform, the necessary components and configurations of the AI ​​platform cluster nodes are upgraded to support lazy image loading. The necessary components for lazy image loading in the AI ​​platform cluster nodes are upgraded; the global configuration items of the installation package are modified to add a lazy image switch; and a unified Docker directory for lazy image storage is established in the cluster.

[0079] To identify whether the AI ​​platform supports lazy loading of images, a lazy loading image switch configuration item, such as LAZY_LOAD=1, is added to the global configuration file of the AI ​​platform installation package.

[0080] After configuring the lazy image file, a lazy image switch is generated. This adds a switch (or control such as a checkbox or button) to the development platform's user interface (UI) or management interface, allowing users to enable or disable the lazy image feature. This switch provides users with flexibility, allowing them to decide whether to load the lazy image based on their needs and preferences.

[0081] Step S103: receiving an operation of the user clicking the lazy mirroring switch.

[0082] The client detects in real time whether the user clicks the lazy mirror switch.

[0083] Step S104: in response to the operation, triggering the creation of a lazy image file, converting the format of the first image into a lazy image according to a preset rule, and loading the lazy image into the image repository.

[0084] Specifically, when a user click operation is received, a lazy image file creation process is triggered and executed. In this process, the format of the first image is converted into a lazy image according to a preset rule. The preset rule includes converting the first image file into a second image file. In this embodiment, the first image file is an OCI image file, and the second image file is a lazy image file.

[0085] Preset rules may be based on specific attributes of the image (such as size, component type), user preferences, performance considerations, and other factors. Furthermore, the conversion process may include analyzing the image content, determining which parts can be lazy loaded, and then modifying the image structure or adding necessary metadata to implement lazy loading capabilities.

[0086] After the lazy image is created, it is uploaded (pulled) to an image repository. An image repository is a centralized location for storing and managing container images, accessible and usable by multiple users or systems. The loading process typically involves uploading the lazy image file to the repository's server and recording relevant information (such as the image name, version, and tags) in the repository's database.

[0087] The image generation method provided in this embodiment has the following beneficial effects:

[0088] 1. This method converts the first image into a lazy image and uses lazy loading technology. This method significantly reduces the amount of data required to load when the container starts, thereby greatly shortening the container startup time and significantly improving the container startup speed.

[0089] 2. Lazy image technology reduces resource consumption (such as CPU, memory, network bandwidth, etc.) when the container is started by loading image content on demand, reduces the load on the master node in the development platform, improves the overall resource utilization efficiency, and reduces operating costs.

[0090] 3. This method provides users with flexible options by configuring the lazy image switch. Users can decide whether to enable the lazy image acceleration function based on their actual needs. Simplified operation process: By directly displaying the lazy image switch on the development platform and allowing users to trigger lazy image creation and loading with a simple click, this method greatly simplifies the operation process, reducing the user's learning curve and operational difficulty.

[0091] In a possible implementation of this embodiment, as Figure 2 As shown, in the above step S102: configuring the lazy image file on the development platform to generate a development platform including a lazy image switch specifically includes:

[0092] Step S102 - 1 : Obtain an installation package of a first development platform, where the installation package includes configuration information of at least one functional item of the first development platform.

[0093] Step S102-2: adding a configuration item of a lazy mirror switch according to the configuration information of the at least one function item in the installation package, and generating a second development platform including the lazy mirror switch.

[0094] Furthermore, the configuration information of the at least one functional item includes nydus configuration items. Specifically, nydus can be used as a configuration of the image acceleration framework. When nydus is used as an image acceleration framework, its configuration mainly focuses on aspects such as image storage, caching, and network communication. For example, the following are some key configuration information:

[0095] Storage configuration: data_dir: specifies the data storage directory for storing image data. cache_size: sets the cache size to optimize the image loading speed.

[0096] Network communication configuration: listen_address: Specify the listening address and port of the nydus service so that the container runtime or other components can communicate with it.

[0097] Mode selection: nydus supports multiple operating modes, such as FUSE mode, VirtioFS mode, and EROFS mode. Users can select the appropriate operating mode based on their specific needs.

[0098] Configuration file: For the image acceleration framework, nydus usually requires a configuration file (such as nydusd-config.json) to specify the above configuration options. Users need to edit the configuration file according to actual conditions to meet specific deployment requirements.

[0099] The above step S102-2: adding a configuration item of a lazy mirror switch according to the configuration information of the at least one function item in the installation package to generate a second development platform including the lazy mirror switch, specifically includes:

[0100] A lazy mirror function is added to the nydus configuration item to generate a lazy mirror switch, which is used to trigger the format conversion function of the image file; the lazy mirror switch is added to the first development platform to generate a second development platform including the lazy mirror switch.

[0101] In this embodiment, a lazy image function is added to the nydus configuration item to add a lazy image to the original development platform, so that the new development platform supports both OCI image and lazy image.

[0102] In another possible implementation, the development platform of this embodiment also supports the creation of lazy loading images.

[0103] In the image management and maintenance of the development platform, a "Convert to lazy loading image" button / switch is added to OCI images. Customers can trigger lazy image production by clicking the button / switch: After the customer clicks the button / switch, the development platform sends an interface request for image conversion.

[0104] Specifically, if Figure 3 As shown, the above steps S103 and S104 specifically include:

[0105] Step S301: Upgrade cluster node components.

[0106] This step can be performed by upgrading the server or the client. The cluster node can be a component of the cluster node in the aforementioned K8s, or can also be other cluster components, which is not limited in this embodiment.

[0107] Step S302: Determine whether the lazy mirroring switch is turned on.

[0108] Specifically, after steps S101 and S102 above, if the nydus configuration item is configured and the lazy mirror function switch is added, the system will turn on the lazy mirror switch, for example, by lighting up the lazy mirror switch icon on the UI interface. Alternatively, when the icon is displayed on the UI interface, it indicates that the lazy mirror switch is turned on.

[0109] If it is enabled, step S303 is executed; if it is not enabled, the original image management process is executed.

[0110] Step S303: If the lazy mirroring switch is turned on, the format conversion process is triggered.

[0111] When it is detected that the user clicks the lazy mirror switch, an interface request for mirror conversion is sent. The system reads the first mirror file and obtains the format of the first mirror file.

[0112] Step S304: Determine whether the format of the first image file is OCI format.

[0113] If yes, step S305 is executed; if it is not in OCI format, error information is fed back, where the error information is used to indicate that the first image format does not support format conversion.

[0114] It should be understood that the first image format, namely the OCI format, is used as an example in this embodiment. Other formats may also be used, and this embodiment does not limit this.

[0115] Step S305: If it is in OCI format, a cluster node selection process is triggered to display current cluster information, which includes relevant information of at least one cluster node.

[0116] If the image format is an OCI image, the next event is triggered: selecting a cluster node. The specific selection can be made by the user or automatically selected by the system according to a predefined procedure. In this embodiment, it is assumed that the user makes the selection independently. The specific process is shown in step S306 below.

[0117] Step S306: receiving a user's selection operation on at least one cluster node of the current cluster information.

[0118] Customers can view the total amount and used amount of CPU and memory in the non-master nodes of the current cluster on the UI interface. Users can select a node with relatively sufficient resources from these non-master nodes to perform format conversion.

[0119] Step S307: According to the selection operation of the user, the selected target node is obtained, and a communication link with the target node is established.

[0120] Specifically, obtaining a selected target node and establishing a communication link with the target node include: obtaining an address of the selected target node; establishing an SSH link with the target node according to the address and in accordance with the SSH network security protocol.

[0121] SSH (Secure Shell) is an encrypted network protocol used to securely access a remote computer in an unsafe network. To connect to a selected Node node via SSH, the process of encrypting and decrypting using SSH keys and establishing an SSH link is not described in detail in this embodiment.

[0122] In this step, connect to the selected target node through an SSH link and execute the format conversion script on the target node.

[0123] Step S308: Download the first image file to the target node using the communication link.

[0124] Specifically, the first image format (OCI image) is downloaded to the target node, and a format conversion process is prepared to be performed.

[0125] Step S309: performing format conversion on the first image file on the target node to generate a lazy image.

[0126] For example, format conversion is performed on the target node to generate a lazy loading image, and the lazy loading image is named by combining "source image name + -lazy" to obtain the lazy loading image.

[0127] Step S310: Upload (pull) the lazy image to the image repository.

[0128] Optionally, after the above step S307, the method further includes: generating a log and a progress record according to the format conversion process of the first image; and transmitting the log and the progress record back to the second development platform.

[0129] Step S311: Determine whether the format conversion is completed.

[0130] Step S312: If yes, the second development platform re-pulls the image from the image repository.

[0131] In this embodiment, during the image conversion process, when using the second development platform to convert lazy-loaded images, the client can independently select a cluster node to use for the CPU and memory consumption during the format conversion process. This method shares the CPU and memory resource usage of the cluster master node, reducing the resource usage of the master node and ensuring the stability of the development platform operation.

[0132] Furthermore, in another possible implementation, as Figure 4As shown, after the above step S104, the method further includes:

[0133] Step S105: During the process of converting the format of the first image into the lazy image, the conversion progress is monitored in real time.

[0134] Step S106: When the monitoring conversion reaches a threshold, a refresh function of the image acquisition is triggered.

[0135] For example, when the threshold is 100%, or greater than or equal to 95, the refresh function is triggered.

[0136] Step S107: Pull the image list from the image repository and display the image list through the second development platform. At this time, the second development platform displays the lazy image and the first image at the same time.

[0137] In one example, on the AI ​​platform, when the image conversion progress reaches 100%, the image acquisition refresh function is triggered. The AI ​​platform will pull the image list again from the image repository and display it on the AI ​​platform. In addition, after the OCI image imageA is format converted, a new lazy loading image imageA-lazy is generated. At this time, both the OCI image imageA and the lazy loading image imageA-lazy exist on the AI ​​platform.

[0138] The method provided in this embodiment is based on the image management of the current development platform. When the platform uses lazy loading images for image acceleration, users use OCI images and lazy loading images based on OCI image conversion to create a development environment. This adds lazy image creation and uploading functions to the development platform, improves the compatibility of the development platform, and meets user needs.

[0139] Furthermore, a comparison of startup times reveals that lazy-loading significantly reduces pod startup time by comparing the pod creation and startup times of OCI and lazy-loading images. Furthermore, overall speedup increased by 96%, demonstrating that lazy-loading images reduce startup time by approximately 96% compared to OCI images. Startup speed improvement: Pod startup speed increased by 26.9 times from using OCI images to using lazy-loading images.

[0140] In addition, when the platform uses the pytorch / yuan_base image and deploys the yuan-2b inference service on cluster nodes with NVIDA-V100-16G and NFS shared storage for model files, the replica pod startup time is improved from 556 seconds to 30 seconds, with an overall speedup of 94%.

[0141] In terms of product support, since lazy loading images are an experimental project and are not as standardized and widely supported as OCI, their compatibility is relatively poor. Therefore, the embodiments of the present invention implement the conversion of OCI images into lazy images, that is, the lazy loading images and OCI images are compatible, so that users can choose to use either lazy loading images or OCI images according to actual usage needs, ensuring the integrity and ease of use of the overall functions.

[0142] This embodiment also provides an image generation device for a development platform, which is used to implement the above-mentioned embodiments and preferred embodiments. Details already described will not be repeated here. As used below, the term "module" may refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0143] This embodiment provides a mirror image generation device for a development platform, such as Figure 5 As shown, the device includes: an acquisition module 510, a configuration module 520, a receiving module 530 and a processing module 540. In addition, the device may also include other more or fewer modules such as a storage unit, which is not limited in this embodiment.

[0144] The acquisition module 510 is configured to acquire a first development platform, where the first development platform supports loading and making a first image.

[0145] The configuration module 520 is configured to configure a lazy image file on the first development platform, generate a second development platform including a lazy image switch, and display the lazy image switch on the second development platform.

[0146] The receiving module 530 is configured to receive an operation of a user clicking the lazy mirroring switch.

[0147] The processing module 540 is configured to trigger the creation of a lazy image file in response to the operation, convert the format of the first image into a lazy image according to a preset rule, and load the lazy image into an image repository.

[0148] In some optional embodiments, the configuration module 520 is specifically configured to obtain an installation package for the first development platform, add a configuration item for a lazy mirroring switch based on the configuration information of the at least one functional item in the installation package, and generate a second development platform including the lazy mirroring switch. The installation package includes the configuration information for the at least one functional item of the first development platform.

[0149] In some optional embodiments, the configuration information of the at least one functional item includes a nydus configuration item. The configuration module 520 is further configured to add a lazy mirror function to the nydus configuration item, generate a lazy mirror switch, and trigger the image file format conversion function; and add the lazy mirror switch to the first development platform to generate a second development platform including the lazy mirror switch.

[0150] Optionally, in some other optional implementations, the processing module 540 is specifically configured to send an interface request for mirror conversion when it is detected that the user clicks the lazy mirror switch; and read the first mirror file to obtain the format of the first mirror file.

[0151] Determine whether the format of the first image file is in OCI format; if it is not in OCI format, feedback an error message, where the error message is used to indicate that the first image format does not support format conversion; if it is in OCI format, trigger a cluster node selection process and display current cluster information, where the current cluster information includes relevant information of at least one cluster node.

[0152] The receiving module 530 is further configured to receive a selection operation by the user on at least one cluster node in the current cluster information.

[0153] The processing module 540 is further specifically used to obtain the selected target node according to the user's selection operation and establish a communication link with the target node; use the communication link to download the first image file to the target node; and perform format conversion on the first image file on the target node to generate a lazy image.

[0154] Optionally, in some further optional implementations, the acquisition module 510 is further configured to acquire the address of the selected target node.

[0155] The processing module 540 is configured to establish an SSH link with the target node according to the address and the SSH network security protocol.

[0156] Optionally, in some further optional implementations, the processing module 540 is further configured to generate a log and a progress record according to the format conversion process of the first image; and transmit the log and the progress record back to the second development platform.

[0157] Optionally, in some other optional embodiments, the above device further includes a monitoring module, which is Figure 5 Not shown in the figure.

[0158] The monitoring module is used to monitor the conversion progress in real time during the process of converting the format of the first image into the lazy image; when the monitored conversion reaches a threshold, the refresh function of the image acquisition is triggered.

[0159] The processing module 540 is further configured to pull an image list from the image repository and display the image list through the second development platform. The second development platform displays the lazy image and the first image at the same time.

[0160] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0161] The image generation device of the development platform in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0162] The embodiment of the present invention also provides a computer device having the above Figure 5 The image generation device shown.

[0163] See also Figure 6 , is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 6 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting the various components, including high-speed interfaces and low-speed interfaces. The various components are connected to each other using different buses and can be installed on a common motherboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory for displaying graphical information of a GUI on an external input / output device (such as a display device coupled to the interface).

[0164] In some optional embodiments, multiple processors and / or multiple buses can be used with multiple memories and multiple storages if desired. Similarly, multiple computer devices can be connected, with each device providing part of the necessary operations (e.g., as a server array, a group of blade servers, or a multi-processor system). Figure 6 A processor 10 is taken as an example.

[0165] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0166] The memory 20 stores instructions that can be executed by at least one processor 10, so as to enable the at least one processor 10 to execute the image generation method of the development platform shown in the above embodiment.

[0167] The memory 20 may include a program storage area and a data storage area. The program storage area may store an operating system and application programs required for at least one function; the data storage area may store data generated based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device.

[0168] In some optional embodiments, the memory 20 may include a memory remotely located relative to the processor 10, and the remote memory may be connected to the computer device via a network. Examples of the aforementioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0169] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0170] The computer device further includes an input device 30 and an output device 40. The processor 10, the memory 20, the input device 30 and the output device 40 may be connected via a bus or other means. Figure 6 The bus connection is taken as an example.

[0171] The input device 30 can receive input digital or character information, and generate key signal input related to the user settings and function control of the computer device, such as a touch screen, a keypad, a mouse, a trackpad, a touchpad, an indicator stick, one or more mouse buttons, a trackball, a joystick, etc.

[0172] The output device 40 may include a display device, an auxiliary lighting device (e.g., LED), and a tactile feedback device (e.g., a vibration motor). The display device includes, but is not limited to, a liquid crystal display, a light emitting diode, a display, and a plasma display. In some optional embodiments, the display device may be a touch screen.

[0173] In addition, the computer device further includes at least one communication interface for the computer device to communicate with other devices or a communication network.

[0174] An embodiment of the present invention also provides a computer-readable storage medium, and the above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded on a storage medium, or downloaded via a network and originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware.

[0175] The storage medium may be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, or a solid-state drive, among others; furthermore, the storage medium may include a combination of the aforementioned types of memory. It is understood that a computer, processor, microprocessor controller, or programmable hardware includes a storage component capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the image generation method for the development platform illustrated in the above embodiment is implemented.

[0176] An embodiment of the present invention provides a computer program product, which includes computer instructions. The computer instructions are used to enable a computer to execute the image generation method of the development platform of any embodiment of the present invention.

[0177] The above embodiments are only used to illustrate the technical solutions of the embodiments of the present invention, rather than to limit them. Although the embodiments of the present invention have been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for generating a platform image, characterized in that: The method comprises: Obtaining a first development platform, where the first development platform supports loading and making a first image; Configure a lazy image file on the first development platform, generate a second development platform including a lazy image switch, and display the lazy image switch on the second development platform; Receive an operation of a user clicking the lazy mirroring switch; In response to the operation, the creation of a lazy image file is triggered, the format of the first image is converted into a lazy image according to a preset rule, and the lazy image is loaded into an image repository.

2. The method according to claim 1, characterized in that: The step of configuring the lazy image file on the first development platform to generate a second development platform including a lazy image switch includes: Obtaining an installation package of the first development platform, wherein the installation package includes configuration information of at least one function item of the first development platform; According to the configuration information of the at least one function item in the installation package, a configuration item of a lazy mirror switch is added to generate a second development platform including the lazy mirror switch.

3. The method according to claim 2, characterized in that The configuration information of the at least one function item includes a nydus configuration item; The adding a configuration item of a lazy image switch according to the configuration information of the at least one function item in the installation package to generate a second development platform including the lazy image switch comprises: Adding a lazy mirror function in the nydus configuration item to generate a lazy mirror switch, wherein the lazy mirror switch is used to trigger the format conversion function of the image file; The lazy image switch is added to the first development platform to generate a second development platform including the lazy image switch.

4. The method according to any one of claims 1 to 3, characterized in that: In response to the operation, triggering the creation of a lazy image file, and converting the format of the first image into a lazy image according to a preset rule, including: When it is detected that the user clicks the lazy mirror switch, an interface request for mirror conversion is sent; Read the first image file and obtain the format of the first image file; Determine whether the format of the first image file is OCI format; If the format is not OCI, an error message is fed back, where the error message is used to indicate that the first image format does not support format conversion; If it is in OCI format, a cluster node selection process is triggered to display current cluster information, where the current cluster information includes relevant information of at least one cluster node; receiving a selection operation of the user on at least one cluster node of the current cluster information; According to the selection operation of the user, obtaining a selected target node and establishing a communication link with the target node; Downloading the first image file to the target node using the communication link; The first image file is format converted on the target node to generate the lazy image.

5. The method according to claim 4, characterized in that The step of obtaining the selected target node and establishing a communication link with the target node includes: Obtaining the address of the selected target node; According to the address, an SSH link is established with the target node according to the SSH network security protocol.

6. The method according to any one of claims 1 to 3, characterized in that: After converting the format of the first image into a lazy image according to the preset rule, the method further includes: Generate a log and a progress record according to the format conversion process of the first image; The log and progress record are transmitted back to the second development platform.

7. The method according to claim 6, characterized in that The method further comprises: In the process of converting the format of the first image into a lazy image, monitoring the conversion progress in real time; When the monitoring conversion reaches the threshold, the refresh function of the image acquisition is triggered; An image list is pulled from the image repository and displayed through the second development platform, and the second development platform simultaneously displays the lazy image and the first image.

8. A mirror image generation device for a development platform, characterized in that: The device comprises: An acquisition module, used to acquire a first development platform, where the first development platform supports loading and making of a first image; a configuration module, configured to configure a lazy image file on the first development platform, generate a second development platform including a lazy image switch, and display the lazy image switch on the second development platform; A receiving module, used to receive an operation of a user clicking the lazy mirroring switch; The processing module is used to trigger the production of a lazy image file in response to the operation, convert the format of the first image into a lazy image according to a preset rule, and load the lazy image into an image warehouse.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected with each other; The memory stores computer instructions, and the processor executes the image generation method of the development platform according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer readable storage medium has computer instructions stored thereon; The computer instructions are used to enable a computer to execute the image generation method for a development platform according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Container application starting method, mirror image management method and related equipment

    CN115248721A

  • Mirror image creation method and device, electronic equipment and storage medium

    CN116048724A

  • Mirror image processing method and device

    CN117149224A

  • Mirror image management method, system and equipment for Kubernetes container in acceleration format

    CN117707703A

Cited By

  • Large model training method and system based on container

    CN120430382A