|
|
|
@@ -366,7 +366,7 @@ public class K8sClientUtil { |
|
|
|
.endContainer() |
|
|
|
.addNewVolume() |
|
|
|
.withName("workspace") |
|
|
|
.withHostPath(new V1HostPathVolumeSource().path(hostPath + "/" + podName + "/tensorboard").type("DirectoryOrCreate")) |
|
|
|
.withHostPath(new V1HostPathVolumeSource().path(pvcName).type("DirectoryOrCreate")) |
|
|
|
// .withPersistentVolumeClaim(new V1PersistentVolumeClaimVolumeSource().claimName(pvcName)) |
|
|
|
.endVolume() |
|
|
|
.withTerminationGracePeriodSeconds(14400L) |
|
|
|
@@ -452,13 +452,12 @@ public class K8sClientUtil { |
|
|
|
// 配置卷和卷挂载 |
|
|
|
List<V1VolumeMount> volumeMounts = new ArrayList<>(); |
|
|
|
volumeMounts.add(new V1VolumeMount().name("workspace").mountPath("/opt/notebooks")); |
|
|
|
volumeMounts.add(new V1VolumeMount().name("dataset").mountPath("/opt/dataset").readOnly(true)); |
|
|
|
volumeMounts.add(new V1VolumeMount().name("model").mountPath("/opt/model").readOnly(true)); |
|
|
|
volumeMounts.add(new V1VolumeMount().name("data").mountPath("/opt/dataset").subPath(datasetPath).readOnly(true)); |
|
|
|
volumeMounts.add(new V1VolumeMount().name("data").mountPath("/opt/model").subPath(modelPath).readOnly(true)); |
|
|
|
|
|
|
|
List<V1Volume> volumes = new ArrayList<>(); |
|
|
|
volumes.add(new V1Volume().name("workspace").hostPath(new V1HostPathVolumeSource().path(hostPath + "/" + podName + "/notebooks").type("DirectoryOrCreate"))); |
|
|
|
volumes.add(new V1Volume().name("dataset").hostPath(new V1HostPathVolumeSource().path(hostPath + "/" + podName + "/dataset").type("DirectoryOrCreate"))); |
|
|
|
volumes.add(new V1Volume().name("model").hostPath(new V1HostPathVolumeSource().path(hostPath + "/" + podName + "/model").type("DirectoryOrCreate"))); |
|
|
|
volumes.add(new V1Volume().name("data").hostPath(new V1HostPathVolumeSource().path(hostPath).type("DirectoryOrCreate"))); |
|
|
|
|
|
|
|
// 配置卷和卷挂载 |
|
|
|
// List<V1VolumeMount> volumeMounts = new ArrayList<>(); |
|
|
|
|