Container scheduling method and system for super-intelligent algorithm fusion
By introducing a container runtime interface into the high-performance computing job model, using configuration metadata to indicate job types, and creating Pods and container execution instances, the problem of low resource utilization in the fusion scheduling of high-performance computing and artificial intelligence computing is solved. This enables unified management and resource scheduling of different types of jobs, thereby improving resource utilization.
Patent Information
- Application Number
- CN202611676877.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-10-28
- Publication Date
- 2026-11-24
AI Technical Summary
Existing integrated scheduling schemes for high-performance computing and artificial intelligence computing suffer from low resource utilization and cannot effectively manage HPC process jobs and container jobs in a unified manner, resulting in uneven resource allocation and low utilization.
By introducing a container runtime interface into the high-performance computing job model, using configuration metadata to indicate job types, creating Pods and container execution instances, unified management and scheduling of container jobs are achieved. The container runtime interface manages the lifecycle of Pods and the execution instances of container lifecycles, ensuring that a container job corresponds to a Pod and a job step corresponds to a container in a Pod.
It achieves unified management and resource scheduling of HPC process jobs and container jobs under the same scheduling kernel, improving resource utilization and solving the problem of low resource utilization.
Smart Images

Figure CN123157399A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of data processing technology, and more specifically, to a container scheduling method and system for supercomputing fusion. Background Technology
[0002] Since high-performance computing and artificial intelligence computing are dominated by two different scheduling systems, the fusion scheduling schemes adopted by related technologies embed containers as one-time carriers within the HPC scheduler, which cannot achieve effective integration of the two, resulting in low resource utilization.
[0003] There is currently no effective solution to the above problems. Summary of the Invention
[0004] This application provides a container scheduling method and system for supercomputing fusion, which at least solves the technical problem of low resource utilization in the fusion scheduling schemes adopted by related technologies.
[0005] According to one aspect of the embodiments of this application, a container scheduling method for supercomputing convergence is provided, comprising: receiving a target job issued by a job scheduler, wherein the target job includes configuration metadata for indicating the job type, and the job scheduler includes a scheduling kernel built based on a high-performance computing (HPC) job model; when the configuration metadata indicates that the target job is a container job, determining an execution instance corresponding to the container job, wherein the execution instance includes a Pod execution instance that manages the Pod lifecycle based on a container runtime interface and a container execution instance that manages the container lifecycle, one container job corresponds to one Pod, and a job step in one container job corresponds to a container in the Pod; and executing the container job based on the execution instance.
[0006] According to another aspect of the embodiments of this application, a container scheduling method for supercomputing fusion is also provided, comprising: receiving a target job submitted by a target object; when the target job is a container job, generating a first job request corresponding to the container job based on a mapping model, wherein the mapping model is used to map the container job to a Pod and to map job steps in the container job to containers, and the first job request carries configuration metadata corresponding to the Pod and / or container; when the target job is a process job, generating a second job request corresponding to the process job, wherein the second job request does not carry configuration metadata; sending the first job request and / or the second job request to a job scheduler, wherein the job scheduler is used to distribute the target job to a target node for execution, the target node creates a Pod and / or creates a container within the Pod based on a container runtime interface, and the job scheduler includes a scheduling kernel built based on a high-performance computing (HPC) job model.
[0007] According to another aspect of the embodiments of this application, another container scheduling method for supercomputing fusion is also provided, including: receiving a job request corresponding to a target job, wherein the target job includes a container job, and the job request corresponding to the container job carries configuration metadata for creating a Pod and / or a container for executing the container job; determining a target node based on the job request; and distributing the target job to the target node, wherein the configuration metadata is used to instruct the target node to create a Pod and / or create a container within the Pod based on the container runtime interface.
[0008] According to another aspect of the embodiments of this application, a container scheduling system for supercomputing convergence is also provided, including a terminal device, a job scheduler, and a target node. The terminal device, connected to the job scheduler, is used to receive a target job submitted by a target object and generate a job request corresponding to the target job. The target job includes a container job, and the job request corresponding to the container job carries configuration metadata for creating a Pod and / or a container for executing the container job. The job scheduler, connected to both the terminal device and the target node, is used to determine the target node based on the job request and distribute the target job to the target node. The configuration metadata is used to instruct the target node to create a Pod and / or create a container within a Pod based on a container runtime interface. The target node, connected to the job scheduler, is used to determine the execution instance corresponding to the target job and execute the target job based on the execution instance. The execution instance of the container job includes a Pod execution instance that manages the Pod lifecycle based on the container runtime interface, and one container job corresponds to one Pod.
[0009] According to another aspect of the embodiments of this application, a container scheduling device for supercomputing convergence is also provided, comprising: a first receiving module, configured to receive a target job issued by a job scheduler, wherein the target job includes configuration metadata indicating the job type, and the job scheduler includes a scheduling kernel built based on a high-performance computing (HPC) job model; a first determining module, configured to determine an execution instance corresponding to the container job when the configuration metadata indicates that the target job is a container job, wherein the execution instance includes a Pod execution instance that manages the Pod lifecycle based on a container runtime interface and a container execution instance that manages the container lifecycle, one container job corresponds to one Pod, and the job steps in one container job correspond to one container in the Pod; and an execution module, configured to execute the container job based on the execution instance.
[0010] According to another aspect of the embodiments of this application, another container scheduling device for supercomputing fusion is also provided, comprising: a second receiving module, configured to receive a target job submitted by a target object; a mapping module, configured to generate a first job request corresponding to the container job based on a mapping model when the target job is a container job, wherein the mapping model is used to map the container job to a Pod and to map the job steps in the container job to containers, and the first job request carries configuration metadata corresponding to the Pod and / or container; a generation module, configured to generate a second job request corresponding to the process job when the target job is a process job, wherein the second job request does not carry configuration metadata; and a sending module, configured to send the first job request and / or the second job request to a job scheduler, wherein the job scheduler is used to distribute the target job to a target node for execution, the target node creates a Pod and / or creates a container within the Pod based on the container runtime interface, and the job scheduler includes a scheduling kernel built based on a high-performance computing (HPC) job model.
[0011] According to another aspect of the embodiments of this application, a container scheduling device for supercomputing convergence is also provided, comprising: a third receiving module, configured to receive a job request corresponding to a target job, wherein the target job includes a container job, and the job request corresponding to the container job carries configuration metadata for creating a Pod and / or a container for executing the container job; a second determining module, configured to determine a target node based on the job request; and a distributing module, configured to distribute the target job to the target node, wherein the configuration metadata is used to instruct the target node to create a Pod and / or create a container within the Pod based on the container runtime interface.
[0012] According to another aspect of the embodiments of this application, an electronic device is also provided, including: a memory and a processor, wherein the memory is used to store program instructions; the processor is connected to the memory and is used to execute the container scheduling method for supercomputing fusion described above.
[0013] According to another aspect of the embodiments of this application, a non-volatile storage medium is also provided, the non-volatile storage medium including a stored computer program, wherein the device where the non-volatile storage medium is located executes the above-described container scheduling method for supercomputing fusion by running the computer program.
[0014] According to another aspect of the embodiments of this application, a computer program product is also provided, including computer instructions that, when executed by a processor, implement the above-described container scheduling method for supercomputing fusion.
[0015] In this embodiment, a target job containing job type configuration metadata is issued by a scheduling kernel built based on the HPC job model. When the configuration metadata indicates that it is a container job, an execution instance containing the Pod lifecycle and container lifecycle managed by the container runtime interface is determined. The container job corresponds to a Pod, and the job steps correspond to a container in the Pod. The container job is executed based on the execution instance. This achieves the goal of using the same scheduling kernel to uniformly process HPC process jobs and container jobs. This realizes the technical effect of unified management and resource scheduling of different types of jobs by the job scheduling kernel, and solves the technical problem of low resource utilization of the fusion scheduling scheme adopted by related technologies. Attached Figure Description
[0016] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0017] Figure 1 This is a hardware structure block diagram of a computer terminal for a container scheduling method for supercomputing fusion according to an embodiment of this application;
[0018] Figure 2 This is a flowchart of a container scheduling method for supercomputing fusion according to an embodiment of this application;
[0019] Figure 3 This is a flowchart of another container scheduling method for supercomputing fusion according to an embodiment of this application;
[0020] Figure 4 This is a flowchart of another container scheduling method for supercomputing fusion according to an embodiment of this application;
[0021] Figure 5 This is an overall architecture diagram of a container scheduling system for supercomputing fusion according to an embodiment of this application;
[0022] Figure 6 This is a mapping diagram of a container scheduling method for supercomputing fusion according to an embodiment of this application;
[0023] Figure 7 This is a timing diagram of the entire lifecycle of a Pod and a container according to an embodiment of this application for a container scheduling method oriented towards supercomputing fusion;
[0024] Figure 8 This is a schematic diagram of the Fake Root data flow of a container scheduling method for supercomputing fusion according to an embodiment of this application;
[0025] Figure 9This is a schematic diagram of the overall process of a container scheduling method for supercomputing fusion according to an embodiment of this application. Detailed Implementation
[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.
[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.
[0028] To better understand the embodiments of this application, the technical terms involved in the embodiments of this application are explained below:
[0029] Container Runtime Interface (CRI): A standard gRPC protocol defined by Kubernetes to decouple container orchestration systems (such as kubelet) from specific container runtime implementations. It specifies all interaction methods between the two abstract layers of Pod sandbox and container. In this embodiment, CRI serves as the communication standard between the HPC job scheduling system and the container runtime, enabling the scheduling node daemon to make standardized calls to any OCI-compatible container runtime (such as containerd). This eliminates the hard-coded dependency on specific container runtime implementations and ensures the system's universality and scalability across various container runtimes.
[0030] Pod (Pod Sandbox): The highest-level container abstraction unit defined in the container runtime interface. It contains a group of tightly coupled containers that share a network and storage namespace. In the embodiments of this application, the Pod acts as an independent resource holder and isolation boundary for the container job. It is created and maintained by the Daemon Step throughout the job lifecycle and is used to carry the runtime environment shared by all container steps within the scope of the job, thereby realizing network communication and resource isolation between multiple container steps.
[0031] Container: A single application execution unit defined in the container runtime interface, located inside the Pod sandbox. In this embodiment, Container corresponds to a specific execution step in the container job. Its creation, startup, and destruction are managed by ContainerInstance. It is used to execute specific user tasks (such as training scripts or inference services) in the shared environment provided by the Pod, realizing a fine-grained mapping between job steps and the underlying container lifecycle.
[0032] Job: The basic scheduling unit in the HPC job scheduling system represents a complete computing task submitted by a user. In this embodiment, there is a mapping relationship between Job and Pod in the container model. One container job corresponds to one Job and one Pod. This is used to uniformly queue, allocate resources (such as CPU, memory, GPU) and apply scheduling algorithms such as fair sharing in the HPC scheduling kernel, so that container jobs can be seamlessly integrated into the HPC job management process.
[0033] Step: The execution phase or subtask within a Job in an HPC job scheduling system. In this embodiment, Step is mapped to the maintainer of a Container or Pod in a container model. Roles are distinguished by three types: DAEMON, PRIMARY, and COMMON. This is used to flexibly organize host processes and container steps in an imperative workflow, enabling the mixed execution of traditional HPC commands and containerized AI tasks within the same job.
[0034] CRI Client (CriClient): A client module deployed in the HPC node daemon process, which encapsulates the RuntimeService and ImageService interfaces in the CRI protocol. In this embodiment, CriClient is responsible for establishing a gRPC connection with the container runtime, initiating operations such as Pod sandbox creation, container lifecycle management, and image pulling, and injecting system-level tags for subsequent status monitoring and object lookup. It is the core bridge connecting the HPC scheduling logic and the underlying container execution environment.
[0035] Fake Root: A security mechanism based on Linux user namespaces that allows processes within a container to run as uid 0 (root), but are actually mapped to a non-privileged user on the host machine. In this embodiment, the Fake Root mechanism is used to solve the security isolation problem of HPC multi-user shared clusters, enabling ordinary users to freely install software within the container without gaining host machine privileges. At the same time, idmapped mount or FUSE bindfs ensures correct file ownership, achieving a balance between high security and high compatibility.
[0036] CDI (Container Device Interface): An open specification defined by CNCF, used to inject heterogeneous computing devices (such as GPUs and NPUs) into containers in a standardized manner. In the embodiments of this application, CDI is used to transform the heterogeneous computing resources allocated by the HPC scheduler (abstracted through GRES) into device configurations that can be recognized by the container runtime. The container runtime automatically completes the device file mounting and driver injection, realizing standardized access to heterogeneous hardware resources and vendor-independent device scheduling.
[0037] CNI (Container Network Interface): An open specification defined by CNCF, used to provide network configuration for containers. In this embodiment, CNI is used to convert network resources (such as RDMA, SR-IO VF) allocated by the HPC scheduler into container network configuration. The CNI plugin completes the construction of cross-node container networks, realizing high-speed interconnection between container jobs and unified cluster network management.
[0038] GRES (Generic Resource): An abstract concept used in HPC scheduling systems to describe non-standard computing resources (such as GPUs, NPUs, DCUs, RDMA network cards, etc.). In this embodiment, GRES serves as a standard interface for users to declare heterogeneous resources. The scheduler uses this interface to match resources and then converts them into CDI or CNI configurations and distributes them to containers, thus achieving seamless integration between the traditional HPC resource model and cloud-native container device interfaces.
[0039] Configuration Metadata (or simply Metadata): Structured data fields attached to job description information, used to indicate the job type, attributes, and execution parameters. In this embodiment, configuration metadata may include identification information to distinguish HPC process jobs from container jobs, as well as Pod metadata and container metadata specific to container jobs, used to guide the node daemon process to select the appropriate execution instance type and configuration method when the job is deployed.
[0040] With the simultaneous growth in computing power demands from large-scale AI models and traditional scientific computing applications, high-performance computing (HPC) and AI computing (i.e., "intelligent computing") are rapidly converging, a trend commonly referred to in the industry as "super-intelligent computing convergence." On the one hand, traditional HPC applications such as weather simulation, materials science, biomedicine, and industrial simulation hope to accelerate some sub-tasks using AI accelerator cards; on the other hand, deep learning training and large-scale model inference aim to reuse the existing high-speed interconnect networks, large-scale storage, and stable batch scheduling capabilities of HPC clusters. However, for a long time, HPC and intelligent computing have been dominated by two different types of scheduling systems: HPC commonly uses process-based batch job scheduling systems such as SLURM, LSF, and PBS; while intelligent computing is dominated by container orchestration systems centered around Kubernetes (K8s). These two systems differ fundamentally in multiple aspects, including job models, resource allocation granularity, user interfaces, image ecosystems, and network and storage abstractions. This often forces cluster operators to build two independent computing platforms, resulting in a severe disconnect between computing power, storage, accounts, and operations and maintenance, forming a "super-intelligent computing dual-stack."
[0041] The Container Runtime Interface (CRI) is a standard gRPC protocol defined by Kubernetes to decouple the kubelet from specific container runtime implementations. It specifies all interaction methods between the kubelet and the container runtime at the two abstract layers of the Pod Sandbox and the Container, including two main categories of interfaces: RuntimeService and ImageService. CRI has become the de facto standard in the cloud-native container ecosystem. Mainstream container runtimes such as containerd and CRI-O natively provide CRI implementations, leading to the development of open specifications such as the OCI standard image, Container Device Interface (CDI), and Container Network Interface (CNI). The CRI protocol itself only specifies "how the scheduler communicates with the container runtime," and is not strongly coupled with any specific scheduling system, theoretically allowing it to be reused by any upper-layer scheduling system.
[0042] In supporting containerized workloads within HPC scheduling systems, SLURM, combined with NVIDIA Pyxis (a SPANK plugin) and Enroot (a non-privileged container runtime based on squashfs), is currently the mainstream solution in the industry. The HPC community also widely uses Singularity, a container tool that uses a single-file SIF image as its carrier. These solutions, to some extent, achieve "starting a container within a batch job," but they all embed the container as a one-time "carrier" within the HPC scheduler, without introducing a higher-level abstraction like Pods, nor do they connect to cloud-native open specifications such as CRI / OCI / CDI / CNI. On the Kubernetes side, batch computing extensions like Volcano overlay batch scheduling capabilities such as Gang, Queue, and PodGroup on top of Kubernetes through CRDs, but their declarative YAML orchestration method has a significant gap with the imperative workflow habits long formed by HPC users, and their container abstraction cannot be reused without introducing Kubernetes. In summary, the industry still lacks a supercomputing converged scheduling solution that can directly interface with container runtimes via the CRI standard protocol within a single HPC job scheduling system and organize containerized workloads at the Pod level.
[0043] The technical solutions and limitations adopted to achieve supercomputing fusion are as follows:
[0044] (1) Disadvantages of the SLURM+Pyxis+Enroot solution: (a) It only supports a single job to carry a single container. There is no upper-level abstraction of Pod. It is impossible to organize multiple cooperating container steps in the same job, and it is also impossible to mix host machine commands, batch scripts and container commands in the same job; (b) It depends on the custom squashfs image format and chroot startup method of Enroot. It is not compatible with cloud-native open specifications such as OCI standard image, CRI standard interface, CDI standard device interface and CNI standard network interface. It is impossible to reuse the image repository, image signing, device management and other capabilities accumulated in the cloud-native ecosystem; (c) Since Pyxis is deeply embedded in the internal hook of the SLURM process in the form of SPANK plugin, the error model of container exception is tightly coupled with the error model of SLURM process job. Cross-node container networking and heterogeneous device scheduling require the administrator to write a lot of customized scripts. There is a lack of unified abstraction.
[0045] (2) Disadvantages of the Singularity / Apptainer solution: (a) Single container model, no Pod abstraction, unable to support multi-container collaboration; (b) Container images must be in SIF format, OCI standard images need to be converted offline, cannot be used immediately, and the image distribution, signing, vulnerability scanning and other links are out of the mainstream container ecosystem; (c) Integration with job scheduling system depends on users manually calling singularity exec in the script, the scheduling system does not know the real life cycle of the container, and it is difficult to provide scheduling-aware container status query and control capabilities; (d) Does not support inter-container networking, cross-node container network is missing, and it is difficult to meet the needs of multi-user network isolation.
[0046] (3) Disadvantages of the Kubernetes+Volcano solution: (a) The orchestration method is declarative YAML, which is far from the existing imperative job script workflow (cbatch / srun / sbatch style) of HPC users. It requires a dedicated Controller and Operator to express the common workflows in HPC, resulting in high migration costs; (b) The overall architecture of Kubernetes is geared towards high availability and autonomous orchestration of cloud-native services, and is poorly adapted to scenarios such as high throughput, tightly coupled MPI jobs, traditional batch processing, and imperative scheduling in HPC; (c) In production, the HPC scheduler and Kubernetes+Volcano usually need to be deployed in parallel to form a super intelligent dual stack, which leads to a series of problems such as computing power silos, storage silos, account silos, complex operation and maintenance, and high data transfer costs, making it impossible to achieve true super intelligent computing integration.
[0047] To address the aforementioned technical problems, this application provides corresponding solutions, which are detailed below.
[0048] The container scheduling method for supercomputing fusion provided in this application can be executed on a mobile terminal, computer terminal, or similar computing device. Figure 1 A hardware block diagram of a computer terminal for implementing a container scheduling method for supercomputing fusion is shown. Figure 1 As shown, the computer terminal 10 may include a processor 102, a memory 104 for storing data, and a transmission module 106 for communication functions. The processor 102 may include one or more processors. For ease of explanation, Figure 1The illustration uses multiple processors, including a first processor 102a, a second processor 102b, ..., an nth processor 102n. Processor 102 may include, but is not limited to, processing devices such as microcontroller units (MCUs) or field-programmable gate arrays (FPGAs). In addition, it may include: a display, a keyboard, a cursor control device, an input / output interface (I / O interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / O interface), a network interface, and a BUS bus. Those skilled in the art will understand that... Figure 1 The structure shown is for illustrative purposes only and does not limit the structure of the aforementioned electronic device. For example, computer terminal 10 may also include... Figure 1 The more or fewer components shown, or having the same Figure 1 The different configurations shown.
[0049] It should be noted that the aforementioned one or more processors and / or other data processing circuits are generally referred to herein as "data processing circuits". These data processing circuits may be embodied, in whole or in part, in software, hardware, firmware, or any other combination thereof. Furthermore, the data processing circuits may be a single, independent processing module, or may be integrated, in whole or in part, into any other element within the computer terminal 10. As involved in the embodiments of this application, the data processing circuits serve as a processor control mechanism (e.g., selection of a variable resistor termination path connected to an interface).
[0050] The memory 104 can be used to store software programs and modules of application software, such as the program instruction / data storage device corresponding to the container scheduling method for supercomputing convergence in this embodiment. The processor executes various functional applications and data processing by running the software programs and modules stored in the memory 104, thereby realizing the aforementioned container scheduling method for supercomputing convergence. The memory 104 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some instances, the memory 104 may further include memory remotely located relative to the processor, and these remote memories can be connected to the computer terminal 10 via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
[0051] The transmission module 106 is used to receive or send data via a network. Specific examples of the network described above may include a wireless network provided by the communication provider of the computer terminal 10. In one example, the transmission module 106 includes a network interface controller (NIC), which can connect to other network devices via a base station to communicate with the Internet. In another example, the transmission module 106 may be a radio frequency (RF) module, used for data interaction with external networks or devices via wired and / or wireless network connections.
[0052] The display can be, for example, a touchscreen liquid crystal display (LCD), which allows the user to interact with the user interface of the computer terminal 10. Furthermore, the computer terminal 10 can be connected to a cursor control device and a keyboard via an input / output interface. The cursor control device (e.g., a mouse, trackball, or touchpad) is primarily used to transmit directional information and command selections to the terminal and control the movement of the cursor on the display; the keyboard is primarily used to receive letters, numbers, and other control commands input by the user, thereby enabling interaction between the user and the computer terminal 10.
[0053] It should be noted here that, in some optional embodiments, the above... Figure 1 The computer terminal shown may include hardware elements (including circuitry), software elements (including computer code stored on a computer-readable medium), or a combination of both hardware and software elements. It should be noted that... Figure 1 This is only one instance of a specific particular instance, and is intended to illustrate the types of components that may exist in the aforementioned computer terminal.
[0054] In the above operating environment, this application provides an embodiment of a container scheduling method for supercomputing fusion. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than that shown here.
[0055] Figure 2 This is a flowchart of a container scheduling method for supercomputing fusion according to an embodiment of this application. The executing entity can be, for example, a specific computing node, including a Craned node and a Supervisor, such as... Figure 2 As shown, the method includes the following steps:
[0056] Step S202: Receive the target job issued by the job scheduler, wherein the target job includes configuration metadata indicating the job type, and the job scheduler includes a scheduling kernel built based on the high-performance computing (HPC) job model.
[0057] In step S202 above, the job scheduler is a resource management and task distribution component built on the high-performance computing job model. It is responsible for maintaining the core scheduling status of all nodes in the cluster, such as resource status, partitions, queues, accounts, service quality levels, and fair sharing scheduling algorithms. It can unify traditional process jobs and new containerized jobs into the scheduling scope and perform resource matching and allocation for various workloads through a unified scheduling kernel.
[0058] A target job is a complete computing task unit that is scheduled and distributed to computing nodes for execution by the job scheduler. It should be noted that a target job can be either a traditional high-performance computing job based on a process model or an intelligent computing job based on a container model.
[0059] Configuration metadata is a structured data field attached to the target job description information. It is used to indicate the specific type, attributes and execution parameters of the job. The configuration metadata includes job-level Pod metadata and step-level container metadata that are specific to container jobs. Its function is to pass the configuration information required for containerization (such as image reference, device injection, network configuration, etc.) to the node daemon process, so that the node daemon process can determine the job type and generate the corresponding execution instance based on the metadata without modifying the underlying logic of the scheduling kernel.
[0060] It should be noted that the high-performance computing job model is an abstract job model with processes as the basic scheduling unit, emphasizing batch processing, interactive execution, and cross-node parallel computing. In the embodiments of this application, the high-performance computing job model constitutes the basic architecture of the job scheduler scheduling kernel, enabling this application to be compatible with container jobs by extending configuration metadata without destroying the original HPC scheduling capabilities (such as fair sharing, backfilling, and energy-saving algorithms).
[0061] In some embodiments of this application, when generating a job request, optional Pod metadata and container metadata fields can be introduced into the protocol message describing the steps. These fields carry job type identifiers and detailed configurations required for container operation (such as images, devices, networks, etc.). When the node daemon receives a job instruction, it can identify whether the job is a container job or a traditional process job by parsing these configuration metadata, thereby determining the subsequent execution path.
[0062] Specifically, two optional fields can be introduced into the protocol message (StepToD) describing the step: job-level Pod metadata `pod_meta` (type `PodJobAdditionalMeta`) and step-level container metadata `container_meta` (type `ContainerJobAdditionalMeta`). Both fields are optional. Traditional HPC process jobs do not carry these two fields, and the scheduling path remains completely unchanged; container jobs carry the corresponding fields according to their step roles. As an example, the main fields of Pod metadata and container metadata are shown in Table 1.
[0063] Table 1: Main fields of Pod metadata and container metadata.
[0064]
[0065] It should be noted that the job scheduler (CraneCtld) is unaware of the above two types of fields during the scheduling phase. They are only interpreted and executed by Craned and Supervisor after the job is placed on the node, in order to ensure that container jobs and traditional process jobs are completely equivalent on the scheduling side.
[0066] Step S204: If the configuration metadata indicates that the target job is a container job, determine the execution instance corresponding to the container job. The execution instance includes a Pod execution instance that manages the Pod lifecycle based on the container runtime interface and a container execution instance that manages the container lifecycle. One container job corresponds to one Pod, and the job steps in one container job correspond to one container in the Pod.
[0067] In step S204 above, the container job is an intelligent computing workload managed by the container runtime interface. As a resource holder, the container job's sandbox is created once at job startup and maintained throughout the job's lifecycle, serving to host all container steps within that job. This achieves network connectivity and resource isolation between multiple container steps, unlike the single-process model of traditional process jobs. A job step is a specific execution stage or subtask within a container job, corresponding to a container execution unit in the container runtime interface. A job step within a container job corresponds to a container in the sandbox. By distinguishing between daemon, primary step, and common step types (i.e., DAEMON, PRIMARY, COMMON), flexible orchestration of host machine commands and container commands can be freely mixed within the same job.
[0068] An execution instance is an object on a compute node responsible for executing specific tasks. It encapsulates the task lifecycle management logic, including execution objects that manage the lifecycle of the highest-level abstract unit in the container runtime interface and execution objects that manage the lifecycle of a single application execution unit. Its role is to translate logical job steps into actual runtime operations. Specifically, a Pod execution instance refers to the specific software module that manages the lifecycle of the highest-level abstract unit in the container runtime interface. It is responsible for calling the container runtime interface to create, monitor, and clean up the sandbox, ensuring its continued existence throughout the job lifecycle and providing a stable operating environment for the internal containers. Its creation can be triggered by the step type responsible for maintaining the sandbox. A container execution instance refers to the specific software module that manages the container lifecycle (i.e., a single application execution unit) based on the container runtime interface. It is responsible for calling the container runtime interface to create, start, stop, and clean up the container. It is responsible for mapping specific job steps to processes within the container, enabling interaction between job logic and the container runtime. Its creation can be triggered by the step type responsible for executing specific tasks.
[0069] It should be noted that the container runtime interface, as the communication standard between the node daemon and the container runtime, specifies all the interaction methods between the two abstract layers of sandbox and container. It is used to enable the scheduling node daemon to make standardized calls to any compatible container runtime, thereby eliminating the hard-coded dependency on specific container runtime implementations and ensuring the system's universality and scalability for various container runtimes.
[0070] In some embodiments of this application, when parsing received job instructions, the Node Daemon (Craned) checks the job type identifier in the configuration metadata. If it is identified as a container job, it instantiates a unified execution entity interface subclass, that is, it creates an execution object for managing the sandbox lifecycle and an execution object for managing the container lifecycle. It then establishes a connection with the container runtime through the container runtime interface client, preparing to execute the containerized task. For example, internally, the Node Daemon defines a unified execution entity interface, implementing specific subclasses for managing the sandbox lifecycle and container lifecycles respectively. The former is responsible for calling the interface to create and maintain the sandbox, while the latter is responsible for calling the interface to create and start the container. The two work together to ensure the correct execution of the container job on the node.
[0071] To ensure the correct execution and resource isolation of container jobs on nodes, the execution instance corresponding to the container job can be determined in the following ways: obtain the job step corresponding to the container job, where the job step is a logical unit in the execution flow of the container job; determine the job daemon process corresponding to the job step, where each job daemon process is used to execute one job step; and create an execution instance based on the job daemon process.
[0072] It should be noted that the job supervisor is an independent child process deployed on the compute node to execute a single job step. It is a worker thread derived from the node supervisor (Craned). Each job supervisor holds a specific job step instance and is responsible for coordinating the resource preparation, container creation and status monitoring required for that step, thereby achieving isolation and management of the job step execution environment.
[0073] Specifically, after receiving a job instruction, the node daemon parses the step list in the job protocol message, identifies each logical unit as an independent job step, and categorizes them according to their role (daemon, master, general) to prepare for the subsequent creation of corresponding execution instances. Furthermore, the node daemon spawns an independent child process (i.e., the job daemon) for each job step, ensuring that each step has an independent execution context and resource control capabilities. Upon startup, the job daemon creates the corresponding execution instance object based on the step type (e.g., an execution instance for managing a sandbox or an execution instance for managing a container), initializes the container runtime interface client, and establishes a communication connection with the container runtime.
[0074] In some embodiments of this application, the job steps include a daemon job step for creating the runtime environment required for the container job and a basic job step for identifying the execution entry point of the container job. Based on this, an execution instance can be created in the following manner: a first execution instance is created based on a first job daemon process corresponding to the daemon job step, wherein the first execution instance includes a Pod execution instance; after the first execution instance is created, a second execution instance is created based on a second job daemon process corresponding to the basic job step, wherein the second execution instance includes a container execution instance that manages the container lifecycle based on the container runtime interface.
[0075] Furthermore, the job steps also include general job steps that are dynamically added to the basic job steps. Based on this, a third execution instance can also be created based on the third job daemon corresponding to the general job steps.
[0076] Specifically, this application introduces a container job mapping model: a conceptual mapping between Job and Pod, and a conceptual mapping between Step and Container. This model distinguishes three types of step roles through the StepType enumeration: DAEMON, PRIMARY, and COMMON. Among them, the Daemon Step (i.e., the daemon job step) is solely responsible for the creation and maintenance of the Pod and is resident throughout the entire lifecycle of the container job; the Primary Step (i.e., the basic job step) is the entry step explicitly specified by the user when submitting the job, which can be a batch script (when submitting using cbatch--pod) or a container step (when submitting using ccon run); the Common Step (i.e., the general / regular job step) is a step dynamically added by the user within the Primary Step during job execution (such as a container step added by the ccon run command in a batch script).
[0077] It should be noted that a Pod is used to host container steps within the scope of a container job and is maintained throughout the lifecycle of the container job. Each container step corresponds to a container within the Pod.
[0078] In other words, as a resource holder, the container job's Pod is created once through RunPodSandbox when the Daemon Step starts and is maintained throughout the job's lifecycle to host all container steps within the job's scope; and each container step adds and starts a container within the Pod through CreateContainer+StartContainer.
[0079] In some embodiments of this application, the job steps include container steps executed in a container runtime environment and non-container steps executed directly in the host operating system environment. Furthermore, the following can also be performed: when the basic job step is a non-container step, in response to an append command in the container job, at least one container step is appended after the basic job step as a general job step.
[0080] Specifically, a single container job allows for the simultaneous existence of both containerized and non-containerized steps. For example, when a user submits a batch job via `cbatch --pod`, the Primary Step is a shell script running on the host machine (a non-containerized step). This script can be appended with any number of containerized steps as Common Steps using the `ccon run` command. This ability to freely mix host machine commands and container commands within the same job is a key difference between this application and SLURM+Pyxis (where container and host machine commands cannot be freely combined within the same job) and K8s+Volcano (where the entire workflow must be expressed using declarative YAML).
[0081] In some embodiments of this application, the following steps may also be performed: when the configuration metadata indicates that the target job is a process job, determine the process execution instance corresponding to the process job, wherein the process job and the container job use the same scheduling path, and the process job does not carry configuration metadata; execute the process job based on the process execution instance.
[0082] It should be noted that process jobs are computing tasks built upon the traditional high-performance computing (HPC) job model, with processes as the basic scheduling unit. A process execution instance is a software module on a computing node responsible for executing the logic of a traditional HPC process job. It encapsulates the lifecycle management logic of traditional HPC jobs (such as forking processes, setting cgroups, and monitoring SIGCHLD signals), allowing direct startup and management of host processes on the node side, thus achieving seamless execution of traditional jobs within a unified scheduling framework.
[0083] Specifically, when the node daemon receives a job instruction, it checks the configuration metadata fields. If it finds that the target job does not carry Pod metadata or container metadata, or if the metadata explicitly indicates that it is a traditional process type, it identifies the job as a process job and instantiates a process execution instance specifically used to manage the lifecycle of the host process. The node daemon starts the job process by calling traditional Linux process management interfaces (such as fork, exec, and cgroup operations) through the process execution instance (i.e., the ProcInstance subclass), monitors its status, and performs cleanup when the job ends, thus achieving standardized execution of traditional HPC jobs under a unified node daemon architecture.
[0084] During the scheduling phase, the kernel of the job scheduler only parses resource requests (such as CPU, memory, and GPU) and ignores the specific content of configuration metadata. Whether it is a container job carrying metadata or a process job without metadata, they all enter the same scheduling queue and are scheduled by the same set of fair sharing and backfilling algorithms, thus achieving a unified scheduling logic.
[0085] In some embodiments of this application, to support the above mapping model, the implementation of this application can abstract the execution entities involved in container jobs into a unified interface ITaskInstance, specifying four lifecycle methods: Prepare→Spawn→Kill→Cleanup, which are implemented by three concrete subclasses: PodInstance (i.e., Pod execution instance), ContainerInstance (i.e., container execution instance), and ProcInstance (i.e., process execution instance). This abstraction allows the scheduling system to manage the execution entity of a step without needing to know whether its specific form is a host process or a container, or a Pod or a single container, thus ensuring that container steps are completely equivalent to traditional process steps in the scheduling path.
[0086] In some embodiments of this application, the job daemon process includes a client module, which is used to create Pods and containers within Pods. The client module connects to the runtime service of the container runtime through a first channel and to the image service of the container runtime through a second channel.
[0087] It should be noted that the client module (CriClient) refers to the software component deployed inside the job daemon process for communicating with the container runtime. It encapsulates the standard protocol of the container runtime interface, is responsible for constructing request messages, establishing network connections and processing responses, enabling the job daemon process to call the functions of the container runtime in a standardized way without having to care about the internal implementation details of the specific container runtime, thus achieving decoupling between the scheduling system and the container runtime.
[0088] The runtime service, defined in the container runtime interface, manages the container lifecycle (such as creating, starting, stopping, and deleting Pods and containers). It handles lifecycle control requests from the job daemon regarding Pod sandboxes and container instances, enabling the creation, startup, status query, and cleanup of container instances. The image service, also defined in the container runtime interface, manages container images (such as pulling, deleting, and checking image status). It handles image pull and management requests from the job daemon, ensuring the availability of image files required for container execution and automating the acquisition and management of image resources.
[0089] Specifically, the job daemon instantiates an independent client module object. This object encapsulates the logic for creating Pod sandboxes and containers. By calling the corresponding methods defined in the container runtime interface, it controls the lifecycle of Pods and containers, enabling the job daemon to execute containerized tasks independently of the specific container runtime implementation. Upon startup, the client module establishes a gRPC connection with the container runtime service via a Unix domain socket. This connection is specifically used to transmit lifecycle control commands for Pods and containers, such as creating sandboxes, starting containers, and stopping containers. Furthermore, it establishes a gRPC connection with the container runtime's image service via a Unix domain socket. This connection is specifically used to transmit image management commands, such as pulling specified image versions and checking image existence, ensuring that the job daemon can manage the image resources required by containers independently of the runtime service.
[0090] As an example, this application implements a CRI client module (CriClient) in the job daemon (Supervisor), which encapsulates the required interfaces of the Kubernetes standard CRI v1 protocol, including the runtime service (RuntimeService) and the image service (ImageService). During initialization, CriClient establishes two Unix domain gRPC channels, which are respectively connected to the RuntimeService and ImageService sockets of the container runtime (typically the same socket exposed by containerd).
[0091] Furthermore, each time a Pod sandbox or container is created, CriClient automatically injects a set of system-level tags into its PodSandboxConfig or ContainerConfig, including: a default identifier tag (used to distinguish objects created by this scheduling system from other objects on the same node at runtime), business tags such as job_id, step_id, uid, job_name, and step_name, as well as a set of annotations with a unified prefix, including hostname, fqdn, and user-defined key-value pairs.
[0092] These tags enable the daemon to quickly locate Pods and containers belonging to a specific job, step, or user through the tag selector interface provided by CRI, without the need to maintain an additional object mapping table. They also allow external systems to re-establish references to Pods through the tag lookup mechanism, thereby significantly improving system robustness and scalability.
[0093] Furthermore, CriClient also provides a container event stream interface, which suspends a long-lived gRPC stream on demand when the container step starts on a node, subscribing to container events during container runtime. The event callback uses the aforementioned system-level tags as filtering conditions to propagate only events created by objects within this scheduling system, avoiding interference in multi-tenant coexistence (such as when a node is running both Kubernetes and this scheduling system simultaneously). This event stream runs parallel to the traditional process SIGCHLD path, serving as the source of the container step's exit state and being incorporated into the job's final state determination logic.
[0094] The above embodiments integrate a standardized client module into the job daemon process and separate the communication channels between the runtime service and the image service, thereby enabling the HPC job scheduling system to access container runtime in a standardized and decoupled manner. This allows the job daemon process to independently and efficiently manage the lifecycle of Pods and containers, as well as image resources.
[0095] Step S206: Execute a container job based on the execution instance.
[0096] In step S206 above, the execution instance refers to the object on the compute node responsible for executing specific tasks. It encapsulates the lifecycle management logic of the task, including the execution object used to manage the lifecycle of the highest level abstract unit (Pod) and the execution object used to manage the lifecycle of a single application execution unit (container). Its role is to transform logical job steps into actual runtime operations, and realize the binding and management of job steps with underlying container resources.
[0097] For example, the node daemon can call the container runtime interface through execution instances (including the execution instance that manages the highest-level abstraction unit and the execution instance that manages the container). First, the execution instance that manages the highest-level abstraction unit is responsible for creating and maintaining the highest-level abstraction unit, including configuring resource limits, network namespaces, and mounting storage volumes. Second, the execution instance that manages the container is responsible for pulling the image, configuring container parameters (such as commands, environment variables, and heterogeneous device injection), starting the container, and monitoring the container status through the container event stream until the job is completed.
[0098] In some embodiments of this application, a container job can be executed through the following steps: obtaining Pod metadata from configuration metadata and constructing Pod configuration information based on the Pod metadata; using a Pod execution instance to call the container runtime interface to create a target Pod based on the Pod configuration information; and executing a container job in the target Pod.
[0099] It's important to note that Pod metadata is a high-level data structure within configuration metadata used to describe the attributes of the highest-level abstract unit (i.e., Pod). It includes fields such as Pod name, tags, annotations, network mode, PID namespace mode, user namespace configuration, port mapping, and DNS server. Pod configuration information is a set of sandbox creation parameters derived from Pod metadata and conforming to the container runtime interface specification. This includes system-level tags (such as job ID and step ID), business tags, resource limits (Cgroup path), namespace options, port mapping, and runtime identity.
[0100] Specifically, the node daemon parses the configuration metadata in the job instructions, extracts Pod metadata fields (such as name, tag, network mode, user namespace configuration, etc.), and maps them to the Pod sandbox configuration objects required by the container runtime interface, including injecting system-level tags (such as job ID, step ID) to meet resource tracking requirements, and setting resource limits (Cgroup) and network options.
[0101] Furthermore, the Pod execution instance initializes the container runtime interface client, establishes a communication connection with the container runtime, calls the sandbox creation interface, passes in the built Pod configuration information, the container runtime creates a sandbox environment on the node, the Pod execution instance receives the returned sandbox ID and persists it so that subsequent container steps can find the sandbox by tag or file.
[0102] Furthermore, after the target Pod is successfully created, the container execution instance corresponding to the basic job steps searches for the sandbox ID of the target Pod through tags or files, pulls the container image specified by the user, constructs the container configuration (including commands, environment variables, mounted volumes, heterogeneous device injection, etc.), calls the container creation interface and the container startup interface, starts the container inside the target Pod, and executes the specific computing tasks submitted by the user (such as training or inference scripts), thereby realizing the complete execution of the container job in the target Pod.
[0103] The above embodiments extract Pod configuration from configuration metadata and call the container runtime interface to create the target Pod, thereby realizing the standardized construction of the basic environment for containerized workloads in the HPC job scheduling system, enabling container jobs to reuse the Pod isolation mechanism and resource management capabilities of the cloud-native ecosystem.
[0104] In some embodiments of this application, a container job can be executed in a target Pod in the following ways: obtain the Pod identifier corresponding to the target Pod using the container execution instance in the execution instance, and call the container runtime interface to pull the image required for the container job; obtain container metadata from the configuration metadata, and build container configuration information based on the container metadata and the image; use the container execution instance to call the container runtime interface to create a target container in the target Pod based on the container configuration information; and execute the container job in the target container.
[0105] It's important to note that container metadata is a structured data field within configuration metadata used to describe the attributes of a single container instance. This includes image references, pull strategies, entry commands, parameters, environment variables, volume mount mappings, terminal controls, and a list of container device interface devices. Container configuration information is a set of container creation parameters derived from container metadata and conforming to the container runtime interface specification. This includes container ID, tags, image references, commands and parameters, working directory, environment variables, mounted volumes, permission settings, and container device interface device injection configuration.
[0106] Specifically, the container execution instance first obtains the unique identifier (sandbox ID) of the target Pod by querying the persistent files in the job directory or by calling the tag query interface of the container runtime interface. Then, it calls the image service interface and pulls the required container image from the specified image repository to the local node according to the image reference and pull strategy in the configuration metadata, thus preparing for container creation.
[0107] Furthermore, the container execution instance parses the container metadata fields in the configuration metadata, combines them with the pulled image information, and constructs a container configuration object that conforms to the container runtime interface specification. This includes, but is not limited to, setting the execution commands, environment variables, mounting volume mappings (and performing path existence and permission verification), configuring the container device interface to inject heterogeneous computing devices, and configuring user namespace mappings to implement the Fake Root mechanism.
[0108] Furthermore, the container execution instance calls the container runtime interface to create a container, passing in the constructed container configuration information, and creates a container instance in the sandbox context of the target Pod; then it calls the start container interface to start the process inside the container, at which point the container begins to execute the user-specified computing task.
[0109] Furthermore, after the container starts within the target Pod, it begins executing the user-submitted job logic (such as training scripts or inference services). The container execution instance subscribes to container events during container runtime through a long-lived connection that suspends the container event stream, monitors the container's running status (such as startup, running, and exiting), and feeds back the status information to the job daemon and scheduler. At the same time, it supports users attaching to the container or viewing logs through interactive commands, realizing the visualization and controllability of the job execution process.
[0110] In some embodiments of this application, unified modeling of heterogeneous computing and network resources to CDI / CNI interfaces can also be achieved. Specifically, on the scheduler side, the HPC Generic Resource (GRES) abstraction is used to describe heterogeneous hardware resources such as GPUs, NPUs, DCUs, RDMA network cards, and SR-IOV VFs. On the node landing side, embodiments of this application distribute GRES scheduling results according to two types of standard interfaces: For computing devices (GPUs / NPUs / DCUs, etc.), the fully qualified CDI device name is injected into the cdi_devices field of the container configuration according to the CDI specification, and the CRI-compatible container runtime completes the device file mounting, driver socket injection, runtime prestart hooking, and other actions according to the CDI specification; For network resources (multi-plane networks, RDMA, SR-IOV VFs, etc.), the annotations are injected into the annotations field of the Pod configuration according to the CNI specification, and the CRI-compatible container runtime and CNI plugin work together to complete the network configuration.
[0111] With this unified modeling, when submitting container jobs, users only need to declare the required resource types and quantities using GRES abstraction (e.g., --gres=gpu:2, --gres=npu:4). The scheduling system automatically completes the derivation and distribution from GRES to the CDI / CNI standard interface, without requiring users to care about the specific vendor's runtime and device file details.
[0112] In some embodiments of this application, the following steps may also be performed: when the configuration metadata of the container job indicates that user namespace isolation is enabled, query the first identity identifier corresponding to the target object of the container job on the host machine; determine the identifier segment corresponding to the first identity identifier; determine the mapping relationship between the identifier segment and the second identity identifier in the container in the Pod, and send the mapping relationship to the container runtime, wherein the privileged user in the container corresponds to the non-privileged user in the host machine.
[0113] Specifically, HPC clusters are typical multi-user shared environments. Ordinary users want to freely install software packages and modify system configurations as root within containers, but cannot gain root privileges on the host machine. To address this, this application's embodiments construct an isolation mechanism between the user's namespace and SubId segment mapping within the container. When a user enables the `userns` option in the Pod metadata, the node daemon searches the configuration for the user's exclusive SubUid and SubGid segments (e.g., host user 1000 corresponds to the SubUid segment [101000, 102000)). It constructs a continuous mapping from the SubId segment to [0, N) within the container, which is then issued to the container runtime as the user namespace option in `PodSandboxConfig`. The uid 0 seen by the process inside the container (i.e., the so-called "root within the container") actually corresponds to a non-privileged SubUid in the host kernel. All files generated by this container process are written to the host file system under the user's name. Root access within a container is restricted from accessing files belonging to other users on the host machine, and it also lacks any privileged operational capabilities on the host machine. This ensures that the root user experience within the container is preserved while completely preventing privilege escaping. When mounting volumes from host directories to containers, the node daemon performs user permission checks on each host path before mounting to ensure that the user actually has access to the corresponding path on the host machine, preventing unauthorized access through the container.
[0114] Furthermore, the "container root + host ordinary user" model based on user namespaces must be accompanied by a correct file ownership translation mechanism; otherwise, files written by the root user inside the container will be written to disk with SubUid, making them inaccessible on the host machine. The idmapped mount introduced in Linux kernels 5.12 and later is the standard solution to this problem, but many HPC clusters still use older kernel versions and extensively employ distributed file systems such as NFS and Lustre, which may not support idmapped mount. Therefore, this application implements an additional idmapped mount fallback solution based on FUSEbindfs: when the node daemon detects that the kernel or file system does not support idmapped mount, or when the administrator explicitly configures the use of bindfs, a FUSE bindfs view with uid_offset / gid_offset translation capabilities is started in user space for each host mount path, and the actual host path mounted by the container is replaced with this FUSE view; files written by processes inside the container with SubId are translated by bindfs and written to the shared file system as the original user.
[0115] This mechanism is independent of specific Linux kernel versions and file system types, and can be implemented directly in existing HPC clusters. The SubId segment itself supports both automatic allocation by the scheduling system according to administrator configuration (Managed mode, which calls shadow-utils to write / etc / subuid and / etc / subgid when necessary) and direct reading of system / etc / subuid and / etc / subgid (Unmanaged mode). Both modes are fully compatible with the SubId management system of mainstream Linux distributions.
[0116] In some embodiments of this application, a dual-style interface of Slurm-style batch commands and Docker-style container commands is also provided. Specifically, to simultaneously satisfy the usage habits of HPC users and container users, embodiments of this application provide a dual-style command system of "Slurm style + Docker style" at the user interface layer.
[0117] On the one hand, it adopts the command-style batch processing workflow that HPC users have long developed, and provides Slurm-style commands such as cbatch (batch job submission) and crun (interactive step submission). The parameter naming and job control semantics are highly aligned with sbatch and srun in Slurm. Among them, cbatch upgrades traditional batch jobs to container jobs through the --pod option. The job script can switch freely between the host context and container commands. HPC users can use container capabilities with almost no need to learn new concepts.
[0118] On the other hand, for container users familiar with the Docker / Kubernetes system, this application provides a set of Docker-style ccon subcommands (ccon run / ccon exec / ccon attach / ccon log / ccon ps / cconpods / ccon inspect / ccon stop / ccon wait, etc.), whose semantics and parameter style are basically consistent with the docker / kubectl system: ccon run directly submits container jobs with container commands as the entry point, ccon ps / ccon pods lists running containers and pods, ccon exec / ccon attach performs interactive operations on running containers, ccon log views container logs, and ccon stop / ccon wait controls the container lifecycle. Both styles of commands ultimately achieve the same underlying semantics (same job model, same scheduling path, same pod and container abstraction) on the scheduler and nodes. Users can choose either one according to their own habits and can mix and match them within the same job—for example, calling ccon run to append container steps in a batch script submitted by cbatch.
[0119] As an example, the main commands are shown in Table 2.
[0120] Table 2: User command table for container jobs.
[0121]
[0122] The `ccon run` command decouples crane scheduling options (`-N` for number of nodes, `-c` for number of CPUs, `--mem` for memory, `--gres` for general resources, `-p` for partitions, `--qos` for QoS, etc.) from container runtime options (`-e` for environment variables, `-v` for volume mounts, `-p` for port mapping, `--userns` for user namespaces, `--network` for network mode, `--dns` for DNS servers, etc.). The former follows the resource declaration conventions of HPC users, while the latter follows the runtime declaration conventions of Docker users. The container ID for a container job is in the format of...<job_id> .<step_id> (e.g., 123.1), which is naturally aligned with the step numbering system of HPC jobs and is uniformly presented as a container identifier in Docker-style outputs such as ccon ps / ccon inspect.
[0123] In particular, since this application embodiment introduces container jobs with only two optional protocol fields on the scheduler side, HPC process jobs and AI container jobs naturally share the same scheduling queue, the same partition, the same QoS system, the same account system, and the same fair sharing scheduling algorithm, backfilling algorithm, energy-saving scheduling algorithm, job time prediction algorithm, etc. This means that any existing HPC scheduling algorithm upgrade will automatically benefit container jobs, and vice versa, and there are no computing power islands, account islands, or scheduling algorithm islands.
[0124] Through steps S202 to S206 above, a target job containing job type configuration metadata is issued by the scheduling kernel built based on the HPC job model. When the configuration metadata indicates that it is a container job, an execution instance containing Pod lifecycle and container lifecycle management based on the container runtime interface is determined. The container job corresponds to a Pod, and the job step corresponds to a container in the Pod. The container job is executed based on the execution instance. This achieves the goal of using the same scheduling kernel to uniformly process HPC process jobs and container jobs. This realizes the technical effect of unified management and resource scheduling of different types of jobs by the job scheduling kernel, and solves the technical problem of low resource utilization of the fusion scheduling scheme adopted by related technologies.
[0125] Figure 3 This is a flowchart of a container scheduling method for supercomputing fusion according to an embodiment of this application. The executing entity can be, for example, a client / terminal device. Figure 3 As shown, the method includes:
[0126] Step S302: Receive the target job submitted by the target object.
[0127] Step S304: If the target job is a container job, generate a first job request corresponding to the container job based on the mapping model. The mapping model is used to map the container job to a Pod and the job steps in the container job to containers. The first job request carries configuration metadata corresponding to the Pod and / or container.
[0128] Step S306: If the target job is a process job, generate a second job request corresponding to the process job, wherein the second job request does not carry configuration metadata.
[0129] Step S308: Send the first job request and / or the second job request to the job scheduler, wherein the job scheduler is used to distribute the target job to the target node for execution, the target node creates a Pod and / or creates a container within the Pod based on the container runtime interface, and the job scheduler includes a scheduling kernel built based on the high-performance computing HPC job model.
[0130] In some embodiments of this application, the mapping model is a structured transformation rule connecting high-level job logic and low-level container runtime abstraction. It defines the correspondence between container jobs and the highest-level abstract unit (Pod), as well as the correspondence between job steps in a container job and a single container. The first job request is a standard protocol message generated by the client / terminal device to submit a container job to the job scheduler.
[0131] Specifically, the user interface program on the client or terminal device receives job instructions submitted by the user via the command line, parses the resource requests (such as the number of nodes, CPU, memory, GPU) and container-related parameters (such as images, commands, mounted volumes), encapsulates them into a standard format job request, and prepares to submit it to the job scheduler. When the job is identified as a container job, the client maps the entire container job to a top-level abstract unit (Pod) according to the mapping model, and maps each execution step in the job (such as daemon steps, main steps, and regular steps) to individual containers within the Pod, thus constructing the corresponding logical structure.
[0132] Furthermore, when generating the first job request, the client fills in the Pod metadata field with the Pod-related configuration information (such as name, network mode, user namespace configuration, etc.), fills in the container metadata field at the step level with the container configuration information (such as image, command, environment variables, CDI device list, etc.) corresponding to each step, and attaches these fields to the job request to ensure that the scheduler and node daemon can obtain the complete containerized configuration.
[0133] In some embodiments of this application, the target job includes a first target job submitted by the target object using a first style command, and a second target job submitted by the target object using a second style command. The first style command includes commands based on high-performance computing (HPC) batch processing workflows, and the second style command includes commands based on container runtime operations. In addition, the following steps can be performed: if the first style command contains a preset identifier, determine that the first target job is a container job; or, if the naming prefix of the second style command is a preset prefix, determine that the second target job is a container job.
[0134] It should be noted that the first target job is a job instance submitted by the target object using a command style compatible with traditional high-performance computing (HPC) batch processing workflows, corresponding to jobs submitted using "Slurm-style" commands (such as cbatch, crun) that follow HPC user habits; the second target job is a job instance submitted by the target object using a command style compatible with container runtime operations, corresponding to jobs submitted using "Docker-style" commands (such as ccon run, cconexec) that follow container user habits.
[0135] Specifically, the client / terminal device supports two sets of parallel command interfaces: one set uses the command format familiar to HPC users (such as cbatch script.sh), and the other set uses the command format familiar to container users (such as ccon run imagecmd). At the underlying level, the two are ultimately mapped to the same job model and scheduling path, but they remain independent at the user interaction layer.
[0136] Furthermore, when a user submits a command like "cbatch --pod script.sh", the client parser detects the presence of the predefined identifier "--pod" in the command, determining that the request is intended to submit a container job rather than a regular process job. This triggers the container job generation logic, preparing to build the first job request containing Pod metadata and container metadata. Alternatively, when a user enters a command with a predefined prefix of "ccon" (such as "ccon run ..."), the client parser directly identifies the request as a container job submission instruction by recognizing the prefix in the command name, without requiring additional explicit identification. This simplifies the user's workflow and ensures the clarity of command semantics.
[0137] In the above embodiments, by defining a dual-style command system and a corresponding identification mechanism (preset identifier and preset prefix), the HPC job scheduling system achieves compatibility and differentiation of different types of user habits, enabling the system to accurately identify and process job requests from HPC users and container users.
[0138] It should be noted that, Figure 3 Preferred embodiments of the shown examples can be found in [reference needed]. Figure 2 The corresponding solutions in the illustrated embodiments will not be described in detail here.
[0139] Figure 4 This is a flowchart of another container scheduling method for supercomputing fusion according to an embodiment of this application, the execution entity of which is a job scheduler, such as... Figure 4 As shown, the method includes:
[0140] Step S402: Receive the job request corresponding to the target job, wherein the target job includes a container job, and the job request corresponding to the container job carries configuration metadata for creating a Pod and / or container for executing the container job.
[0141] Step S404: Determine the target node based on the job request.
[0142] Step S406: The target job is sent to the target node, wherein the configuration metadata is used to instruct the target node to create a Pod and / or create a container within the Pod based on the container runtime interface.
[0143] In some embodiments of this application, the job scheduler kernel performs resource matching based on the resource requirements in the job request and the current resource status of the cluster (such as the idle CPU, memory, and GPU resources of each node), using scheduling algorithms such as fair sharing and backfilling, and selects the computing node that meets the resource requirements and conforms to partition, QoS, and account restrictions as the target node to complete the logical allocation of resources.
[0144] Furthermore, the job scheduler sends scheduling instructions containing basic job information and configuration metadata to the node daemon (Craned) of the target node. According to the instructions in the configuration metadata, the node daemon calls the container runtime through the container runtime interface, first creating a Pod sandbox, and then creating and starting a container within the Pod, thereby completing the deployment and execution of the job on the target node.
[0145] It should be noted that, Figure 4 Preferred embodiments of the shown examples can be found in [reference needed]. Figure 2 and Figure 3 The corresponding solutions in the illustrated embodiments will not be described in detail here.
[0146] This application also provides a scheduling system, which includes a terminal device, a job scheduler, and a target node, wherein:
[0147] The terminal device is connected to the job scheduler and is used to receive the target job submitted by the target object and generate a job request corresponding to the target job. The target job includes a container job, and the job request corresponding to the container job carries configuration metadata for creating a Pod and / or container for executing the container job.
[0148] The job scheduler connects to both the terminal device and the target node. It is used to determine the target node based on the job request and to distribute the target job to the target node. The configuration metadata is used to instruct the target node to create a Pod and / or create a container within the Pod based on the container runtime interface.
[0149] The target node is connected to the job scheduler and is used to determine the execution instance corresponding to the target job and execute the target job based on the execution instance. The execution instances of the container job include Pod execution instances that manage the Pod lifecycle based on the container runtime interface. One container job corresponds to one Pod.
[0150] In some embodiments of this application, the scheduling system may consist of four main components: a job scheduler (CraneCtld), a node daemon (Craned), a single job daemon (Supervisor), and a container runtime and client.
[0151] CraneCtld centrally maintains the scheduling status of all nodes in the cluster, including resources, partitions, queues, accounts, QoS, fair sharing, and job time prediction. Craned is deployed on each compute node and is responsible for receiving jobs distributed by CraneCtld and forking them into several Supervisor child processes. Each Supervisor holds a step of the job and creates ProcInstance for running ordinary processes, PodInstance for creating Pods, and ContainerInstance for running containers as needed. When the job is a container job, the Supervisor instantiates CriClient and connects to the RuntimeService and ImageService of the CRI-compatible container runtime (typically containerd) on the node through two Unix domain gRPC channels, thereby completing the entire lifecycle operation of Pods and containers.
[0152] It should be noted that the above system is used to execute Figure 2 , Figure 3 and Figure 4 The container scheduling method shown is for supercomputing fusion, therefore Figure 2 Figure 3 and Figure 4 The explanations and descriptions in the container scheduling method for supercomputing fusion shown also apply to the above system, and will not be repeated here.
[0153] Figure 5 This is a general architecture diagram of a container scheduling system for supercomputing fusion according to an embodiment of this application, such as... Figure 5 As shown in some embodiments of this application, the system architecture consists of a unified scheduling control plane, a unified resource pool, physical nodes, and a cross-node network. Its core is CraneCtld, which acts as a central control unit, responsible for receiving job requests from different task flows and allocating tasks to physical nodes for execution based on a global resource view and scheduling policy. The system decouples supercomputing task flows (process-based HPC tasks) and intelligent computing task flows (container-based AI tasks) and integrates them through a unified interface and resource management mechanism, ultimately achieving unified resource pooling and hybrid deployment.
[0154] Specifically, the architecture mainly consists of the following modules, which work together to achieve the integration of supercomputing and intelligent computing:
[0155] (1) Task Flow Layer: This is the entry point for users or applications to submit tasks, and it is divided into two main categories:
[0156] Supercomputing task flows, such as cbatch batch scripts, are used to submit traditional batch jobs; crun / calloc interactive tasks are used to submit jobs that require interactive operations (such as jobs started by crun). These tasks are essentially process-level jobs that run directly on physical nodes.
[0157] Intelligent computing task flows, such as ccon container jobs, are AI jobs based on containers and are submitted via the ccon command; cbatch--pod jobs submit containerized tasks (Pods) via cbatch scripts so that they can be uniformly scheduled. These tasks are container-level jobs that run on physical nodes via CRI.
[0158] (2) Unified scheduling control plane (CraneCtld), which is the "brain" of the entire system and is responsible for core scheduling decisions.
[0159] Unified scheduling queue: Serves as the unified entry point for all task flows, receiving and managing job requests from cbatch, crun, ccon, etc.
[0160] Resource matching and scheduling strategy: Based on the resource requirements of the task (CPU, memory, GPU / NPU, RDMA, etc.) and the current system load, a complex scheduling algorithm is executed to allocate the task to the most suitable physical node.
[0161] Unified Resource View: Integrates resource information from all physical nodes to form a global resource pool view, providing a basis for scheduling decisions.
[0162] (3) Unified resource pool, the underlying hardware resources managed by the system, realizes the virtualization and pooling of resources. Its resource types include but are not limited to: computing resources, CPU, memory; acceleration resources, GPU / NPU; network resources, RDMA NIC (for high-performance network communication); software licenses, such as certain specific licenses; shared file system, used for data sharing between jobs.
[0163] (4) Physical nodes are the hardware platforms on which tasks actually run and are the ultimate carriers of resources. For example, Node A and Node B are two physical nodes that can run different jobs in parallel. Their core components include:
[0164] Craned / CSupervisor: An agent program that runs on each physical node, responsible for communicating with CraneCtld, receiving scheduling instructions, and managing jobs on the node.
[0165] Supercomputing process Step: Represents the HPC process running on this node.
[0166] cgroup resource isolation: Through the Linux cgroup mechanism, resources are isolated for different jobs running on a node (whether supercomputing processes or intelligent computing containers) to ensure that resources do not interfere with each other.
[0167] Job-level intelligent computing Pod: For example, Job21, a job can contain multiple task steps, which can be AI training, inference, etc.
[0168] CRI Container Runtime: A CRI-compliant container runtime (such as containerd) is responsible for actually creating, starting, and managing containers. CraneCtld connects to this runtime through a CRI client and issues container creation commands.
[0169] (5) Cross-node container networks, where:
[0170] Pod A eth0: The network interface of Pod A (such as Job21) on node A.
[0171] Meta CNI: An orchestration and adaptation layer responsible for converting common CNI (Container Network Interface) instructions (such as ADD and DEL) into a format that can be understood by underlying network plugins (such as Calico), acting as a bridge between the CNI runtime and the underlying network plugins.
[0172] Calico: A powerful networking plugin responsible for building routes and ACL rules (access control lists) between nodes. It ensures secure and efficient network communication between Pod A and Pod B.
[0173] Pod B eth0: The network interface of Pod B (such as Job21) on node B.
[0174] By combining Meta CNI and Calico, cross-node network communication for containerized applications is enabled, allowing a job (such as Job21) to run its different steps on nodes A and B, forming a distributed workflow.
[0175] Figure 6 This is a mapping diagram of a container scheduling method for supercomputing fusion according to an embodiment of this application, such as... Figure 6 As shown, a hybrid task architecture is depicted, in which a Job runs multiple containerized computing tasks (Container Steps) through a Pod, while a non-containerized daemon process (Daemon Step) runs on the underlying node to be responsible for maintaining and ensuring the stable operation of the Pod.
[0176] Figure 7 This is a sequence diagram of the entire lifecycle of a Pod and a container according to an embodiment of this application for a container scheduling method oriented towards supercomputing fusion, as shown below. Figure 7 As shown, in some embodiments of this application, the Supervisor, through the collaboration of PodInstance and ContainerInstance, achieves full lifecycle management of the Pod and its internal containers, which can be divided into three stages: Pod creation, container lifecycle management, and resource cleanup.
[0177] During the Pod creation phase (steps 1-5), PodInstance, acting as a daemon, first sends a RunPodSandbox request to CriClient, passing in the Pod configuration information. Upon receiving the request, CriClient forwards it to the underlying container runtime (such as containerd or CRI-O) via the gRPC protocol. The container runtime performs the operations of creating the Pod's network namespace and sandbox container, returning a unique pod_id. This pod_id is then returned to PodInstance via the container runtime and CriClient. Upon receiving the pod_id, PodInstance persistently stores the Pod configuration file (pod_config) and the generated pod_id together in the local file system, ensuring the reliability of the Pod information and subsequent recovery capabilities, thus completing the Pod creation and initialization.
[0178] During the container lifecycle phase (steps 6-15), ContainerInstance is responsible for managing the specific container. First, it retrieves the pod_id created in the previous step by calling the GetPodSandbox interface of PodInstance. This process can be done by reading from a local file or querying via a tag. After obtaining the pod_id, ContainerInstance sends a PullImage request to CriClient to pull the required container image. CriClient forwards this request to the container runtime via gRPC, which pulls the image and returns an image_id, which is then returned to ContainerInstance level by level. Subsequently, ContainerInstance calls the CreateContainer interface of CriClient, passing in the pod_id and container configuration. CriClient then calls the CreateContainer gRPC interface of the container runtime to create the container and returns a container_id. After receiving the container_id, ContainerInstance finally calls the StartContainer interface. CriClient then sends the startup command to the container runtime via gRPC to start the container. During container operation, the container runtime continuously pushes information such as the container's running status and events to ContainerInstance in real time through an event stream (GetContainerEvents), enabling dynamic monitoring of the container's running status.
[0179] During the cleanup phase (steps 18-19), when a Pod or container needs to be terminated, the process enters the resource reclamation stage. ContainerInstance first sends a StopContainer request to CriClient, which is forwarded to the container runtime to stop the container with the specified container_id. CriClient then calls the RemoveContainer interface to remove the container. Finally, PodInstance sends a StopPodSandbox request to CriClient to stop the Pod's network namespace and sandbox containers, and then calls the RemovePodSandbox interface to clear Pod-level resources, thus completing the thorough cleanup of the entire Pod and its internal containers.
[0180] To facilitate understanding of the above process, the following is a brief explanation of the Pod lifecycle and container lifecycle:
[0181] Pod lifecycle:
[0182] (1) When the Daemon Step starts, the PodInstance constructs the PodSandboxConfig from pod_meta in the Prepare phase, including the Pod name, system-level tags and annotations, DNS configuration, cgroup parent path (aligned with the resource cgroup system of the HPC job to share a set of resource accounting and isolation mechanisms), namespace options (network / pid / ipc), port mapping (only effective in non-host network mode), run identity (run_as_user / run_as_group), and user namespace mapping when user namespaces are enabled;
[0183] (2) During the Spawn phase, the CRI RunPodSandbox interface is called to obtain the Pod sandbox ID, and the PodSandboxConfig is serialized and persisted to a binary file in the job directory. The Pod ID is written to the lock file so that the Pod can be retrieved through file reading or tag query in subsequent container steps.
[0184] (3) When the job enters the termination process, the Kill phase calls StopPodSandbox and RemovePodSandbox in sequence to clean up, and the Cleanup phase deletes persistent files asynchronously.
[0185] Container lifecycle:
[0186] (1) In the Prepare phase, any container step first retrieves the Pod from the persistent file or by calling GetPodSandboxId through the tag selector, and then calls PodSandboxStatus to verify that the Pod is in the SANDBOX_READY state.
[0187] (2) Call PullImage to retrieve images according to the pull strategy (Always / IfNotPresent / Never, the default is to intelligently select based on whether the image tag is latest);
[0188] (3) Construct ContainerConfig from container_meta, including step-level tags, log path relative to Pod log directory, image reference, stdin / tty control, namespace options (inherited from Pod configuration), running identity, volume mount (including host path existence verification and user permission verification), idmapped mount under user namespace or FUSEbindfs fallback, working directory, commands and parameters, environment variables, and CDI device list;
[0189] (4) Call CreateContainer to create a container;
[0190] (5) During the Spawn phase, the container event stream is suspended (suspended on demand during the first startup and shared by subsequent container steps), and then StartContainer is called to start the container;
[0191] (6) After the container enters operation, the user can interact with it via Attach / Exec;
[0192] (7) When the step ends, call StopContainer+RemoveContainer. The Pod will be uniformly reclaimed by the PodInstance held by the Daemon Step when the job terminates.
[0193] Figure 8 This is a schematic diagram of the Fake Root data flow for a container scheduling method for supercomputing fusion according to an embodiment of this application, as shown below. Figure 8 As shown, its data flow is mainly divided into three layers: within the container, the Fake Root mapping layer, and the host machine / shared storage.
[0194] (1) Inside the container. Inside the container, applications, shell environments, or package managers (such as apt, yum, pip, etc.) run with the experience of the root user (uid=0), allowing users to freely install software and modify system configurations. All system calls initiated inside the container that require writing to files will have their requested user ID (uid=0) used as input to the next layer for processing, thus simulating a complete root privilege operation experience at the application layer, meeting users' needs for software environment customization, and providing a unified input source for the underlying permission mapping.
[0195] (2) Fake Root Mapping Layer. This layer is the core of the "fake root" capability, responsible for mapping the virtual root privileges within the container to the non-privileged user on the host machine. Its workflow includes user ID mapping, file write control, and selection of underlying mechanisms. Through the user namespace isolation mechanism, container uid=0 within the container is mapped to the non-privileged sub-user ID (SubId) on the host machine, such as host SubUid 101000, ensuring that the final ownership of file write operations belongs to the real user on the host machine, preventing unauthorized access. The underlying mechanism first checks whether the file system supports idmapped mount. If it does, it directly uses the high-performance idmapped mount scheme; if it does not, it automatically downgrades to FUSE bindfs, implementing ID mapping through the user-space file system, ensuring that the FakeRoot capability is still available in older kernels or file system environments that do not support idmapped mount, ensuring backward compatibility.
[0196] (3) Host machine / shared storage. This layer is the final target and data persistence location for operations within the container, including the real user on the host machine (such as user leo with uid=1000) and shared storage (such as NFS, Lustre, or local directories). Any operation performed by a user within the container will have its files written to the actual user, ensuring data security and clear ownership. At the same time, it achieves effective security protection, preventing users from escaping to become the root user on the host machine through the container. Thus, while retaining the root experience within the container, it completely prevents permission escape and ensures the security of multi-user shared clusters.
[0197] In summary, the complete path of this data flow is as follows: the application inside the container initiates file operations with root privileges → the FakeRoot mapping layer performs the mapping from uid=0 to host SubId under user namespace isolation → the underlying layer chooses idmapped mount or FUSE bindfs based on its capabilities to perform the final file system mounting and writing → the operation is finally completed under the real user (such as leo) on the host machine, realizing the file writing.
[0198] Figure 9 This is a schematic diagram of the overall process of a container scheduling method for supercomputing fusion according to an embodiment of this application, as shown below. Figure 9 As shown, in some embodiments of this application, user requests are processed sequentially by the ccon client, CraneCtld, Craned, Supervisor, and CriClient. Finally, the container runtime creates a Pod and starts the container on the compute node specified by the scheduler. The specific execution actions of each module are as follows:
[0199] (1) ccon parses the scheduling parameters and container parameters, generates job requests according to the Job / Pod and Step / Container mapping relationship, and carries pod_meta and container_meta.
[0200] (2) CraneCtld puts the job in the same queue as the traditional HPC job, completes resource matching according to the unified partition, account, QoS, fair sharing and backfilling strategy, selects computing nodes and allocates CPU, memory and GPU.
[0201] (3) After the job is sent to the target node, Craned creates the corresponding Supervisor. Daemon Step creates and maintains the Pod through CRI, and completes the node-side configurations such as cgroup, CNI network and optional Fake Root.
[0202] (4) Primary Step pulls the image into the Pod, injects the CDI device allocated by the scheduler, and calls the CRI interface in sequence to create and start the container and execute python train.py.
[0203] (5) During operation, the Supervisor monitors the container status through the CRI event stream and sends it back to the scheduler; users can use ccon logs, ccon attach or ccon exec to view and operate the running containers.
[0204] (6) After the task is completed, the system will reclaim the container and Pod in sequence and release the allocated resources. If a startup failure, running failure, user cancellation or timeout occurs, the same cleanup process will be entered and the corresponding final state will be recorded.
[0205] It should be noted that the implementation of each of the above steps can refer to the above embodiments and system architecture diagram, and will not be repeated here.
[0206] This application uses the CRI standard protocol to interface with container runtime in the HPC job scheduling system and introduces a Job / Pod+Step / Container mapping model. This solution, while minimizing intrusion into the HPC scheduling kernel (by introducing only two optional fields, pod_meta and container_meta, at the job protocol layer, it allows existing partitioning, queues, QoS, accounts, fair sharing scheduling algorithms, backfilling algorithms, and energy-saving scheduling algorithms to serve container jobs without discrimination); at the same time, it directly interfaces with standard implementations such as OCI / containerd through CRI, reusing the entire cloud-native image, device, and network ecosystem; and through an imperative (Slurm-like) orchestration method, it enables HPC users to submit and control container jobs with minimal learning cost using familiar commands such as cbatch / crun.
[0207] Specifically, this application implements a unified scheduling system capable of simultaneously handling traditional HPC process-based jobs (batch processing, interactive, MPI cross-node parallel jobs, etc.) and AI containerized jobs. Both types of jobs queue in the same job queue, share the same partition, the same QoS system, and the same account system, and are scheduled by the same set of fair sharing scheduling algorithms, backfilling algorithms, energy-saving scheduling algorithms, and job time prediction algorithms. On the scheduler kernel side, only two optional fields (Pod metadata and container metadata) are introduced in the protocol messages describing the steps; the original HPC scheduling algorithm is completely unaware of this. Any upgrades to the scheduling algorithm automatically benefit both supercomputing and intelligent computing workloads simultaneously. This fundamentally eliminates the computing power silos, storage silos, account silos, and operational fragmentation caused by "supercomputing and intelligent computing dual-stack," which is the core protection point of this application's implementation.
[0208] Furthermore, this embodiment embeds a complete CRI client module into the node daemon process of the HPC job scheduling system, and connects to any OCI / CRI compatible container runtime (containerd, CRI-O, etc.) through gRPC dual-channel (runtime service + image service). This method is runtime-independent, the scheduling system is not bound to any specific container implementation, and can inherit open specifications such as OCI standard images, CDI standard devices, and CNI standard networks accumulated in the cloud-native ecosystem.
[0209] Furthermore, this application defines an imperative orchestration model that uses container jobs as Pod holders and container steps as container execution units. It distinguishes three types of step roles using the StepType enumeration (DAEMON / PRIMARY / COMMON): Daemon Steps reside and maintain Pods throughout the job's lifecycle; Primary Steps are user-specified job entry points (which can be batch scripts or container steps); and Common Steps are steps dynamically added during the execution of Primary Steps. This model allows for the free mixing of host commands, batch scripts, and container steps within the same job, combining the container abstraction capabilities of Kubernetes with the imperative workflow flexibility of HPC—a form that is lacking in both SLURM+Pyxis and Kubernetes+Volcano.
[0210] Furthermore, the supercomputing converged container design in this application natively supports heterogeneous computing and network resources. On the scheduler side, heterogeneous resources such as GPUs, NPUs, DCUs, RDMA network cards, and SR-IOV VFs are declared using GRES abstraction. On the node landing side, scheduling results are distributed to Pod and container configurations using two cloud-native standard interfaces: CDI (Computing Device) and CNI (Network Plane). Users only need to declare the required resource types and quantities, without needing to concern themselves with the specific vendor runtime and device file details.
[0211] Finally, this application provides a "fake root" experience for HPC shared multi-user clusters, allowing users to operate as root within a container while remaining a regular user on the host machine. For high security, based on the mapping between Linux user namespaces and SubId segments, uid 0 within the container is mapped to a non-privileged SubUid on the host machine. All written files belong to the real user, preventing permission escape, and user permission verification is performed on the mounted host path. For high compatibility, idmapped mount is used directly on Linux kernels 5.12 and above and file systems that support idmapped mount. In unsupported environments (including a significant number of HPC clusters still using NFS and Lustre), it automatically downgrades to an equivalent scheme based on FUSE bindfs. The SubId segment can be automatically allocated by the scheduling system according to administrator configuration, or it can be read from the system's / etc / subuid and / etc / subgid. This mechanism is not dependent on a specific Linux kernel version or file system type and can be directly implemented in existing HPC clusters, which is a crucial guarantee for the engineering practicality of this application's embodiment in HPC multi-user shared clusters.
[0212] It should be noted that, in this embodiment of the application, containers can also be started by directly calling the underlying OCI runtime (such as runc, crun, youki, etc.) in the HPC job scheduler, bypassing the CRI protocol. Alternatively, the HPC job scheduler can be implemented as a Kubernetes Device Plugin or Scheduler Extender, with Kubernetes uniformly scheduling HPC and AI workloads. Alternatively, container support can be embedded in the HPC scheduler as a SPANK-style plugin, but still interface with the container runtime via the CRI interface (i.e., a hybrid "Pyxis-style + CRI" solution). Alternatively, the HPC scheduler can bypass CRI while retaining the Pod model through the OCI runtime + a self-developed lightweight Pod abstraction; this is not limited here.
[0213] The beneficial effects of the embodiments of this application are as follows:
[0214] First, from a system architecture perspective, this application is the first to propose a solution that directly interfaces with container runtimes via the CRI standard protocol within a single HPC job scheduling system, organizing containerized workloads in Pod units. This allows the same scheduling system to support both traditional HPC process-based jobs and AI containerized jobs; both types of jobs share the same job queue, the same partition, the same QoS system, the same account system, and the same fair and shared scheduling algorithm. This fundamentally eliminates the silos in computing power, storage, and accounts, as well as the disconnect between operations and maintenance, caused by "dual-stack" computing. Any existing or future algorithm upgrades to the scheduling kernel (such as fair sharing, backfilling, energy saving, job time prediction, etc.) automatically benefit both supercomputing and intelligent computing workloads simultaneously.
[0215] Second, from the perspective of ecosystem integration, this application is runtime-independent and can be integrated with any OCI / CRI compatible container runtime such as containerd and CRI-O, and fully reuse open specifications such as OCI standard images, CDI standard devices, and CNI standard networks accumulated in the cloud-native ecosystem; OCI images maintained by users in public image repositories can be pulled and used immediately without the need for squashfs or SIF format conversion.
[0216] Third, from the user experience perspective, the dual-style command system of "Slurm style + Docker style" provided in this application takes into account the usage habits of HPC users and container users, and allows for the free mixing of host machine commands, batch scripts and container steps within the same job; its flexibility is significantly higher than the existing SLURM+Pyxis and K8s+Volcano solutions.
[0217] Fourth, from a security and compatibility perspective, the highly secure and compatible Fake Root mechanism provided in this application enables ordinary users to freely install software packages and modify system configurations as root within a container without gaining host privileges; and in environments with old kernels or old file systems (typically some versions of NFS and Lustre) where idmapped mount is unavailable, it can be downgraded to an equivalent solution based on FUSE bindfs, allowing the embodiments of this application to be directly implemented in existing HPC clusters without upgrading the kernel or replacing the shared file system.
[0218] This application also provides a container scheduling device for supercomputing fusion, including:
[0219] The first receiving module is used to receive the target job issued by the job scheduler. The target job includes configuration metadata indicating the job type. The job scheduler includes a scheduling kernel built based on the high-performance computing (HPC) job model.
[0220] The first determination module is used to determine the execution instance corresponding to the container job when the configuration metadata indicates that the target job is a container job. The execution instance includes a Pod execution instance that manages the Pod lifecycle based on the container runtime interface and a container execution instance that manages the container lifecycle. One container job corresponds to one Pod, and the job steps in one container job correspond to one container in the Pod.
[0221] The execution module is used to execute container jobs based on execution instances.
[0222] It should be noted that the aforementioned container scheduling device for supercomputing fusion is used to execute... Figure 2 The container scheduling method shown is for supercomputing fusion, therefore Figure 2 The relevant explanations in the container scheduling method for supercomputing fusion also apply to the container scheduling device for supercomputing fusion mentioned above, and will not be repeated here.
[0223] This application also provides another container scheduling device for supercomputing fusion, including:
[0224] The second receiving module is used to receive the target job submitted by the target object;
[0225] The mapping module is used to generate a first job request corresponding to a container job based on a mapping model when the target job is a container job. The mapping model is used to map a container job to a Pod and to map job steps in a container job to containers. The first job request carries configuration metadata corresponding to the Pod and / or container.
[0226] The generation module is used to generate a second job request corresponding to the process job when the target job is a process job. The second job request does not carry configuration metadata.
[0227] The sending module is used to send the first job request and / or the second job request to the job scheduler. The job scheduler is used to distribute the target job to the target node for execution. The target node creates a Pod and / or creates a container within the Pod based on the container runtime interface. The job scheduler includes a scheduling kernel built based on the high-performance computing (HPC) job model.
[0228] It should be noted that the aforementioned container scheduling device for supercomputing fusion is used to execute... Figure 3 The container scheduling method shown is for supercomputing fusion, therefore Figure 3 The relevant explanations in the container scheduling method for supercomputing fusion also apply to the container scheduling device for supercomputing fusion mentioned above, and will not be repeated here.
[0229] This application also provides another container scheduling device for supercomputing fusion, including:
[0230] The third receiving module is used to receive the job request corresponding to the target job, wherein the target job includes a container job, and the job request corresponding to the container job carries configuration metadata for creating a Pod and / or container for executing the container job;
[0231] The second determination module is used to determine the target node based on the job request;
[0232] The distribution module is used to distribute the target job to the target node. The configuration metadata is used to instruct the target node to create a Pod and / or create a container within the Pod based on the container runtime interface.
[0233] It should be noted that the aforementioned container scheduling device for supercomputing fusion is used to execute... Figure 4 The container scheduling method shown is for supercomputing fusion, therefore Figure 4 The relevant explanations in the container scheduling method for supercomputing fusion also apply to the container scheduling device for supercomputing fusion mentioned above, and will not be repeated here.
[0234] This application also provides an electronic device, which includes a memory and a processor. The memory is used to store program instructions, and the processor is connected to the memory to execute steps of implementing the container scheduling method for supercomputing fusion in various embodiments of this application.
[0235] This application also provides a non-volatile storage medium including a stored computer program, wherein the device containing the non-volatile storage medium executes the steps of the container scheduling method for supercomputing fusion in various embodiments of this application by running the computer program.
[0236] This application also provides a computer program product, including computer instructions that, when executed by a processor, implement the steps of the container scheduling method for supercomputing fusion in various embodiments of this application.
[0237] This application also provides a computer program that, when executed by a processor, implements the steps of the container scheduling method for supercomputing fusion in various embodiments of this application.
[0238] The sequence numbers of the embodiments in this application are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.
[0239] In the above embodiments of this application, the descriptions of each embodiment have different focuses. For parts not described in detail in a certain embodiment, please refer to the relevant descriptions of other embodiments.
[0240] In the several embodiments provided in this application, it should be understood that the disclosed technical content can be implemented in other ways. The device embodiments described above are merely illustrative; for example, the division of units can be a logical functional division, and in actual implementation, there may be other division methods. For instance, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling, direct coupling, or communication connection may be through some interfaces; the indirect coupling or communication connection between units or modules may be electrical or other forms.
[0241] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0242] Furthermore, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit.
[0243] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as a USB flash drive, read-only memory (ROM), random access memory (RAM), portable hard drive, magnetic disk, or optical disk.
[0244] The above description is only a preferred embodiment of this application. It should be noted that for those skilled in the art, several improvements and modifications can be made without departing from the principle of this application, and these improvements and modifications should also be considered within the scope of protection of this application.
Claims
1. A container scheduling method for supercomputing fusion, characterized in that, include: Receive a target job issued by the job scheduler, wherein the target job includes configuration metadata for indicating the job type, and the job scheduler includes a scheduling kernel built based on the high-performance computing (HPC) job model; When the configuration metadata indicates that the target job is a container job, an execution instance corresponding to the container job is determined. The execution instance includes a Pod execution instance that manages the Pod lifecycle based on the container runtime interface and a container execution instance that manages the container lifecycle. One container job corresponds to one Pod, and a job step in one container job corresponds to one container in the Pod. The container job is executed based on the execution instance.
2. The method according to claim 1, characterized in that, Determining the execution instance corresponding to the container job includes: Obtain the job steps corresponding to the container job, wherein the job steps are logical units in the execution flow of the container job; Determine the job daemon process corresponding to the job step, wherein each job daemon process is used to execute one job step; The execution instance is created based on the job daemon process.
3. The method according to claim 2, characterized in that, The job steps include guardian job steps for creating the runtime environment required for the container job and basic job steps for identifying the execution entry point of the container job. Creating the execution instance based on the job daemon process includes: A first execution instance is created based on the first job daemon process corresponding to the daemon job step, wherein the first execution instance includes the Pod execution instance; After the first execution instance is created, a second execution instance is created based on the second job daemon process corresponding to the basic job steps. The second execution instance includes a container execution instance that manages the container lifecycle based on the container runtime interface.
4. The method according to claim 3, characterized in that, The job steps include general job steps dynamically added to the basic job steps; the method also includes: creating a third execution instance based on the third job daemon process corresponding to the general job steps.
5. The method according to claim 4, characterized in that, The job steps include container steps executed in a container runtime environment and non-container steps executed directly in a host operating system environment; the method further includes: when the basic job step is the non-container step, in response to an append command in the container job, appending at least one of the container steps as the general job step after the basic job step.
6. The method according to claim 1, characterized in that, The Pod is used to host container steps within the scope of a container job and to maintain them throughout the lifecycle of the container job, with each container step corresponding to a container within the Pod.
7. The method according to claim 1, characterized in that, Executing the container job based on the execution instance includes: Obtain Pod metadata from the configuration metadata, and construct Pod configuration information based on the Pod metadata; The Pod execution instance calls the container runtime interface to create the target Pod based on the Pod configuration information; Execute the container job in the target Pod.
8. The method according to claim 7, characterized in that, Executing the container job in the target Pod includes: The container execution instance in the execution instance is used to obtain the Pod identifier corresponding to the target Pod, and the container runtime interface is called to pull the image required by the container job; Obtain container metadata from the configuration metadata, and construct container configuration information based on the container metadata and the image; The container execution instance is used to call the container runtime interface to create a target container within the target Pod based on the container configuration information. The container operation is performed within the target container.
9. The method according to claim 2, characterized in that, The job daemon process includes a client module, which is used to create the Pod and the containers within the Pod. The client module connects to the runtime service of the container runtime through a first channel and to the image service of the container runtime through a second channel.
10. The method according to claim 1, characterized in that, The method further includes: If the configuration metadata indicates that the target job is a process job, determine the process execution instance corresponding to the process job, wherein the process job and the container job use the same scheduling path, and the process job does not carry the configuration metadata; The process job is executed based on the process execution instance.
11. The method according to claim 1, characterized in that, The method further includes: If the configuration metadata of the container job indicates that user namespace isolation is enabled, query the first identity identifier of the target object corresponding to the container job on the host machine; Determine the identifier segment corresponding to the first identity identifier; Determine the mapping relationship between the identifier segment and the second identity identifier within the container in the Pod, and send the mapping relationship to the container runtime, wherein the privileged user within the container corresponds to the non-privileged user within the host machine.
12. A container scheduling method for supercomputing fusion, characterized in that, include: Receive the target job submitted by the target object; When the target job is a container job, a first job request corresponding to the container job is generated based on a mapping model, wherein the mapping model is used to map the container job to a Pod and to map the job steps in the container job to containers, and the first job request carries configuration metadata corresponding to the Pod and / or the container; If the target job is a process job, a second job request corresponding to the process job is generated, wherein the second job request does not carry the configuration metadata; The first job request and / or the second job request are sent to the job scheduler, wherein the job scheduler is used to distribute the target job to the target node for execution, the target node creates the Pod based on the container runtime interface and / or creates the container in the Pod, and the job scheduler includes a scheduling kernel built based on the high-performance computing HPC job model.
13. The method according to claim 12, characterized in that, The target job includes a first target job submitted by the target object using a first-style command, and a second target job submitted by the target object using a second-style command, wherein the first-style command includes commands based on high-performance computing (HPC) batch processing workflows, and the second-style command includes commands based on container runtime operations; the method further includes: If the first style command includes a preset identifier, then the first target job is determined to be the container job; or... If the naming prefix of the second style command is a preset prefix, the second target job is determined to be the container job.
14. A container scheduling method for supercomputing fusion, characterized in that, include: Receive a job request corresponding to a target job, wherein the target job includes a container job, and the job request corresponding to the container job carries configuration metadata for creating a Pod and / or container for executing the container job; The target node is determined based on the job request; The target job is distributed to the target node, wherein the configuration metadata is used to instruct the target node to create the Pod and / or create the container within the Pod based on the container runtime interface.
15. A container scheduling system for supercomputing fusion, characterized in that, This includes terminal devices, job schedulers, and target nodes, among which, The terminal device is connected to the job scheduler and is used to receive a target job submitted by a target object and generate a job request corresponding to the target job. The target job includes a container job, and the job request corresponding to the container job carries configuration metadata for creating a Pod and / or container for executing the container job. The job scheduler is connected to the terminal device and the target node respectively, and is used to determine the target node based on the job request and send the target job to the target node. The configuration metadata is used to instruct the target node to create the Pod and / or create the container in the Pod based on the container runtime interface. The target node is connected to the job scheduler and is used to determine the execution instance corresponding to the target job and execute the target job based on the execution instance. The execution instances of the container job include Pod execution instances that manage the Pod lifecycle based on the container runtime interface, and one container job corresponds to one Pod.
