Configure Custom Kale Python Image¶
This guide will walk you through how to configure Kale to use your custom Python image for its various operations, such as HP tuning.
Overview
What You’ll Need¶
- A configured management environment.
- Your clone of the Arrikto GitOps repository.
- An existing Kubeflow deployment.
- A custom Python image.
Procedure¶
Go to your GitOps repository, inside your rok-tools management environment:
root@rok-tools:~# cd ~/ops/deploymentsNavigate to the
deploy
overlay of theskel-resources
kustomization:root@rok-tools:~/ops/deployments# cd kubeflow/manifests/common/skel-resources/overlays/deployEdit
patches/ppoddefault-kale-python-image.yaml
and set the value ofKALE_PYTHON_IMAGE
of thekale-python-image
PodDefault to your custom Python image, for example,kale-python-custom:1234
:apiVersion: kubeflow.org/v1alpha1 kind: PodDefault metadata: name: kale-python-image spec: env: - name: KALE_PYTHON_IMAGE value: "kale-python-custom:1234" # <-- edit this lineInclude the PodDefault patch in the overlay:
root@rok-tools:~/ops/deployments/kubeflow/manifests/common/skel-resources/overlays/deploy# kustomize \ > edit add patch patches/poddefault-kale-python-image.yamlReturn to the base directory of your GitOps repository, inside your
rok-tools
management environment:root@rok-tools:~/ops/deployments/kubeflow/manifests/common/skel-resources/overlays/deploy# cd ~/ops/deploymentsCommit changes:
root@rok-tools:~/ops/deployments# git commit -am "Configue custom Kale Python image"Apply changes:
root@rok-tools:~/ops/deployments# rok-deploy --apply kubeflow/manifests/common/skel-resources/overlays/deployOptional
Follow the Extend List of JWA Preselected Configurations guide to configure JWA to enable this configuration by default for all new Notebooks. Users can always enable or disable this when creating a new Notebook.
Verify¶
Retrieve the PodDefault in the
kubeflow-skel
namespace and ensure it mentions your image:root@rok-tools:~# kubectl get -n kubeflow-user poddefault \ > kale-python-image -o json | jq -r ".spec.env" [ { "name": "KALE_PYTHON_IMAGE", "value": "kale-python-custom:1234" } ]
What’s Next¶
Check out the rest of the operations you can perform on your Kubeflow deployment.