Example #1
0
class Gpu(db.Document):
    order = db.IntField()
    path = db.StringField(max_length=20)
    model = db.StringField(max_length=30)
    machine = db.ReferenceField("Machine")
    power = db.IntField()
    max_power = db.IntField()
    temperature = db.IntField()
    processes = db.StringField(max_length=30)

    init_time = db.DateTimeField()
    last_update = db.DateTimeField()
Example #2
0
class Machine(db.Document):
    accept_jobs = db.StringField(max_length=40, default="")
    name = db.StringField(max_length=40)
    host = db.StringField(max_length=20)
    plugin = db.StringField(max_length=20)

    cuda_libs = db.ListField(db.StringField(), default=[])
    ro_cuda_libs = db.ListField(db.StringField(), default=[])
    devices = db.ListField(db.StringField())

    cpu = db.StringField(max_length=20)
    memory = db.StringField(max_length=40)
    gpu = db.DictField()
    available_gpus = db.ListField(db.StringField())

    container_num = db.IntField()
    containers = db.StringField()
    last_update = db.DateTimeField()
    gpu_last_update = db.DateTimeField()
    ports = db.ListField(db.IntField(), default=available_ports)
Example #3
0
class GpuTask(db.Document):
    name = db.StringField(max_length=128, unique=True)
    docker = db.StringField(max_length=100)
    machine = db.StringField(max_length=40, choices=machine_list)
    volumes = db.StringField(max_length=1024)
    gpu_num = db.IntField(default=4)
    repo = db.StringField(max_length=128, default='github.com/naturali/dnn')
    branch = db.StringField(max_length=40, default='master')
    commit_id = db.StringField(max_length=128)
    command = db.StringField(max_length=1024)

    git_username = db.StringField(max_length=30)
    git_passwd = db.StringField(max_length=30)

    init_time = db.DateTimeField(default=datetime.now())
    status = db.StringField(max_length=20, default="queueing")

    running_machine = db.StringField(max_length=128)
    running_gpu = db.ListField(db.StringField())
    running_id = db.StringField(max_length=70)
    running_pid = db.StringField(max_length=30)
    error_log = db.StringField(default='')
    arrange_time = db.DateTimeField()
    start_time = db.DateTimeField()
    finish_time = db.DateTimeField()
    update_time = db.DateTimeField()

    abort_times = db.IntField(default=0)
    max_abort_times = db.IntField(default=3)

    mount_port = db.IntField()
Example #4
0
class GpuTaskLog(db.Document):
    # name = db.StringField()
    gpu_mission_name = db.StringField(max_length=128)
    pre_logs = db.StringField(default='')
    running_log = db.StringField(default='')
Example #5
0
class Mission(db.Document):
    job = db.StringField(max_length=128)
    name = db.StringField(max_length=128)
    docker = db.StringField(max_length=100)
    machine = db.StringField(max_length=40)
    volumes = db.StringField(max_length=128)
    gpu_num = db.IntField()
    repo = db.StringField(max_length=128)
    branch = db.StringField(max_length=40)
    command = db.StringField(max_length=256)

    init_time = db.DateTimeField(default=datetime.now())
    status = db.StringField(max_length=20)

    running_machine = db.StringField(max_length=128)
    running_gpu = db.StringField(max_length=128)
    running_id = db.StringField(max_length=70)
    arrange_time = db.DateTimeField()
    start_time = db.DateTimeField()
    finish_time = db.DateTimeField()