From 4e6e04d8a8e3628a89ae889c43758f92223c456c Mon Sep 17 00:00:00 2001 From: liuxiaolong <liuxiaolong@aiotlink.com> Date: 星期二, 30 六月 2020 20:39:36 +0800 Subject: [PATCH] free camera alltask --- service/SdkInstall.go | 16 ++++++++++++---- 1 files changed, 12 insertions(+), 4 deletions(-) diff --git a/service/SdkInstall.go b/service/SdkInstall.go index 0543795..2f6c74a 100644 --- a/service/SdkInstall.go +++ b/service/SdkInstall.go @@ -232,9 +232,16 @@ } } if util.DirExists(unPackPath+sdkType+"/models") { - if _,cE := util.CopyDirByCmd(unPackPath+sdkType+"/models", "./zconf"); cE != nil { + if _,cE := util.CopyDirByCmd(unPackPath+sdkType+"/models", "./"); cE != nil { return false, cE } + //鎷疯礉瀹屾垚鍚庡垹闄ibs涓媠dkType鏂囦欢澶逛笅models + } + if util.DirExists(libPath+sdkType+"/models") { + os.RemoveAll(libPath+sdkType+"/models") + } + if util.DirExists(libPath+sdkType+"/zconf") { + os.RemoveAll(libPath+sdkType+"/zconf") } } else { logger.Debug("unTarGzE sdkType.tar.gz err:", unTarGzE) @@ -282,9 +289,9 @@ cM,cEM := strconv.Atoi(curIVArr[1]) cL,cEL := strconv.Atoi(curIVArr[2]) - dH,dEH := strconv.Atoi(curIVArr[0]) - dM,dEM := strconv.Atoi(curIVArr[1]) - dL,dEL := strconv.Atoi(curIVArr[2]) + dH,dEH := strconv.Atoi(dstIVArr[0]) + dM,dEM := strconv.Atoi(dstIVArr[1]) + dL,dEL := strconv.Atoi(dstIVArr[2]) if cEH !=nil || cEM != nil || cEL != nil || dEH != nil ||dEM !=nil || dEL !=nil { return false } @@ -344,6 +351,7 @@ Env string `gorm:"column:env" json:"env"` //杩愯鐜鍙婄粨鏋滆鏄庯紝json鏍煎紡锛屽寘鍚玸o_file_path,runtime,param,depends(cuda鐗堟湰锛宱pencv鐗堟湰锛宼ensorflow鐗堟湰绛�) IconBlob string `gorm:"column:iconBlob;type:text;" json:"iconBlob"` //鍥剧墖 Version string `gorm:"column:version;type:varchar(50);default:'1.0';" json:"version"` //鐗堟湰鍙� + Args []SdkArg `json:"args"` } type SdkInsOrUpgrade struct { -- Gitblit v1.8.0