Manage Compute Units in dxflow SDK

Compute-Unit is a fundamental concept in DiPhyx. It is a logical entity that represents a single compute resource in the cloud, whether it's from third-party providers or self-hosted. In order to see all the Compute-Units, use ComputeManager class. The following display the user's compute-units:

import dxflow

dxs = dxflow.Session() ## it will use the credential stored in ~/.diphyx/config.yaml

compute_manager = dxs.get_compute_manager()
compute_manager.list()
Name | Status | IP             | Cluster Type | CPU | Memory(GB) | Disk
-----+--------+----------------+--------------+-----+------------+-----
Demo | READY  | 52.207.227.207 | AWS:T2 Micro | 1   | 1          | 8

Now dive into one of the available compute-unit name

name = compute_manager.get_unit(name='name') ## or use ip
print(name.detail())

Components of Compute-Unit

Every compute-unit has differnt parts:

  • Storage: This class manages the working storage of the compute-unit. See Unit Storage for more details.
    name.storage.ls()
    
  • Projects: This class manages the projects associated to this compute-unit.
    name.projects.list()
    
  • Containers: This class manages the containers currently available on the compute-unit. Keep in mind that containers are associated with the projects.
    name.containers.list()
    
Contact us
info@diphyx.com
+1 (619) 693-6161
Follow us on
@2023-2024 DiPhyx, Inc.