CN113157281A - Development environment creation method and device, electronic equipment and storage medium - Google Patents

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

Info

Publication number
CN113157281A
CN113157281A CN202110328420.2A CN202110328420A CN113157281A CN 113157281 A CN113157281 A CN 113157281A CN 202110328420 A CN202110328420 A CN 202110328420A CN 113157281 A CN113157281 A CN 113157281A
Authority
CN
China
Prior art keywords
development environment
container
development
user
establishing
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.)
Granted
Application number
CN202110328420.2A
Other languages
Chinese (zh)
Other versions
CN113157281B (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

Images

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 development environment creating method and device, electronic equipment and a storage medium, and relates to the field 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 basic mirror image, and responding to user operation to determine at least one user-defined mirror image; and establishing a container according to the platform basic mirror image and the at least one user-defined mirror image, and establishing a calling relationship between the container and one development environment in the system disk. Therefore, the container is established according to the platform basic mirror image and the at least one user-defined mirror image, the established container can meet the individual development requirements of different users, the call relation between the container and one development environment in the system disk is established, and the container after the call relation is established can meet the actual requirements of the users on the development environments.

Description

Development environment creation method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of AI (Artificial Intelligence) and cloud computing, and more particularly, to a method and apparatus for creating a development environment, an electronic device, and a storage medium.
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 provided for resource allocation management, development tool service, computational resource monitoring, authentication and the like. At present, a machine learning platform can provide a fixed operating system and a fixed software version, and a set of standard images are constructed based on the fixed operating system and the fixed software version, so that developers can develop machine models based on the standard images.
Disclosure of Invention
The application provides a method and a device for creating a development environment, an electronic device and a storage medium.
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 basic mirror image, and responding to user operation to determine at least one user-defined mirror image;
and establishing a container according to the platform basic mirror image and the at least one user-defined mirror image, and establishing a calling relationship between the container and one development environment in the system disk.
According to another aspect of the present application, there is provided a development environment creation apparatus including:
the system comprises a first establishing module, a second establishing module and a third establishing module, wherein the first establishing module is used for establishing a system disk, and the system disk comprises a plurality of development environments;
the acquisition module is used for acquiring a platform foundation mirror image;
the determining module is used for responding to user operation and determining at least one self-defined mirror image;
and the second establishing module is used for establishing a container according to the platform basic image and the at least one user-defined image and establishing a calling relationship between the container and one development environment in the system disk.
According to yet another aspect of the present application, there is provided an electronic device including:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
the memory stores instructions executable by the at least one processor to enable the at least one processor to perform a method for creating a development environment as set forth in the above-described embodiments of the present 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 a computer to execute the method of creating a development environment set forth in the above-described embodiments of the present application.
According to yet another aspect of the present application, there is provided a computer program product comprising a computer program which, when executed by a processor, implements the method for creating a development environment as set forth in the above-described embodiments of the present application.
It should be understood that the statements in this section do not necessarily identify key or critical features of the embodiments of the present application, nor do they limit the scope of the present application. Other features of the present application will become apparent from the following description.
Drawings
The drawings are included to provide a better understanding of the present solution and are not intended to limit the present application. Wherein:
fig. 1 is a flowchart illustrating a method for creating a development environment according to an embodiment of the present application;
fig. 2 is a flowchart illustrating a method for creating a development environment according to a second embodiment of the present application;
fig. 3 is a flowchart illustrating a method for creating a development environment according to a third embodiment of the present application;
FIG. 4 is a schematic diagram of a visual programming terminal interface when a development environment is started according to an embodiment of the present application;
FIG. 5 is a schematic diagram of a system for creating a development environment according to an embodiment of the present application;
FIG. 6 is a schematic view illustrating a user usage flow in an embodiment of the present application;
FIG. 7 is a schematic view of a user interface in an embodiment of the present application;
fig. 8 is a schematic structural diagram of a device for creating a development environment according to a fourth embodiment of the present application;
FIG. 9 illustrates a schematic block diagram of an example electronic device that can be used to implement embodiments of the present application.
Detailed Description
The following description of the exemplary embodiments of the present application, taken in conjunction with the accompanying drawings, includes various details of the embodiments of the application for the understanding of the same, which are to be considered exemplary only. Accordingly, those 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.
At present, a machine learning platform can provide a fixed operating system and a fixed software version, and a set of standard images are constructed based on the fixed operating system and the fixed software version, so that developers can develop machine models based on the standard images. However, since the standard mirror image is a platform fixed mirror image, it may not be able to meet the personalized development requirements of the user, for example, the user-defined system of the user does not match the fixed operating system, and the user-required software version is different from the fixed software version.
Therefore, the present application mainly addresses the above-mentioned problems, and provides a method for creating a development environment, in which a system disk is created, the system disk includes a plurality of development environments, a platform base image and at least one user-defined image selected by a user are obtained, a container is created according to the platform base image and the at least one user-defined image, and a call relationship between the container and one of the development environments in the system disk is created. Therefore, the container is established according to the platform basic mirror image and the at least one user-defined mirror image, the established container can meet the individual development requirements of different users, the call relation between the container and one development environment in the system disk is established, and the container after the call relation is established can meet the actual requirements of the users on the development environments.
A method, an apparatus, an electronic device, and a storage medium for creating a development environment of the embodiments of the present application are described below with reference to the drawings.
Fig. 1 is a flowchart illustrating a method for creating a development environment according to an embodiment of the present application.
The embodiment of the present application is exemplified in that the creating method of the development environment is configured in a creating apparatus of the development environment, and the creating apparatus can be applied to any electronic device, so that the electronic device can execute the creating function of the development environment.
As shown in fig. 1, the method for creating the development environment may include the following steps:
step 101, establishing a system disk, wherein the system disk comprises a plurality of development environments.
In the embodiment 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, and the like.
In an embodiment of the present application, a system disk may be established, wherein a plurality of development environments may be included on the system disk.
Step 102, obtaining a platform base image, and determining at least one custom image in response to a user operation.
In an embodiment of the present application, the platform base image may be a base image provided by a machine learning platform.
In this embodiment of the application, the customized image may be an image constructed by the current user or another user, for example, the current user may construct the customized image on the platform-based image provided by the machine learning platform, or another user may construct the customized image on the platform-based image provided by the machine learning platform, so that the user may select the customized image constructed by another user.
In an embodiment of the application, the creation device may obtain a platform base image from a machine learning platform and determine at least one custom image in response to a user operation.
And 103, establishing a container according to the platform basic mirror image and the at least one user-defined mirror image, and establishing a calling relationship between the container and one development environment in the system disk.
In this embodiment of the application, the creating apparatus may create the container according to the platform base image and the at least one customized image, so that the created container can meet actual requirements of different users, that is, in comparison with creating the container according to the platform base image provided by the machine learning platform in the related art, where the created container includes only some base content, the created container may include richer content according to the platform base image and the at least one customized image, and can meet actual development requirements of different users.
In the embodiment of the application, the system disk comprises a plurality of development environments, and after the container is established, a calling relationship 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 for the development environments.
For example, when the development environment that the user wants to invoke is a python environment, a calling relationship between the container and the python environment may be established. Therefore, the container after the call relation 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 basic mirror image and at least one user-defined mirror image selected by a user are obtained, a container is established according to the platform basic mirror image and the at least one user-defined mirror image, and a calling relation between the container and one of the development environments in the system disk is established. Therefore, the container is established according to the platform basic mirror image and the at least one user-defined mirror image, the established container can meet the individual development requirements of different users, the call relation between the container and one development environment in the system disk is established, and the container after the call relation is established can meet the actual requirements of the users on the development environments.
In a possible implementation manner of the embodiment of the application, in order to enable the established container to meet the actual development requirement of the user, when a call relationship between the container and the development environment is established, development environment identifiers corresponding to the images may be obtained, and the development environment in the system disk is obtained according to the development environment identifiers, so that the call relationship between the container and the obtained development environment may be established. The above process is described in detail with reference to example two.
Fig. 2 is a flowchart illustrating a method for creating a development environment according to a second embodiment of the present application.
As shown in fig. 2, the method for creating the development environment may include the following steps:
step 201, establishing a system disk, wherein the system disk comprises 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 foregoing embodiment, and details are not described here.
In a possible implementation manner of the embodiment of the present application, the multiple development environments in the system disk may be isolated by the environment management system Conda, for example, the multiple development environments in the system disk may be isolated by the Conda env, so as to solve the difference 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 identifier and the platform base image. The development environment identification is used for uniquely identifying the corresponding development environment.
In the embodiment of the application, a user can select or create a custom mirror image corresponding to a required development environment according to development requirements, and the creation device can acquire a platform base mirror image which is the same as the development environment corresponding to the custom mirror image.
And step 203, establishing a container according to the platform basic image and the at least one custom image.
It should be noted that the execution process of step 203 may refer to the execution process of step 103 in the foregoing embodiment, and details are not described here.
In one possible implementation manner of the embodiment of the present application, in order 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, acquiring a platform basic image and a development environment identifier corresponding to at least one custom image.
In the embodiment of the application, each mirror image corresponds to one development environment, and the creating device can acquire the platform base mirror image and the development environment identifiers corresponding to the respective definition mirror images. And the development environment identification corresponding to the platform basic mirror image and the user-defined mirror image is the same.
And step 205, acquiring the development environment in the system disk according to the development environment identification.
In this embodiment of the application, the creating apparatus may obtain, according to the development environment identifier, a development environment corresponding to the development environment identifier in the system disk.
Step 206, establishing a direct calling relationship between the container and the development environment.
In the embodiment of the application, the creating device can establish the calling relationship between the container and the development environment, and the development environment establishing the calling relationship with the container is the development environment corresponding to the customized mirror image, so that the container after establishing the calling relationship can meet the actual requirements of a user on the development environment.
In a possible implementation manner of the embodiment of the application, when the platform base image or the at least one custom image includes the software package, the corresponding software in the software package may be installed in the container, so that for a user, the user may directly use the software in the container without downloading the installed software, thereby simplifying user operation and improving user experience.
In a possible implementation manner of the embodiment of the application, in order to further meet actual development requirements of users, the system disk may include a plurality of development environments of different versions, a user may select a development environment of a 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 that is selected by the user in the system disk. Specifically, the creating device may respond to a version selection instruction of a user, and obtain a corresponding development environment version according to the version selection instruction, 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 platform basic image and the development environment identification corresponding to the 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 calling relationship with the container is the development environment corresponding to the user-defined mirror image, so that the container after establishing the calling relationship can meet the actual requirements of a user on the development environment.
In a possible implementation manner of the embodiment of the present application, when the creating apparatus establishes a direct call relationship between the container and the development environment, the creating apparatus may initialize the environment variable of the development environment into the container. The above process is described in detail with reference to example three.
Fig. 3 is a flowchart illustrating a method for creating a development environment according to a third embodiment of the present application.
As shown in fig. 3, the method for creating the development environment may include the following steps:
step 301, a system disk is established, wherein the system disk comprises 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.
Step 303, a container is established according to the platform base image and the at least one custom image.
And 304, acquiring a platform basic image and a development environment identifier corresponding to at least one custom image.
And 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 by any one of the embodiments of the present application, and the embodiments of the present application are not limited to this and are not described again.
And step 306, acquiring 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 _ LIBRARY _ 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, a corresponding relationship between the development environments and the environment variables may be preset, so that after the development environments are determined, the corresponding relationship may be queried according to the development environments to obtain the environment variables corresponding to the development environments.
At step 307, environment variables of the development environment are initialized into the container.
In the embodiment of the present application, the environment variables of the development environment may be initialized into the container, for example, the initialization script may be executed to initialize the environment variables of the development environment 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. Therefore, the container can meet the actual requirements of the user on the development environment by initializing the environment variables of the development environment required by the user into the container.
In summary, in daily development work, a developer may have various requirements for a deep learning framework (e.g., pagepath, tensorflow, pitcher, etc.), an algorithm package, a software version, a development environment, etc., and by the method of the present application, different development environments, development environments of different versions, and different software versions installed in a container may be provided, so that personalized development requirements of different developers may be satisfied. That is, in the present application, a common deep learning framework, a driver, a basic software package, an algorithm package, and the like can be compiled and managed in a unified manner; one-key mounting of the software package is realized by utilizing a high-performance network disk technology, and read-only mounting is supported; by modifying the runtime environment configuration, the software can be dynamically switched; the platform basic mirror image is provided, and simultaneously, 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), is mounted to each host (physical machine) in a write-once and read-many manner provided by the PFS, and can achieve automatic distribution of files, and the software files are protected from being tampered by read-only mounting.
The platform basic mirror image is a common mirror image and is suitable for investigation or basic development and use. When the platform basic mirror image cannot meet the requirements of the user, the user is supported to provide the mirror image, the application is recorded as the user-defined mirror image, and only the basic system version of the user-defined mirror image needs to be aligned with the version of the software sharing package.
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 starting, so that environment variables such as PATH, LD _ LIBRARY _ PATH and the like are initialized and used. The development environment starts the jyputerlab by default and provides a visual programming terminal for the user to use.
As an 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, a creating system of the development environment may be as shown in fig. 5, and in order to solve the problem of software incompatibility, containers of different versions, such as a Centos container and a Ubuntu container, may be created, and each container only mounts a system disk. The system disk may have multiple system software versions, such as centros 6.10, centros 7.5, ubuntu16.04, ubuntu18.04, etc., or a new system version may be extended according to user requirements; basic tool software, such as offline software packages and dependent packages of GCC4.8, GCC8.2, CUDA10.1, fuse, vim and the like, can be included in the system disk; different versions of development environments can also be included in the system disk, such as versions python, cuda + cudnn, versions of deep learning frameworks, and the like. Wherein, the development environments of the versions are isolated through the Conda env; system sharing tools such as GCC, Hadoop, AFS _ MOUNT, NCCL, VTFS, GPU shared libraries, and the like can 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 system default image (i.e., a platform base image), a custom image, and also may select software and a corresponding version, so that the created container can meet the actual development requirements of the user.
For example, as shown in FIG. 7, the user may select a mirror environment, where the common mirror is the platform base mirror, and the user may also select a system version (e.g., centros 6.1), base utility software (e.g., GCC10.2, CUDA11.0), and 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 out-of-box and use capability of the software is provided, the problems of environment dependence, software installation and deployment and the like encountered by developers are solved, and the development efficiency is greatly improved. In addition, the requirements of different-depth learning frames can be met in a software sharing mode. In addition, the requirements of different developers on development environments of various versions can be met, and the development efficiency of the developers is further improved.
Corresponding to the method for creating a development environment provided in 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 in the embodiments of the present application corresponds to the method for creating a development environment provided in the embodiments of fig. 1 to 3, the embodiment of the method for creating a development environment is also applicable to the device for creating a development environment provided in the embodiments of the present application, and is not described in detail in the embodiments of the present application.
Fig. 8 is a schematic structural diagram of a device for creating a development environment according to a fourth embodiment of the present application.
As shown in fig. 8, the creating apparatus 800 of the development environment may include: a first establishing module 810, an obtaining module 820, a determining module 830, and a second establishing module 840.
The first establishing module 810 is configured to establish a system disk, where the system disk includes a plurality of development environments.
An obtaining module 820 for obtaining the platform base image.
A determining module 830, 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 a possible implementation manner of the embodiment of the present application, the second establishing module 840 is specifically configured to: acquiring a platform basic mirror image and a development environment identifier corresponding to at least one user-defined mirror 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.
Further, in a possible implementation manner of the embodiment of the present application, the second establishing module 840 is specifically configured to: acquiring an environment variable of a development environment; environment variables of the development environment are initialized into the container.
Further, in a possible implementation manner of the embodiment of the present application, a plurality of development environments among the system disks are isolated by the environment management system Conda.
Further, in a possible implementation manner of the embodiment of the present application, the system disk is in a read-only state with respect to the container.
Further, in a 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 the corresponding software in the software package to the container.
Further, in a possible implementation manner of the embodiment of the present application, the system disk includes a plurality of different versions of development environments, and the creating apparatus 800 of the development environment may further include:
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 call relation between the container and the development environment of the corresponding version in the system disk is established.
The device for creating the development environment comprises a system disk, wherein the system disk comprises a plurality of development environments, a platform basic mirror image and at least one user-defined mirror image selected by a user are obtained, a container is created according to the platform basic mirror image and the at least one user-defined mirror image, and a calling relation between the container and one of the development environments in the system disk is created. Therefore, the container is established according to the platform basic mirror image and the at least one user-defined mirror image, the established container can meet the individual development requirements of different users, the call relation between the container and one development environment in the system disk is established, and the container after the call relation is established can meet the actual requirements of the users on the development environments.
To implement the above 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, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method for creating a development environment according to any of the embodiments of the present application.
In order to implement the above embodiments, the present application also provides a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute the method for creating a development environment proposed in any of the above embodiments of the present application.
In order to implement the above embodiments, the present application further provides a computer program product, which includes a computer program that, when executed by a processor, implements the method for creating a development environment proposed by any of the above embodiments of the present application.
There is also provided, in accordance with an embodiment of the present application, an electronic device, a readable storage medium, and a computer program product.
FIG. 9 illustrates a schematic block diagram of an example electronic device 900 that can 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 phones, smart phones, wearable devices, and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be examples only, and are not meant to limit implementations of the present application that are described and/or claimed herein.
As shown in fig. 9, the device 900 includes a computing unit 901 that can perform various appropriate actions and processes in accordance with 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 calculation unit 901, ROM 902, and RAM 903 are connected to each other via a bus 904. An I/O (Input/Output) interface 905 is also connected to the bus 904.
A number of components in the device 900 are connected to the I/O interface 905, including: an input unit 906 such as a keyboard, a mouse, and 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, optical disk, or the like; and a communication unit 909 such as a network card, a modem, a wireless communication transceiver, and 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 telecommunication 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 the computing Unit 901 include, but are not limited to, a CPU (Central Processing Unit), a GPU (graphics Processing Unit), various dedicated AI (Artificial Intelligence) computing chips, various computing Units running machine learning model algorithms, a DSP (Digital Signal Processor), and any suitable Processor, controller, microcontroller, and the like. The computing unit 901 executes the respective methods and processes described above, such as the above-described development environment creation method. For example, in some embodiments, the creation of the development environment described above may be implemented as a computer software program tangibly embodied on a machine-readable medium, such as storage unit 908. In some embodiments, part or all of the computer program may be loaded and/or installed onto device 900 via ROM 902 and/or communications 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 method of creating a development environment described above may be performed. Alternatively, in other embodiments, the computing unit 901 may be configured to perform the above-described development environment creation method by any other suitable means (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be realized in digital electronic circuitry, Integrated circuitry, FPGAs (Field Programmable Gate arrays), ASICs (Application-Specific Integrated circuits), ASSPs (Application Specific Standard products), SOCs (System On Chip, System On a Chip), CPLDs (Complex Programmable Logic devices), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs that are executable and/or interpretable on a programmable system including at least one programmable processor, which may be special or general purpose, receiving data and instructions from, and transmitting data and instructions to, a storage system, at least one input device, and at least one output device.
Program code for implementing the methods of the present application may be written in any combination of one or more programming languages. These program codes 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 codes, when executed by the processor or controller, cause the functions/operations specified in the flowchart and/or block diagram to be performed. 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. A 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, a RAM, a ROM, an EPROM (Electrically 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., a CRT (Cathode Ray Tube) or LCD (Liquid Crystal Display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a 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 can 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, speech, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a back-end 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 back-end, 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), internet, and blockchain Network.
The computer system may include clients and servers. A client and server are generally 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 may be a cloud Server, which is also called a cloud computing Server or a cloud host, and is a host product in a cloud computing service system, so as to solve the defects of high management difficulty and weak service expansibility in a conventional physical host and a VPS (Virtual Private Server). The server may also be a server of a distributed system, or a server incorporating a blockchain.
It should be noted that artificial intelligence is a subject for studying a computer to simulate some human thinking processes and intelligent behaviors (such as learning, reasoning, thinking, planning, etc.), and includes both hardware and software technologies. 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, machine learning/deep learning, a big data processing technology, a knowledge map technology and the like.
Cloud computing (cloud computing) refers to a technology architecture that accesses a flexibly extensible shared physical or virtual resource pool through a network, where resources may include servers, operating systems, networks, software, applications, storage devices, and the like, and may be deployed and managed in an on-demand, self-service manner. Through the cloud computing technology, high-efficiency and strong data processing capacity can be provided for technical application and model training of artificial intelligence, block chains and the like.
According to the technical scheme of the embodiment of the application, the system disk is established and comprises a plurality of development environments, the platform basic mirror image and at least one user-defined mirror image selected by a user are obtained, the container is established according to the platform basic 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 established according to the platform basic mirror image and the at least one user-defined mirror image, the established container can meet the individual development requirements of different users, the call relation between the container and one development environment in the system disk is established, and the container after the call relation is established can meet the actual requirements of the users on the development environments.
It should be understood that various forms of the flows shown above may be used, with steps reordered, added, or deleted. For example, the steps described in the present disclosure may be executed in parallel, sequentially, or in different orders, and are not limited herein as long as the desired results of the technical solutions disclosed in the present disclosure can be achieved.
The above-described embodiments should not be construed as limiting the scope of the present application. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions may be made in accordance with design requirements and other factors. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present application shall be included in the protection scope of the present application.

Claims (17)

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 basic mirror image, and responding to user operation to determine at least one user-defined mirror image;
and establishing a container according to the platform basic mirror image and the at least one user-defined mirror image, and establishing a calling relationship between the container and one development environment in the system disk.
2. The method of claim 1, wherein said establishing a calling relationship between said container and one of said development environments in said system disk comprises:
acquiring a platform basic mirror image and a development environment identifier corresponding to at least one user-defined mirror image;
acquiring a development environment in the system disk according to the development environment identification;
and establishing a direct calling relation between the container and the development environment.
3. The method of claim 2, wherein said establishing a direct calling relationship of said container to said development environment comprises:
acquiring environment variables of the development environment;
initializing environment variables of the development environment into the container.
4. The method of claim 1, wherein multiple development environments within the system disk are isolated by an environment management system Conda.
5. The method of claim 1, wherein the system tray is in a read-only state with respect to the container.
6. 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:
installing corresponding software in the software package to the container.
7. The method of claim 1, wherein the system disk includes a plurality of different versions of development environments 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 call relation between the container and the development environment of the corresponding version in the system disk is established.
8. An apparatus for creating a development environment, comprising:
the system comprises a first establishing module, a second establishing module and a third establishing module, wherein the first establishing module is used for establishing a system disk, and the system disk comprises a plurality of development environments;
the acquisition module is used for acquiring a platform foundation mirror image;
the determining module is used for responding to user operation and determining at least one self-defined mirror image;
and the second establishing module is used for establishing a container according to the platform basic image and the at least one user-defined image and establishing a calling relationship between the container and one development environment in the system disk.
9. The apparatus according to claim 8, wherein the second establishing module is specifically configured to:
acquiring a platform basic mirror image and a development environment identifier corresponding to at least one user-defined mirror image;
acquiring a development environment in the system disk according to the development environment identification;
and establishing a direct calling relation between the container and the development environment.
10. The apparatus according to claim 9, wherein the second establishing module is specifically configured to:
acquiring environment variables of the development environment;
initializing environment variables of the development environment into the container.
11. The apparatus of claim 8, wherein multiple development environments within the system disk are isolated by an environment management system Conda.
12. The apparatus of claim 8, wherein the system tray is in a read-only state with respect to the container.
13. The apparatus of claim 8, 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.
14. The apparatus of claim 8, wherein the system disk includes a plurality of different versions of development environments 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 call relation between the container and the development environment of the corresponding version in the system disk is established.
15. An electronic device, comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein the content of the first and second substances,
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 of claims 1-7.
16. A non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the method of creating a development environment according to any one of claims 1-7.
17. A computer program product comprising a computer program which, when executed by a processor, implements the method of creating a development environment according to any one of claims 1-7.
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 true CN113157281A (en) 2021-07-23
CN113157281B 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 (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140053150A1 (en) * 2012-08-14 2014-02-20 Atlassian Pty Ltd. Efficient hosting of virtualized containers using read-only operating systems
US20150142878A1 (en) * 2013-11-17 2015-05-21 Nimbix, Inc. Dynamic creation and execution of containerized applications in cloud computing
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

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140053150A1 (en) * 2012-08-14 2014-02-20 Atlassian Pty Ltd. Efficient hosting of virtualized containers using read-only operating systems
US20150142878A1 (en) * 2013-11-17 2015-05-21 Nimbix, Inc. Dynamic creation and execution of containerized applications in cloud computing
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
CN113157281B (en) 2024-02-13

Similar Documents

Publication Publication Date Title
US10063427B1 (en) Visualizing and interacting with resources of an infrastructure provisioned in a network
KR20220017348A (en) Method, device, electronic equipment and readable storage medium for sharing gpu
US11694090B2 (en) Debugging deep neural networks
US10282208B2 (en) Cognitive thread management in a multi-threading application server environment
CN112328301B (en) Method and device for maintaining consistency of operating environments, storage medium and electronic equipment
CN113312072A (en) Configuration file updating method and device, electronic equipment and medium
EP4060496A2 (en) Method, apparatus, device and storage medium for running inference service platform
US10915529B2 (en) Selecting an optimal combination of systems for query processing
CN111966361A (en) Method, device and equipment for determining model to be deployed and storage medium thereof
CN113010342A (en) Operation and maintenance diagnosis method, device, equipment and storage medium
CN114417780B (en) State synchronization method and device, electronic equipment and storage medium
CN115291946A (en) Hongmong system transplanting method, device, electronic equipment and readable medium
US20200410106A1 (en) Optimizing Operating System Vulnerability Analysis
CN112633502B (en) Cross-platform execution method and device of deep learning model and electronic equipment
CN110851211A (en) Method, apparatus, electronic device, and medium for displaying application information
US20200326931A1 (en) Federated Framework for Container Management
CN113157281B (en) Development environment creation method, apparatus, electronic device and storage medium
CN113612643B (en) Network configuration method, device and equipment of cloud mobile phone and storage medium
CN116848580A (en) Structural self-aware model for utterance parsing for multiparty conversations
CN111626401B (en) Operation method and device
CN113656268B (en) Performance test method and device for business service, electronic equipment and storage medium
US20190385091A1 (en) Reinforcement learning exploration by exploiting past experiences for critical events
CN112068814A (en) Method, device, system and medium for generating executable file
CN118092578A (en) Clock setting method and device, electronic equipment and storage medium
CN114035885B (en) Applet page rendering method and device and electronic equipment

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