|
@@ -80,7 +80,7 @@ public class ProjectManager {
|
|
|
return podYamlDirectory + podYaml;
|
|
|
} else if ("2".equals(modelType)) {
|
|
|
String podString = FileUtil.read(new File(carsimPodTemplateYaml));
|
|
|
- String replace0 = podString.replace("vtd-container", "vtd-" + projectId);
|
|
|
+ String replace0 = podString.replace("carsim-container", "carsim-" + projectId);
|
|
|
String replace1 = replace0.replace("algorithm-container", "algorithm-" + projectId);
|
|
|
String replace2 = replace1.replace("algorithm-image", algorithmDockerImage);
|
|
|
String replace3 = replace2.replace("kafka-topic", projectId); // 消息主题名称为 projectId
|
|
@@ -97,13 +97,13 @@ public class ProjectManager {
|
|
|
String finalYaml = null;
|
|
|
if (DictConstants.USE_GPU.equals(isChoiceGpu)) {
|
|
|
log.info("项目 " + projectId + " 使用 gpu 生成视频");
|
|
|
- String replace13 = replace12.replace("vtd-image", kubernetesConfiguration.getVtdImageUseGpu());
|
|
|
- finalYaml = replace13.replace("vtd-command", kubernetesConfiguration.getVtdCommandUseGpu());
|
|
|
+ String replace13 = replace12.replace("carsim-image", kubernetesConfiguration.getCarsimImage());
|
|
|
+ finalYaml = replace13.replace("carsim-command", kubernetesConfiguration.getCarsimCommand());
|
|
|
}
|
|
|
if (DictConstants.NOT_USE_GPU.equals(isChoiceGpu)) {
|
|
|
log.info("项目 " + projectId + " 不使用 gpu 生成视频");
|
|
|
- String replace13 = replace12.replace("vtd-image", kubernetesConfiguration.getVtdImageNotUseGpu());
|
|
|
- finalYaml = replace13.replace("vtd-command", kubernetesConfiguration.getVtdCommandNotUseGpu());
|
|
|
+ String replace13 = replace12.replace("carsim-image", kubernetesConfiguration.getCarsimImage());
|
|
|
+ finalYaml = replace13.replace("carsim-command", kubernetesConfiguration.getCarsimCommand());
|
|
|
}
|
|
|
log.info("保存项目 " + projectId + " 的 yaml 文件:" + finalYaml);
|
|
|
FileUtil.writeStringToLocalFile(finalYaml, podYamlDirectory + podYaml);
|