diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java index 3eb50725..a39905a4 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/ModelsServiceImpl.java @@ -654,7 +654,7 @@ public class ModelsServiceImpl implements ModelsService { try { dvcUtils.dvcInit(rootPath); // 配置远程S3地址 - String s3Path = "data/mini-model-management-platform-files/" + ci4sUsername + "/model/" + gitlinIid + "/" + repositoryName + "/" + branchName; + String s3Path = bucketName + "/mini-model-management-platform-files/" + ci4sUsername + "/model/" + gitlinIid + "/" + repositoryName + "/" + branchName; dvcUtils.dvcRemoteAdd(rootPath, s3Path); dvcUtils.dvcConfigS3Credentials(rootPath, endpoint); dvcUtils.dvcConfigS3Credentials2(rootPath, accessKeyId); @@ -826,7 +826,7 @@ public class ModelsServiceImpl implements ModelsService { } // 配置远程S3地址 - String s3Path = "data/mini-model-management-platform-files/" + ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName + "/" + branchName; + String s3Path = bucketName + "/mini-model-management-platform-files/" + ci4sUsername + "/model/" + modelsVo.getId() + "/" + repositoryName + "/" + branchName; dvcUtils.dvcRemoteAdd(rootPath, s3Path); dvcUtils.dvcConfigS3Credentials(rootPath, endpoint); dvcUtils.dvcConfigS3Credentials2(rootPath, accessKeyId); diff --git a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/NewDatasetServiceImpl.java b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/NewDatasetServiceImpl.java index 2fb84d2d..6c2b8c6b 100644 --- a/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/NewDatasetServiceImpl.java +++ b/ruoyi-modules/management-platform/src/main/java/com/ruoyi/platform/service/impl/NewDatasetServiceImpl.java @@ -63,6 +63,8 @@ public class NewDatasetServiceImpl implements NewDatasetService { String endpoint; @Value("${git.endpoint}") String gitendpoint; + @Value("${minio.dataReleaseBucketName}") + private String bucketName; @Value("${git.localPath}") String localPathlocal; @Resource @@ -123,7 +125,7 @@ public class NewDatasetServiceImpl implements NewDatasetService { // 命令行操作 git clone 项目地址 dvcUtils.gitClone(localPath, projectUrl, branchName, gitLinkUsername, gitLinkPassword); - String s3Path = "data/mini-model-management-platform-files" + "/" + relatePath + "/" + branchName; + String s3Path = bucketName + "/mini-model-management-platform-files" + "/" + relatePath + "/" + branchName; //干掉目标文件夹 dvcUtils.deleteDirectory(datasetPath); dvcUtils.moveFiles(sourcePath, datasetPath); @@ -216,7 +218,7 @@ public class NewDatasetServiceImpl implements NewDatasetService { dvcUtils.dvcCheckout(localPath); // 准备数据 - String s3Path = "data/mini-model-management-platform-files" + "/" + relatePath + "/" + branchName; + String s3Path = bucketName + "/mini-model-management-platform-files" + "/" + relatePath + "/" + branchName; //干掉目标文件夹 dvcUtils.deleteDirectory(datasetPath);