odps/mars_extension/legacy/deploy/app.py [76:106]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    def build_container(self):
        container_config = super().build_container()
        container_config.update({"enableChannel": True, "enableNativeLib": True})
        if self._container_port is not None:
            container_config["ports"] = {
                "containerPort": int(self._container_port),
            }
        return container_config

    def build_template_spec(self):
        spec_config = super().build_template_spec()
        if os.environ.get("VM_ENGINE_TYPE") == "hyper":
            spec_config.update({"restartPolicy": "Never"})
        else:
            spec_config.update({"hostNetwork": True, "restartPolicy": "Never"})
        return spec_config

    def config_readiness_probe(self):
        return None

    def build(self):
        result = super().build()
        with open("pod_%s.json" % self.rc_name, "w") as pod_file:
            pod_file.write(json.dumps(result, indent=2, sort_keys=True))
        return result

    def remove_env(self, name):
        try:
            super().remove_env(name)
        except AttributeError:
            self._envs.pop(name, None)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



odps/mars_extension/oscar/deploy/app.py [77:107]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    def build_container(self):
        container_config = super().build_container()
        container_config.update({"enableChannel": True, "enableNativeLib": True})
        if self._container_port is not None:
            container_config["ports"] = {
                "containerPort": int(self._container_port),
            }
        return container_config

    def build_template_spec(self):
        spec_config = super().build_template_spec()
        if os.environ.get("VM_ENGINE_TYPE") == "hyper":
            spec_config.update({"restartPolicy": "Never"})
        else:
            spec_config.update({"hostNetwork": True, "restartPolicy": "Never"})
        return spec_config

    def config_readiness_probe(self):
        return None

    def build(self):
        result = super().build()
        with open("pod_%s.json" % self.rc_name, "w") as pod_file:
            pod_file.write(json.dumps(result, indent=2, sort_keys=True))
        return result

    def remove_env(self, name):
        try:
            super().remove_env(name)
        except AttributeError:
            self._envs.pop(name, None)
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



