Kubeflow: Not able to build Makefile - recipe for target 'presubmit' failed

10/17/2018

I want to build kubeflow from source and deploy it in a container.

I used the setup instructions from over here: https://www.kubeflow.org/docs/started/getting-started/

My resulting docker container looks like this:

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

Everythings works except the "RUN make && sudo make install" part. It fails with:

(...)
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

If I skip the making of the source, I encounter the following error at the part "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

Does anyone has an idea on how to address this issue?

Thanks a lot :)

-- tech34841916559242495
dockerfile
kubeflow
kubernetes
makefile
ubuntu

1 Answer

11/28/2018

You shouldn't have to build Kubeflow in order to deploy. Based on your question it looks like you want to deploy Kubeflow in a single machine/local deployment. Kubeflow runs on top of Kubernetes. If you want to try it locally, the easiest way to do that is using Minikube (https://www.kubeflow.org/docs/started/getting-started-minikube/) or MicroK8s (https://www.kubeflow.org/docs/started/getting-started-multipass/). You'd need to have a reasonable sized machine/laptop and a way to run VMs.

-- Abhishek Gupta
Source: StackOverflow