下載圖像

This commit is contained in:
2023-05-27 16:40:04 +08:00
parent 788f166909
commit 0966a3c83e
7 changed files with 203 additions and 62 deletions

View File

@@ -11,7 +11,7 @@ type Server struct {
Type string `json:"type"` // (訓練|推理)
IP string `json:"ip"`
Port int `json:"port"`
Status string `json:"status"` // (異常|初始化|就緒|工作中|關閉中)
Status string `json:"status"` // (異常|初始化|閒置|就緒|工作中|關閉中)
Username string `json:"username"`
Password string `json:"password"`
Models []map[string]interface{} `json:"models" gorm:"-"` // 數據庫不必保存
@@ -21,4 +21,13 @@ type Server struct {
func init() {
configs.ORMDB().AutoMigrate(&Server{})
// 添加一個預設的訓練機
configs.ORMDB().Create(&Server{
Name: "GPU T4",
Type: "train",
IP: "106.15.192.42",
Port: 7860,
Status: "閒置",
})
}