|
@@ -87,7 +87,7 @@ func RunWaitingCluster() {
|
|
|
algorithmTarPath := ""
|
|
|
algorithmImageName := ""
|
|
|
algorithmImageNameWithVersion := ""
|
|
|
- newAlgorithm := false
|
|
|
+ algorithmExist := false
|
|
|
|
|
|
if can {
|
|
|
//infra.GlobalLogger.Infof("节点 %v 有剩余并行度。", gpuNode)
|
|
@@ -129,7 +129,7 @@ func RunWaitingCluster() {
|
|
|
_ = util.CreateParentDir(algorithmTarPath)
|
|
|
algorithmImageName = infra.ApplicationYaml.K8s.RegistryUri + "/cicvdcl_" + util.MD5HashShort(algorithmTarName)
|
|
|
algorithmImageNameWithVersion = algorithmImageName + ":latest"
|
|
|
- algorithmExist := util.ImageExists(infra.GlobalDockerClient, algorithmImageName)
|
|
|
+ algorithmExist = util.ImageExists(infra.GlobalDockerClient, algorithmImageName)
|
|
|
if !algorithmExist {
|
|
|
if firstTaskCache.EquipmentType == "JIN_LONG_BA_SHI" || firstTaskCache.EquipmentType == "PU_JIN_DUO_GONG_NENG_CHE" {
|
|
|
err = infra.GlobalOssBucketCicv.GetObjectToFile(firstTaskCache.AlgorithmObjectKey, algorithmTarPath)
|
|
@@ -225,7 +225,7 @@ func RunWaitingCluster() {
|
|
|
infra.GlobalLogger.Infof("发送任务消息成功,话题为【%v】,偏移量为【%v】。", topic, offset)
|
|
|
|
|
|
// 如果新算法需要导入
|
|
|
- if newAlgorithm {
|
|
|
+ if !algorithmExist {
|
|
|
// 导入算法
|
|
|
_, s, err := util.Execute("docker", "import", algorithmTarPath, algorithmImageNameWithVersion)
|
|
|
_, s, err = util.Execute("docker", "push", algorithmImageNameWithVersion)
|