mirror of
https://github.com/XShengTech/MEGREZ.git
synced 2026-05-03 13:02:38 +00:00
Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| ef93c40361 | |||
| 716764a86d |
@@ -61,7 +61,7 @@ func control(serverID uint, data Data) (err error) {
|
||||
if err != nil {
|
||||
ctx := context.Background()
|
||||
redis.RawDB.IncrBy(ctx, "remain_gpu:server:"+strconv.Itoa(int(serverID)), int64(instance.GpuCount))
|
||||
database.DB.Model(&instance).Update("status", models.InstanceStatusFail).Update("from_action", models.InstanceActionRestart)
|
||||
database.DB.Model(&instance).Update("status", models.InstanceStatusFail).Update("from_action", models.InstanceActionStart)
|
||||
lc.Error("instance restart error: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
@@ -48,6 +48,7 @@ func createInstance(ip string, port int, apikey string,
|
||||
},
|
||||
Env: []string{
|
||||
"NVIDIA_DRIVER_CAPABILITIES=video,compute,utility",
|
||||
"NVIDIA_VISIBLE_DEVICES=none",
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user