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())
Every compute-unit has differnt parts:
name.storage.ls()
name.projects.list()
name.containers.list()