|
@@ -335,16 +335,15 @@ public class ProjectService {
|
|
|
public String handleAlgorithm(String projectId, String algorithmId) {
|
|
|
|
|
|
AlgorithmPO algorithmPO = algorithmMapper.selectById(algorithmId);
|
|
|
- String dockerImage = dockerConfiguration.getRegistry() + "/";
|
|
|
+ String dockerImage;
|
|
|
String algorithmDirectoryLinuxTempPath;
|
|
|
String algorithmTarLinuxTempPath = null;
|
|
|
if (algorithmPO != null) {
|
|
|
String algorithmCode = algorithmPO.getAlgorithmCode();
|
|
|
String dockerImport = algorithmPO.getDockerImport();
|
|
|
- dockerImage += dockerConfiguration.getRegistry() + "/algorithm_" + algorithmCode + ":latest";
|
|
|
+ dockerImage = dockerConfiguration.getRegistry() + "/algorithm_" + algorithmCode + ":latest";
|
|
|
if ("1".equals(dockerImport) && StringUtil.isNotEmpty(dockerImport)) {
|
|
|
- dockerImage = algorithmPO.getDockerImage();
|
|
|
- return dockerImage;
|
|
|
+ return algorithmPO.getDockerImage();
|
|
|
} else if (dockerImport == null || "0".equals(dockerImport)) {
|
|
|
String uploadMode = algorithmPO.getUploadMode();
|
|
|
if (DictConstants.ALGORITHM_UPLOAD_MODE_FILE.equals(uploadMode)) {
|
|
@@ -380,7 +379,7 @@ public class ProjectService {
|
|
|
log.info("ProjectService--handleAlgorithm 项目" + projectId + "需要从索为平台下载算法 " + algorithmId);
|
|
|
algorithmTarLinuxTempPath = linuxTempPath + "algorithm/" + algorithmId + ".tar";
|
|
|
String dockerImageWithoutVersion = "algorithm_" + algorithmId;
|
|
|
- dockerImage += dockerImageWithoutVersion + ":latest";
|
|
|
+ dockerImage = dockerConfiguration.getRegistry() + "/" + dockerImageWithoutVersion + ":latest";
|
|
|
|
|
|
if (!projectUtil.isImported(dockerImageWithoutVersion)) {
|
|
|
|