0

我想从源代码构建 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

有谁知道如何解决这个问题?

非常感谢 :)

4

1 回答 1

0

您不必为了部署而构建Kubeflow。根据您的问题,您似乎想在单机/本地部署中部署 Kubeflow。Kubeflow 在 Kubernetes 之上运行。如果您想在本地尝试,最简单的方法是使用 Minikube ( https://www.kubeflow.org/docs/started/getting-started-minikube/ ) 或 MicroK8s ( https://www.kubeflow. org/docs/started/getting-started-multipass/)。你需要有一台合理大小的机器/笔记本电脑和一种运行虚拟机的方法。

于 2018-11-28T23:38:46.210 回答