Kubeflow needs to be pre-installed in the cluster.
A Knative Build controller needs to be deployed in the cluster beforehand to handle in-cluster builds.
See: Installing Knative Build Component
A secret needs to be created to allow Knative to push to your registry
apiVersion: v1
kind: Secret
metadata:
name: fairing-build
annotations:
build.knative.dev/docker-0: https://index.docker.io/v1/
type: kubernetes.io/basic-auth
data:
username: <registry username>
password: <registry password>
apiVersion: v1
kind: ServiceAccount
metadata:
name: fairing-build
secrets:
- name: fairing-build
A RWX
(Read Write Many) PVC named fairing-build
also needs to be created beforehand.
This allows the container hosting the notebook and the container doing the image build to share the needed context.
For example, on Azure such a PVC can be created using Azure Files.
Finally, the fairing-build
PVC needs to be mounted into the container that hosts the Jupyter notebook at /{USER}/.fairing/build-contexts
.
For example:
containers:
- name: jupyter-tf
image: wbuchwalter/fairing-jupyter
volumeMounts:
- name: src
mountPath: /root/.fairing/build-contexts
volumes:
- name: src
persistentVolumeClaim:
claimName: fairing-build