Kubeflow:无法生成Makefile-目标“预提交”的配方失败

时间:2018-10-17 14:41:38

标签: ubuntu makefile kubernetes dockerfile kubeflow

我想从源代码构建kubeflow并将其部署在容器中。

我从这里开始使用了安装说明: https://www.kubeflow.org/docs/started/getting-started/

我得到的docker容器如下所示:

FROM ubuntu:16.04

ARG DOCKER_HOST=tcp://localhost:2375

RUN apt-get update
RUN apt-get install sudo
RUN sudo apt-get install -y curl gnupg apt-transport-https ca-certificates software-properties-common curl git bash make python wget autoconf

COPY . /usr/src/app
WORKDIR /usr/src/app
RUN ls

RUN wget https://dl.google.com/go/go1.11.1.linux-amd64.tar.gz && tar xvfz go1.11.1.linux-amd64.tar.gz && sudo chown -R root:root ./go && sudo mv go /usr/local && . env/.profile && . env/.bash_profile

RUN cd .. && chmod -R +x app && cd app
RUN make && sudo make install

RUN bash

RUN ./scripts/kfctl.sh init kfapp_config --platform none
RUN ./scripts/kfctl.sh generate k8s
RUN ./scripts/kfctl.sh apply k8s

除“ RUN make && sudo make install”部分外,所有内容均正常运行。 它失败并显示:

(...)
Boilerplate header is wrong for: /usr/src/app/bootstrap/cmd/bootstrap/app/options/options.go
Boilerplate header is wrong for: /usr/src/app/bootstrap/version/version.go
Makefile:17: recipe for target 'presubmit' failed
make: *** [presubmit] Error 1
The command '/bin/sh -c make && sudo make install' returned a non-zero code: 2
ERROR: Job failed: error executing remote command: command terminated with non-zero exit code: Error executing in Docker Container: 1

如果我跳过源代码的制作,则会在“ RUN ./scripts/kfctl.sh init kfapp_config --platform none”部分遇到以下错误:

(...)
+ check_install ks
+ which ks
+ echo 'You don'\''t have ks installed. Please install ks.'
You don't have ks installed. Please install ks.
+ exit 1
The command '/bin/sh -c ./scripts/kfctl.sh init kfapp_config --platform none' returned a non-zero code: 1
ERROR: Job failed: error executing remote command: command terminated with non-zero exit code: Error executing in Docker Container: 1

有人知道如何解决此问题吗?

非常感谢:)

1 个答案:

答案 0 :(得分:0)

您不必 build Kubeflow即可进行部署。根据您的问题,您似乎想在单个计算机/本地部署中部署Kubeflow。 Kubeflow在Kubernetes之上运行。如果要在本地尝试,最简单的方法是使用Minikube(https://www.kubeflow.org/docs/started/getting-started-minikube/)或MicroK8s(https://www.kubeflow.org/docs/started/getting-started-multipass/)。您需要具有合理大小的计算机/笔记本电脑以及运行VM的方式。