Ver Fonte

修改dockerfile内容

wangyi há 2 anos atrás
pai
commit
74374550da

+ 3 - 2
src/main/java/io/renren/modules/kubesphere/controller/KubeSphereAlgorithmController.java

@@ -103,7 +103,8 @@ public class KubeSphereAlgorithmController {
         String DockerfileShell = "FROM "+harborUrl+"/library/python3_base:v1.0\n" +
                 "ENV CONFIG /\n" +
                 "COPY ./" + "%s" + " $CONFIG\n" +
-                "CMD [\"python\", \"" + "%s" + "\"]";
+                "ENTRYPOINT [\"python\",\"-u\", \"" + "%s" + "\"]";
+                //"ENTRYPOINT [\"nohup\","+"\"python\", \"" + "%s" + "\"]";
         //String[] shellArgs = {modelName, algorithmName, modelName};
         String[] shellArgs = {modelName, appFile, modelName};
         String DockerfilePath = tempFileLocation+"/Dockerfile";
@@ -206,7 +207,7 @@ public class KubeSphereAlgorithmController {
         String appDockerfileShell="FROM "+harborUrl+"/library/python3_base:v1.0\n" +
                 "ENV CONFIG /\n" +
                 "COPY ./" + "%s" + " $CONFIG\n" +
-                "CMD [\"python\", \"" + "%s" + "\"]";
+                "ENTRYPOINT [\"python\",\"-u\", \"" + "%s" + "\"]";
         String[] appShellArgs = {modelName, appFile, modelName};
         String appDockerfilePath=tempFileLocation+"/appDockerfile";
         JavaShellUtil.generate(appDockerfileShell, appShellArgs, appDockerfilePath);