<jupyter_start><jupyter_text>Train and deploy with private registry on Kubeflow from Notebooks In order to use a private registry in fairing append builder on the Jupyter notebook, two settings are required.- Copy the .docker/config.json containing the private registry connection information to /home/jovyan/.docker/config.json on Jupyter-notebook container for docker-image-push by the append builder.    ```     under docker client environ.    $ docker login     $ cat ~/.docker/config.json           in notebook console    $ mkdir /home/jovyan/.docker    $ vi /home/jovyan/.docker/config.json    ```-  Patch imagePullSecrets on the service account so that the deployer can pull the private registry image.    ```     in current context(or in notebook console)    $ kubectl create secret generic regcred --from-file=.dockerconfigjson=/home/${USER}/.docker/config.json \    --type=kubernetes.io/dockerconfigjson -n anonymous      $ kubectl patch serviceaccount default -p '{"imagePullSecrets": [{"name": "regcred"}]}' -n anonymous    ```<jupyter_code>import os
from kubeflow import fairing
import time
DOCKER_REGISTRY = '<private_registry>'
fairing.config.set_builder('append',base_image='gcr.io/kubeflow-images-public/tensorflow-1.14.0-notebook-cpu:v0.7.0', registry=DOCKER_REGISTRY, push=True)
fairing.config.set_deployer('job')
def train():
    print("hello world!")
# Training on notebook 
train()
# Training on current kubernetes context.
remote_train = fairing.config.fn(train)
remote_train()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.10588235294117647, 'fraction_numerical': 0.004575163398692811, 'mean_word_length': 4.5071942446043165, 'pattern_counts': {'":': 2, '<': 6, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '295213', 'license': 'Apache-2.0', 'n_tokens_mistral': 471, 'n_tokens_neox': 446, 'n_words': 135, 'path': 'examples/notebook/hello-world-with-private-registry.ipynb', 'repo_name': 'yashjakhotiya/fairing', 'size': '1530'}