|
|
|
@@ -738,17 +738,18 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
modelDependency.setMeta(meta); |
|
|
|
modelDependency1Dao.insert(modelDependency); |
|
|
|
|
|
|
|
// 配置远程S3地址 |
|
|
|
String s3Path = "management-platform-files/" + ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName + "/" + branchName; |
|
|
|
dvcUtils.dvcRemoteAdd(rootPath, s3Path); |
|
|
|
dvcUtils.dvcConfigS3Credentials(rootPath, endpoint); |
|
|
|
dvcUtils.dvcConfigS3Credentials2(rootPath, accessKeyId); |
|
|
|
dvcUtils.dvcConfigS3Credentials3(rootPath, secretAccessKey); |
|
|
|
// dvc 跟踪 |
|
|
|
dvcUtils.dvcAdd(rootPath, "model"); |
|
|
|
dvcUtils.pushNewBranchToRemote(rootPath, gitLinkUsername, gitLinkPassword, branchName); |
|
|
|
|
|
|
|
CompletableFuture.supplyAsync(() -> { |
|
|
|
try { |
|
|
|
// 配置远程S3地址 |
|
|
|
String s3Path = "management-platform-files/" + ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName + "/" + branchName; |
|
|
|
dvcUtils.dvcRemoteAdd(rootPath, s3Path); |
|
|
|
dvcUtils.dvcConfigS3Credentials(rootPath, endpoint); |
|
|
|
dvcUtils.dvcConfigS3Credentials2(rootPath, accessKeyId); |
|
|
|
dvcUtils.dvcConfigS3Credentials3(rootPath, secretAccessKey); |
|
|
|
// dvc 跟踪 |
|
|
|
dvcUtils.dvcAdd(rootPath, "model"); |
|
|
|
dvcUtils.pushNewBranchToRemote(rootPath, gitLinkUsername, gitLinkPassword, branchName); |
|
|
|
//dvc push 到远程S3 |
|
|
|
dvcUtils.dvcPush(rootPath); |
|
|
|
} catch (Exception e) { |
|
|
|
@@ -756,9 +757,8 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
} |
|
|
|
return null; |
|
|
|
}); |
|
|
|
return "新增模型版本成功"; |
|
|
|
} |
|
|
|
return null; |
|
|
|
return "新增模型版本成功"; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@@ -871,7 +871,7 @@ public class ModelsServiceImpl implements ModelsService { |
|
|
|
String modelTagName = modelsVo.getModelTag(); |
|
|
|
String modelTypeName = modelsVo.getModelType(); |
|
|
|
|
|
|
|
String url = gitendpoint + "/api/projects.json?user_id=" + userId + "&sort_by=praises_count"; |
|
|
|
String url = gitendpoint + "/api/projects.json"; |
|
|
|
|
|
|
|
String name = modelsVo.getName(); |
|
|
|
if (StringUtils.isNotEmpty(name)) { |
|
|
|
|