CN113157281B - Development environment creation method, apparatus, electronic device and storage medium - Google Patents

Development environment creation method, apparatus, electronic device and storage medium Download PDF

Info

Publication number
CN113157281B
CN113157281B CN202110328420.2A CN202110328420A CN113157281B CN 113157281 B CN113157281 B CN 113157281B CN 202110328420 A CN202110328420 A CN 202110328420A CN 113157281 B CN113157281 B CN 113157281B
Authority
CN
China
Prior art keywords
container
development environment
development
image
system disk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110328420.2A
Other languages
Chinese (zh)
Other versions
CN113157281A (en
Inventor
刘玉忠
柳晓鹏
吴志全
周玉
杨进涛
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Baidu Netcom Science and Technology Co Ltd
Original Assignee
Beijing Baidu Netcom Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Baidu Netcom Science and Technology Co Ltd filed Critical Beijing Baidu Netcom Science and Technology Co Ltd
Priority to CN202110328420.2A priority Critical patent/CN113157281B/en
Publication of CN113157281A publication Critical patent/CN113157281A/en
Application granted granted Critical
Publication of CN113157281B publication Critical patent/CN113157281B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • G06F8/63Image based installation; Cloning; Build to order
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/455Emulation; Interpretation; Software simulation, e.g. virtualisation or emulation of application or operating system execution engines
    • G06F9/45533Hypervisors; Virtual machine monitors
    • G06F9/45558Hypervisor-specific management and integration aspects
    • G06F2009/45562Creating, deleting, cloning virtual machine instances

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The application discloses a method and a device for creating a development environment, electronic equipment and a storage medium, and relates to the fields of artificial intelligence and cloud computing. The specific implementation scheme is as follows: establishing a system disk, wherein the system disk comprises a plurality of development environments; acquiring a platform base mirror image, and determining at least one custom mirror image in response to user operation; and establishing a container according to the platform base image and the at least one custom image, and establishing a calling relationship between the container and one of development environments in the system disk. Therefore, the container is built according to the platform basic image and at least one custom image, the built container can meet the personalized development requirements of different users, and the call relationship between the container and one of the development environments in the system disk is built, so that the container after the call relationship is built can meet the actual requirements of the users on the development environments.

Description

Development environment creation method, apparatus, electronic device and storage medium
Technical Field
The present application relates to the field of AI (Artificial Intelligence ) and cloud computing, and more particularly, to a method, apparatus, electronic device, and storage medium for creating a development environment.
Background
The machine learning platform can provide large-scale machine distributed development, training and prediction capabilities. In a machine learning development environment, strict software admission requirements are placed on resource allocation management, development tool services, computing resource monitoring, authentication and authentication, and the like. Currently, a machine learning platform can provide a fixed operating system and a fixed software version, and a set of standard images are built based on the fixed operating system and the fixed software version, so that a developer can develop a machine model based on the standard images.
Disclosure of Invention
The application provides a creation method, a creation device, an electronic device and a storage medium for a development environment.
According to an aspect of the present application, there is provided a method of creating a development environment, including:
establishing a system disk, wherein the system disk comprises a plurality of development environments;
acquiring a platform base mirror image, and determining at least one custom mirror image in response to user operation;
and establishing a container according to the platform base image and the at least one custom image, and establishing a calling relationship between the container and one of development environments in the system disk.
According to another aspect of the present application, there is provided a creation apparatus of a development environment, including:
a first building module for building a system disk, wherein the system disk comprises a plurality of development environments;
the acquisition module is used for acquiring the basic mirror image of the platform;
the determining module is used for responding to the user operation and determining at least one custom mirror image;
and the second establishing module is used for establishing a container according to the platform basic image and the at least one custom image and establishing a calling relationship between the container and one of development environments in the system disk.
According to still another aspect of the present application, there is provided an electronic apparatus including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of creating a development environment as set forth in the above embodiments of the application.
According to still another aspect of the present application, there is provided a non-transitory computer-readable storage medium of computer instructions for causing the computer to execute the method of creating a development environment proposed by the above-described embodiments of the present application.
According to a further aspect of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements a method of creating a development environment as set forth in the above-described embodiments of the present application.
It should be understood that the description of this section is not intended to identify key or critical features of the embodiments of the application or to delineate the scope of the application. Other features of the present application will become apparent from the description that follows.
Drawings
The drawings are for better understanding of the present solution and do not constitute a limitation of the present application. Wherein:
FIG. 1 is a flow chart of a method for creating a development environment according to an embodiment of the present application;
FIG. 2 is a flowchart of a method for creating a development environment according to a second embodiment of the present disclosure;
fig. 3 is a flow chart of a method for creating a development environment according to the third embodiment of the present application;
FIG. 4 is a schematic diagram of a visual programming terminal interface at the start of a development environment in an embodiment of the present application;
FIG. 5 is a schematic diagram of a creation system of a development environment in an embodiment of the present application;
FIG. 6 is a schematic diagram of a user usage flow in an embodiment of the present application;
FIG. 7 is a schematic diagram of a user interface according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a creation device of a development environment provided in the fourth embodiment of the present application;
FIG. 9 shows a schematic block diagram of an example electronic device that may be used to implement embodiments of the present application.
Detailed Description
Exemplary embodiments of the present application are described below in conjunction with the accompanying drawings, which include various details of the embodiments of the present application to facilitate understanding, and should be considered as merely exemplary. Accordingly, one of ordinary skill in the art will recognize that various changes and modifications of the embodiments described herein can be made without departing from the scope and spirit of the present application. Also, descriptions of well-known functions and constructions are omitted in the following description for clarity and conciseness.
Currently, a machine learning platform can provide a fixed operating system and a fixed software version, and a set of standard images are built based on the fixed operating system and the fixed software version, so that a developer can develop a machine model based on the standard images. However, since the standard image is a platform fixed image, the personalized development requirement of the user may not be satisfied, for example, the custom system of the user is not matched with the fixed operating system, and the software version required by the user is different from the fixed software version.
Therefore, the present application mainly aims at the above-mentioned problems, and proposes a method for creating a development environment, by creating a system disk, where the system disk includes a plurality of development environments, and obtains a platform base image and at least one custom image selected by a user, and creates a container according to the platform base image and the at least one custom image, and creates a call relationship between the container and one of the development environments in the system disk. Therefore, the container is built according to the platform basic image and at least one custom image, the built container can meet the personalized development requirements of different users, and the call relationship between the container and one of the development environments in the system disk is built, so that the container after the call relationship is built can meet the actual requirements of the users on the development environments.
The following describes a method, an apparatus, an electronic device, and a storage medium for creating a development environment according to an embodiment of the present application with reference to the accompanying drawings.
Fig. 1 is a flowchart of a method for creating a development environment according to an embodiment of the present application.
The embodiment of the application is exemplified by the method for creating the development environment being configured in the creating device of the development environment, and the creating device can be applied to any electronic equipment so that the electronic equipment can execute the creating function of the development environment.
As shown in fig. 1, the method of creating the development environment may include the steps of:
step 101, a system disk is established, wherein the system disk comprises a plurality of development environments.
In embodiments of the present application, the development environment may include, but is not limited to, a machine learning or deep learning development environment such as python, cuda, cudann, nccl, gcc.
In embodiments of the present application, a system disk may be established, where the system disk may include a plurality of development environments thereon.
Step 102, obtaining a platform base image, and determining at least one custom image in response to a user operation.
In the embodiment of the application, the platform base image may be a base image provided by a machine learning platform.
In the embodiment of the application, the custom image may be an image built by a current user or other users, for example, the current user may build the custom image on a platform base image provided by a machine learning platform, or other users may build the custom image on the platform base image provided by the machine learning platform, so that the user may select the custom image built by other users.
In an embodiment of the present application, the creating device may obtain a platform base image from the machine learning platform, and determine at least one custom image in response to a user operation.
And step 103, establishing a container according to the platform base image and at least one custom image, and establishing a calling relationship between the container and one of development environments in the system disk.
In this embodiment of the present application, the creating device may create a container according to the platform base image and at least one custom image, so that the created container may meet actual needs of different users, that is, compared to the case where the created container includes only some base contents according to the platform base image provided by the machine learning platform in the related art, the created container may include richer contents according to the platform base image and at least one custom image, so that the created container may meet actual development needs of different users.
In the embodiment of the application, the system disk comprises a plurality of development environments, and after the container is established, the calling relation between the container and one of the development environments in the system disk can be established so as to meet the actual requirements of users on the development environments.
For example, when the development environment that the user wants to call is a python environment, a call relationship between the container and the python environment may be established. Therefore, the container after the call relationship is established can meet the actual development requirement of the user.
According to the method for creating the development environment, the system disk is established, wherein the system disk comprises a plurality of development environments, the platform base mirror image and at least one user-defined mirror image selected by a user are obtained, the container is established according to the platform base mirror image and the at least one user-defined mirror image, and the calling relationship between the container and one of the development environments in the system disk is established. Therefore, the container is built according to the platform basic image and at least one custom image, the built container can meet the personalized development requirements of different users, and the call relationship between the container and one of the development environments in the system disk is built, so that the container after the call relationship is built can meet the actual requirements of the users on the development environments.
In one possible implementation manner of the embodiment of the present application, in order to enable the established container to meet the actual development requirement of the user, when the call relationship between the container and the development environment is established, the development environment identifier corresponding to each image may be obtained, and according to the development environment identifier, the development environment in the system disk is obtained, so that the call relationship between the container and the obtained development environment may be established. The above process will be described in detail with reference to the second embodiment.
Fig. 2 is a flow chart of a method for creating a development environment according to the second embodiment of the present application.
As shown in fig. 2, the creation method of the development environment may include the steps of:
in step 201, a system disk is established, wherein the system disk includes a plurality of development environments.
It should be noted that, the execution process of step 201 may refer to the execution process of step 101 in the above embodiment, which is not described herein.
In one possible implementation manner of the embodiment of the present application, multiple development environments in a system disk may be isolated by an environment management system Conda, for example, multiple development environments in a system disk may be isolated by a Conda env, so as to solve differences in configuration in different development environments.
Step 202, obtaining a platform base image, and determining at least one custom image in response to a user operation.
In the embodiment of the application, the machine learning platform can provide a platform base image for each development environment, and establish a corresponding relationship between the development environment identification and the platform base image. The development environment identifier is used for uniquely identifying the corresponding development environment.
In the embodiment of the application, the user can select or create the custom image corresponding to the required development environment according to the development requirement, and the creating device can acquire the platform base image which is the same as the development environment corresponding to the custom image.
And 203, establishing a container according to the platform base image and at least one custom image.
It should be noted that, the execution of step 203 may refer to the execution of step 103 in the above embodiment, which is not described herein.
In one possible implementation of the embodiments of the present application, to avoid tampering with files in the system disk, the system disk is in a read-only state with respect to the container.
Step 204, obtaining a platform base image and a development environment identifier corresponding to at least one custom image.
In the embodiment of the application, each image corresponds to a development environment, and the creating device can acquire the platform base image and the development environment identifier corresponding to each definition image. The platform base image and the development environment corresponding to the user-defined image are identical in identification.
Step 205, acquiring the development environment in the system disk according to the development environment identification.
In the embodiment of the application, the creating device may obtain, according to the development environment identifier, a development environment corresponding to the development environment identifier in the system disk.
In step 206, a direct call relationship between the container and the development environment is established.
In the embodiment of the application, the creating device can establish the call relationship between the container and the development environment, and the development environment with the call relationship established with the container is the development environment corresponding to the custom mirror image, so that the container with the call relationship established can meet the actual requirement of a user on the development environment.
In one possible implementation manner of the embodiment of the present application, in the case that the platform base image or at least one custom image includes a software package, corresponding software in the software package may be installed into the container, so that for a user, the installed software may not need to be downloaded, the software in the container may be directly used, the user operation may be simplified, and the user experience may be improved.
In one possible implementation manner of the embodiment of the present application, in order to further meet the actual development requirement of the user, a system disk may include multiple development environments of different versions, the user may select a development environment of a certain version that is required by the user, and the creating device may establish a call relationship between the container and the development environment of the version selected by the user in the system disk. Specifically, the creating device may obtain the corresponding development environment version according to the version selection instruction in response to the version selection instruction of the user, so that a call relationship between the container and the development environment of the corresponding version in the system disk may be established.
According to the method for creating the development environment, the development environment in the system disk is obtained according to the development environment identification by obtaining the development environment identification corresponding to the platform basic image and at least one custom image, and the direct calling relation between the container and the development environment is established. In the application, the development environment for establishing the call relation with the container is the development environment corresponding to the custom mirror image, so that the container after establishing the call relation can meet the actual requirement of a user on the development environment.
In one possible implementation manner of the embodiment of the application, the creating device may initialize an environment variable of the development environment into the container when establishing a direct call relationship between the container and the development environment. The above process will be described in detail with reference to the third embodiment.
Fig. 3 is a flowchart of a method for creating a development environment according to the third embodiment of the present application.
As shown in fig. 3, the creation method of the development environment may include the steps of:
in step 301, a system disk is established, wherein the system disk includes a plurality of development environments.
Step 302, obtaining a platform base image and determining at least one custom image in response to a user operation.
And 303, establishing a container according to the platform base image and at least one custom image.
Step 304, a platform base image and a development environment identifier corresponding to at least one custom image are obtained.
Step 305, acquiring the development environment in the system disk according to the development environment identification.
It should be noted that, steps 301 to 305 may be implemented in any manner in each embodiment of the present application, which is not limited to this embodiment, and is not repeated herein.
Step 306, obtain environment variables of the development environment.
In the embodiment of the present application, the environment variables may include, but are not limited to, PATH, ld_libry_path, and other environment variables.
It should be understood that when the development environments are different, the environment variables may be different, and therefore, in a possible implementation manner of the embodiment of the present application, the correspondence between the development environments and the environment variables may be preset, so that after the development environments are determined, the above correspondence may be queried according to the development environments, and the environment variables corresponding to the development environments may be obtained.
In step 307, the environment variables of the development environment are initialized into the container.
In the embodiment of the application, the environment variable of the development environment can be initialized into the container, for example, an initialization script can be executed, and the environment variable of the development environment can be initialized into the container.
According to the method for creating the development environment, the environment variables of the development environment are initialized into the container by acquiring the environment variables of the development environment. Thus, by initializing the environment variables of the development environment required by the user into the container, the container can be enabled to satisfy the actual demands of the user for the development environment.
In summary, in daily development work, a developer may have various requirements for deep learning frameworks (such as a parallel, tensorsurface, pyrach, etc.), algorithm packages, software versions, development environments, etc., and by the method of the present application, different development environments, different versions of development environments, and different software versions installed in a container can be provided, so that personalized development requirements of different developers can be satisfied. That is, in the application, the common deep learning framework, the driver, the basic software package, the operator package and the like can be subjected to unified compiling management; the one-key mounting of the software package is realized by utilizing a high-performance network disk technology, and the read-only mounting is supported; the software can be dynamically switched by modifying the configuration of the runtime environment; the platform base mirror image is provided, and the user-defined mirror image is supported, so that the personalized development requirements of different users can be met.
The software package is stored in a PFS (Parallel File System, high-speed parallel file system), is mounted to each host machine (physical machine) in a write-once read-many mode provided by the PFS, can achieve automatic distribution of files, and protects the software files from being tampered through read-only mounting.
The platform base image is a common image and is suitable for investigation or base development and use. When the basic mirror image of the platform cannot meet the requirement of a user, the user is supported to provide the mirror image, the application is recorded as the self-defined mirror image, and only the alignment of the basic system version of the self-defined mirror image and the version of the software sharing package is ensured.
The system software package corresponding to the container is copied from the system disk when the container is started, and the initialization script is executed through the container start, so that the environment variables such as PATH, LD_LIBRARY_PATH and the like are initialized and used. The development environment by default starts jyputterab and provides a visual programming terminal for the user to use.
As one example, when the development environment is started, the visual programming terminal interface provided for use by the user may be as shown in FIG. 4.
As an example, the creation system of the development environment may be as shown in fig. 5, and in order to solve the problem of software incompatibility, different versions of containers may be created, such as a Centos container and a Ubuntu container, each of which has a system disk mounted only by reading. The system disk may have multiple system software versions, such as centos 6.10, centos 7.5, ubuntu16.04, ubuntu18.04, etc., or may extend a new system version according to user requirements; the system disk can comprise basic tool software, such as offline software packages, dependency packages of GCC4.8, GCC8.2, CUDA10.1, fuse, vim and the like; different versions of the development environment may also be included in the system disk, such as versions python, cuda+cudnn, versions deep learning frameworks, and so forth. Isolation of development environments of all versions is realized through Conda env; system sharing tools such as GCC, hadoop, AFS _ MOUNT, NCCL, VTFS, GPU shared libraries and the like may also be included in the system disk.
As an example, the user usage flow may be as shown in fig. 6, and the user may select a default image (i.e. a platform base image) of the system and a custom image, and the user may also select software and a corresponding version, so that the created container may meet the actual development requirement of the user.
For example, as shown in FIG. 7, the user may select a mirror environment in which the public mirror is the platform base mirror, and the user may also select a system version (e.g., centos 6.1), base tool software (e.g., GCC10.2, CUDA 11.0), mirror version (e.g., 1.7).
In the embodiment of the application, the software is installed in the container, so that the sharing of the software package can be realized, the capacity of opening the box and using the software is provided, the problems encountered by developers such as environment dependence and software installation and deployment are solved, and the development efficiency is greatly improved. In addition, through a software sharing mode, the requirements of different deep learning frameworks can be solved. In addition, the requirements of different developers on development environments of all versions can be met, and the development efficiency of the developers is further improved.
Corresponding to the method for creating a development environment provided by the embodiments of fig. 1 to 3, the present application also provides a device for creating a development environment, and since the device for creating a development environment provided by the embodiments of the present application corresponds to the method for creating a development environment provided by the embodiments of fig. 1 to 3, the implementation of the method for creating a development environment is also applicable to the device for creating a development environment provided by the embodiments of the present application, which is not described in detail in the embodiments of the present application.
Fig. 8 is a schematic structural diagram of a creation device of a development environment provided in the fourth embodiment of the present application.
As shown in fig. 8, the creation means 800 of the development environment may include: a first setup module 810, an acquisition module 820, a determination module 830, and a second setup module 840.
Wherein, the first building module 810 is configured to build a system disk, wherein the system disk includes a plurality of development environments.
And the acquisition module 820 is used for acquiring the platform base image.
A determining module 830 is configured to determine at least one custom image in response to a user operation.
The second establishing module 840 is configured to establish a container according to the platform base image and the at least one custom image, and establish a call relationship between the container and one of the development environments in the system disk.
Further, in one possible implementation manner of the embodiment of the present application, the second establishing module 840 is specifically configured to: acquiring a platform basic image and a development environment identifier corresponding to at least one custom image; acquiring a development environment in a system disk according to the development environment identification; and establishing a direct call relation between the container and the development environment.
Further, in one possible implementation manner of the embodiment of the present application, the second establishing module 840 is specifically configured to: acquiring environment variables of a development environment; the environment variables of the development environment are initialized into the container.
Further, in one possible implementation of the embodiments of the present application, multiple development environments within a system disk are isolated by an environment management system Conda.
Further, in one possible implementation of the embodiments of the present application, the system disk is in a read-only state with respect to the container.
Further, in one possible implementation manner of the embodiment of the present application, if the platform base image or the at least one custom image includes a software package, the creating apparatus 800 of the development environment may further include:
and the installation module is used for installing corresponding software in the software package to the container.
Further, in one possible implementation manner of the embodiment of the present application, a system disk includes a plurality of development environments of different versions, and the creation apparatus 800 of the development environment may further include:
the processing module is used for receiving the version selection instruction of the user and acquiring the corresponding development environment version according to the version selection instruction, wherein the calling relation between the container and the development environment of the corresponding version in the system disk is established.
The creating device of the development environment in the embodiment of the application creates the container according to the platform base mirror image and at least one custom mirror image by creating a system disk, wherein the system disk comprises a plurality of development environments, obtains the platform base mirror image and the at least one custom mirror image selected by a user, and creates a calling relationship between the container and one of the development environments in the system disk. Therefore, the container is built according to the platform basic image and at least one custom image, the built container can meet the personalized development requirements of different users, and the call relationship between the container and one of the development environments in the system disk is built, so that the container after the call relationship is built can meet the actual requirements of the users on the development environments.
In order to implement the above-described embodiments, the present application also provides an electronic device, which may include at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of creating a development environment according to any one of the embodiments of the present application.
In order to implement the above embodiments, the present application further provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method for creating a development environment set forth in any one of the above embodiments of the present application.
To achieve the above embodiments, the present application further provides a computer program product comprising a computer program which, when executed by a processor, implements the method of creating a development environment as set forth in any of the above embodiments of the present application.
According to embodiments of the present application, there is also provided an electronic device, a readable storage medium and a computer program product.
Fig. 9 shows a schematic block diagram of an example electronic device 900 that may be used to implement embodiments of the present application. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the application described and/or claimed herein.
As shown in fig. 9, the apparatus 900 includes a computing unit 901 that can perform various appropriate actions and processes according to a computer program stored in a ROM (Read-Only Memory) 902 or a computer program loaded from a storage unit 907 into a RAM (Random Access Memory ) 903. In the RAM 903, various programs and data required for the operation of the device 900 can also be stored. The computing unit 901, the ROM 902, and the RAM 903 are connected to each other by a bus 904. An I/O (Input/Output) interface 905 is also connected to bus 904.
Various components in device 900 are connected to I/O interface 905, including: an input unit 906 such as a keyboard, a mouse, or the like; an output unit 907 such as various types of displays, speakers, and the like; a storage unit 908 such as a magnetic disk, an optical disk, or the like; and a communication unit 909 such as a network card, modem, wireless communication transceiver, or the like. The communication unit 909 allows the device 900 to exchange information/data with other devices through a computer network such as the internet and/or various telecommunications networks.
The computing unit 901 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of computing unit 901 include, but are not limited to, a CPU (Central Processing Unit ), GPU (Graphic Processing Units, graphics processing unit), various dedicated AI (Artificial Intelligence ) computing chips, various computing units running machine learning model algorithms, DSP (Digital Signal Processor ), and any suitable processor, controller, microcontroller, etc. The computing unit 901 performs the respective methods and processes described above, such as the creation method of the development environment described above. For example, in some embodiments, the methods of creating a development environment described above may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as the storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto the device 900 via the ROM 902 and/or the communication unit 909. When the computer program is loaded into the RAM 903 and executed by the computing unit 901, one or more steps of the creation method of the development environment described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the above-described creation method of the development environment in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit System, FPGA (Field Programmable Gate Array ), ASIC (Application-Specific Integrated Circuit, application-specific integrated circuit), ASSP (Application Specific Standard Product, special-purpose standard product), SOC (System On Chip ), CPLD (Complex Programmable Logic Device, complex programmable logic device), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for carrying out methods of the present application may be written in any combination of one or more programming languages. These program code may be provided to a processor or controller of a general purpose computer, special purpose computer, or other programmable data processing apparatus such that the program code, when executed by the processor or controller, causes the functions/operations specified in the flowchart and/or block diagram to be implemented. The program code may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of this application, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. The machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, RAM, ROM, EPROM (Electrically Programmable Read-Only-Memory, erasable programmable read-Only Memory) or flash Memory, an optical fiber, a CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on a computer having: a display device (e.g., CRT (Cathode-Ray Tube) or LCD (Liquid Crystal Display ) monitor) for displaying information to a user; and a keyboard and pointing device (e.g., a mouse or trackball) by which a user can provide input to the computer. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: LAN (Local Area Network ), WAN (Wide Area Network, wide area network), internet and blockchain networks.
The computer system may include a client and a server. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service (Virtual Private Server, virtual special servers) are overcome. The server may also be a server of a distributed system or a server that incorporates a blockchain.
It should be noted that, artificial intelligence is a subject of studying a certain thought process and intelligent behavior (such as learning, reasoning, thinking, planning, etc.) of a computer to simulate a person, and has a technology at both hardware and software level. Artificial intelligence hardware technologies generally include technologies such as sensors, dedicated artificial intelligence chips, cloud computing, distributed storage, big data processing, and the like; the artificial intelligence software technology mainly comprises a computer vision technology, a voice recognition technology, a natural language processing technology, a machine learning/deep learning technology, a big data processing technology, a knowledge graph technology and the like.
Cloud computing (cloud computing) refers to a technical system that accesses an elastically extensible shared physical or virtual resource pool through a network, wherein resources can include servers, operating systems, networks, software, applications, storage devices and the like, and can be deployed and managed in an on-demand and self-service manner. Through cloud computing technology, high-efficiency and powerful data processing capability can be provided for technical application such as artificial intelligence and blockchain, and model training.
According to the technical scheme of the embodiment of the application, the system disk is established, wherein the system disk comprises a plurality of development environments, the platform base mirror image and at least one user-defined mirror image selected by a user are obtained, the container is established according to the platform base mirror image and the at least one user-defined mirror image, and the calling relationship between the container and one of the development environments in the system disk is established. Therefore, the container is built according to the platform basic image and at least one custom image, the built container can meet the personalized development requirements of different users, and the call relationship between the container and one of the development environments in the system disk is built, so that the container after the call relationship is built can meet the actual requirements of the users on the development environments.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present disclosure may be performed in parallel, sequentially, or in a different order, provided that the desired results of the technical solutions disclosed in the present application are achieved, and are not limited herein.
The above embodiments do not limit the scope of the application. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present application are intended to be included within the scope of the present application.

Claims (14)

1. A method of creating a development environment, comprising:
establishing a system disk, wherein the system disk comprises a plurality of development environments;
acquiring a platform base mirror image, and determining at least one custom mirror image in response to user operation;
establishing a container according to the platform base image and the at least one custom image, and establishing a calling relationship between the container and one of development environments in the system disk;
the establishing a call relationship between the container and one of the development environments in the system disk includes:
acquiring a platform basic image and a development environment identifier corresponding to at least one custom image;
acquiring a development environment in the system disk according to the development environment identifier;
and establishing a direct calling relation between the container and the development environment.
2. The method of claim 1, wherein the establishing a direct call relationship of the container to the development environment comprises:
acquiring an environment variable of the development environment;
an environment variable of the development environment is initialized into the container.
3. The method of claim 1, wherein a plurality of development environments among the system disks are isolated by an environment management system Conda.
4. The method of claim 1, wherein the system disk is in a read-only state relative to the container.
5. The method of claim 1, wherein if the platform base image or the at least one custom image comprises a software package, the method further comprises:
corresponding software among the software packages is installed to the container.
6. The method of claim 1, wherein the system disk includes a plurality of different versions of a development environment therein, the method further comprising:
and receiving a version selection instruction of a user, and acquiring a corresponding development environment version according to the version selection instruction, wherein a calling relationship between the container and the development environment of the corresponding version in the system disk is established.
7. A creation apparatus of a development environment, comprising:
a first building module for building a system disk, wherein the system disk comprises a plurality of development environments;
the acquisition module is used for acquiring the basic mirror image of the platform;
the determining module is used for responding to the user operation and determining at least one custom mirror image;
the second establishing module is used for establishing a container according to the platform basic image and the at least one custom image and establishing a calling relationship between the container and one of development environments in the system disk;
the second establishing module is specifically configured to:
acquiring a platform basic image and a development environment identifier corresponding to at least one custom image;
acquiring a development environment in the system disk according to the development environment identifier;
and establishing a direct calling relation between the container and the development environment.
8. The apparatus of claim 7, wherein the second setup module is specifically configured to:
acquiring an environment variable of the development environment;
an environment variable of the development environment is initialized into the container.
9. The apparatus of claim 7, wherein a plurality of development environments among the system disks are isolated by an environment management system Conda.
10. The apparatus of claim 7, wherein the system disk is read-only with respect to the container.
11. The apparatus of claim 7, wherein if the platform base image or the at least one custom image comprises a software package, the apparatus further comprises:
and the installation module is used for installing corresponding software in the software package to the container.
12. The apparatus of claim 7, wherein the system disk includes a plurality of different versions of a development environment therein, the apparatus further comprising:
and the processing module is used for receiving a version selection instruction of a user and acquiring a corresponding development environment version according to the version selection instruction, wherein a calling relationship between the container and the development environment of the corresponding version in the system disk is established.
13. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of creating a development environment of any one of claims 1-6.
14. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the creation method of the development environment according to any one of claims 1-6.
CN202110328420.2A 2021-03-26 2021-03-26 Development environment creation method, apparatus, electronic device and storage medium Active CN113157281B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110328420.2A CN113157281B (en) 2021-03-26 2021-03-26 Development environment creation method, apparatus, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110328420.2A CN113157281B (en) 2021-03-26 2021-03-26 Development environment creation method, apparatus, electronic device and storage medium

Publications (2)

Publication Number Publication Date
CN113157281A CN113157281A (en) 2021-07-23
CN113157281B true CN113157281B (en) 2024-02-13

Family

ID=76885641

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110328420.2A Active CN113157281B (en) 2021-03-26 2021-03-26 Development environment creation method, apparatus, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN113157281B (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106873975A (en) * 2016-12-30 2017-06-20 武汉默联股份有限公司 Devops based on Docker persistently pays and automated system and method
CN109104467A (en) * 2018-07-25 2018-12-28 北京京东尚科信息技术有限公司 Develop environment construction method, apparatus and plateform system and storage medium
WO2019095936A1 (en) * 2017-11-15 2019-05-23 腾讯科技(深圳)有限公司 Method and system for building container mirror image, and server, apparatus and storage medium
WO2019153829A1 (en) * 2018-02-12 2019-08-15 人和未来生物科技(长沙)有限公司 Method and system for rapid generation of container dockerfile and container mirror image
CN110471740A (en) * 2019-07-31 2019-11-19 北京百度网讯科技有限公司 Execute method, apparatus, equipment and the computer storage medium of machine learning task
CN111399865A (en) * 2020-04-21 2020-07-10 贵州新致普惠信息技术有限公司 Method for automatically constructing target file based on container technology

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9973566B2 (en) * 2013-11-17 2018-05-15 Nimbix, Inc. Dynamic creation and execution of containerized applications in cloud computing
US9075638B2 (en) * 2012-08-14 2015-07-07 Atlassian Corporation Pty Ltd. Efficient hosting of virtualized containers using read-only operating systems

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106873975A (en) * 2016-12-30 2017-06-20 武汉默联股份有限公司 Devops based on Docker persistently pays and automated system and method
WO2019095936A1 (en) * 2017-11-15 2019-05-23 腾讯科技(深圳)有限公司 Method and system for building container mirror image, and server, apparatus and storage medium
WO2019153829A1 (en) * 2018-02-12 2019-08-15 人和未来生物科技(长沙)有限公司 Method and system for rapid generation of container dockerfile and container mirror image
CN109104467A (en) * 2018-07-25 2018-12-28 北京京东尚科信息技术有限公司 Develop environment construction method, apparatus and plateform system and storage medium
CN110471740A (en) * 2019-07-31 2019-11-19 北京百度网讯科技有限公司 Execute method, apparatus, equipment and the computer storage medium of machine learning task
CN111399865A (en) * 2020-04-21 2020-07-10 贵州新致普惠信息技术有限公司 Method for automatically constructing target file based on container technology

Also Published As

Publication number Publication date
CN113157281A (en) 2021-07-23

Similar Documents

Publication Publication Date Title
US9851933B2 (en) Capability-based abstraction of software-defined infrastructure
US10063427B1 (en) Visualizing and interacting with resources of an infrastructure provisioned in a network
US10996997B2 (en) API-based service command invocation
US10656918B2 (en) Discovery for pattern utilization for application transformation and migration into the cloud pattern
CN112328301B (en) Method and device for maintaining consistency of operating environments, storage medium and electronic equipment
US10489013B2 (en) Intelligent taskbar shortcut menu for webpage control
US20180300740A1 (en) Predicting cost of an infrastructure stack described in a template
US10915529B2 (en) Selecting an optimal combination of systems for query processing
US11100233B2 (en) Optimizing operating system vulnerability analysis
CN108885686B (en) Cloud-based active debugging system for video analysis
CN115509522A (en) Interface arranging method and system for low-code scene and electronic equipment
CN113157281B (en) Development environment creation method, apparatus, electronic device and storage medium
WO2023169193A1 (en) Method and device for generating smart contract
CN115115062B (en) Machine learning model building method, related device and computer program product
US10168999B2 (en) Software object definition and integration
CN113612643B (en) Network configuration method, device and equipment of cloud mobile phone and storage medium
CN111626401B (en) Operation method and device
CN113220576B (en) Management method, device, equipment and storage medium of test environment
CN116561075B (en) Method for generating dynamic link library file, method and device for calling operator
CN118092578A (en) Clock setting method and device, electronic equipment and storage medium
CN113342413B (en) Method, apparatus, device, medium, and article for processing components
CN108196848A (en) Interface insertion display methods, device, user terminal and readable storage medium storing program for executing
CN113900734B (en) Application program file configuration method, device, equipment and storage medium
WO2021249118A1 (en) Method and device for generating and registering ui service package and loading ui service
US20230245481A1 (en) Text detection algorithm for separating words detected as one text bounding box

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant