|
|
|
@@ -73,6 +73,7 @@ public class JupyterServiceImpl implements JupyterService { |
|
|
|
V1PersistentVolumeClaim pvc = k8sClientUtil.createPvc(namespace, pvcName, storage,storageClassName); |
|
|
|
Integer podPort = k8sClientUtil.createPod(podName, namespace, port, mountPath, pvc, image); |
|
|
|
return masterIp + ":" + podPort; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
@Override |
|
|
|
@@ -84,12 +85,13 @@ public class JupyterServiceImpl implements JupyterService { |
|
|
|
|
|
|
|
// 提取数据集,模型信息,得到数据集模型的path |
|
|
|
Map<String, Object> dataset = JacksonUtil.parseJSONStr2Map(devEnvironment.getDataset()); |
|
|
|
String datasetPath = (String) dataset.get("path"); |
|
|
|
String datasetPath = "argo-workflow" + dataset.get("path"); |
|
|
|
|
|
|
|
Map<String, Object> model = JacksonUtil.parseJSONStr2Map(devEnvironment.getModel()); |
|
|
|
String modelPath = (String) model.get("path"); |
|
|
|
String modelPath = "argo-workflow" + model.get("path"); |
|
|
|
|
|
|
|
LoginUser loginUser = SecurityUtils.getLoginUser(); |
|
|
|
//手动构造pod名称 |
|
|
|
//构造pod名称 |
|
|
|
String podName = loginUser.getUsername().toLowerCase() +"-editor-pod" + "-" + id; |
|
|
|
String pvcName = loginUser.getUsername().toLowerCase() + "-editor-pvc"; |
|
|
|
//新建编辑器的pvc |
|
|
|
@@ -109,6 +111,7 @@ public class JupyterServiceImpl implements JupyterService { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@Override |
|
|
|
public String stopJupyterService(Integer id) throws Exception { |
|
|
|
DevEnvironment devEnvironment = this.devEnvironmentDao.queryById(id); |
|
|
|
|