<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Kubeflow – Fairing</title>
    <link>/docs/components/fairing/</link>
    <description>Recent content in Fairing on Kubeflow</description>
    <generator>Hugo -- gohugo.io</generator>
    <language>en-us</language>
    
	  <atom:link href="/docs/components/fairing/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Docs: Overview of Kubeflow Fairing</title>
      <link>/docs/components/fairing/fairing-overview/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/fairing/fairing-overview/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Out of date&lt;/h4&gt;
This guide contains outdated information pertaining to Kubeflow 1.0. This guide
needs to be updated for Kubeflow 1.1.
&lt;/div&gt;

&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;
  &lt;h4 class=&#34;alert-heading&#34;&gt;Beta&lt;/h4&gt;
  This Kubeflow component has &lt;b&gt;beta&lt;/b&gt; status. See the
  &lt;a href=&#34;/docs/reference/version-policy/&#34;&gt;Kubeflow versioning policies&lt;/a&gt;.
  The Kubeflow team is interested in your   
  &lt;a href=&#34;https://github.com/kubeflow/fairing/issues&#34;&gt;feedback&lt;/a&gt;&lt;/h4&gt; 
  about the usability of the feature.
&lt;/div&gt;
&lt;p&gt;Kubeflow Fairing streamlines the process of building, training, and deploying
machine learning (ML) training jobs in a hybrid cloud environment. By using
Kubeflow Fairing and adding a few lines of code, you can run your ML training
job locally or in the cloud, directly from Python code or a Jupyter
notebook. After your training job is complete, you can use Kubeflow Fairing to
deploy your trained model as a prediction endpoint.&lt;/p&gt;
&lt;h2 id=&#34;getting-started&#34;&gt;Getting started&lt;/h2&gt;
&lt;p&gt;Use the following guides to get started with Kubeflow Fairing:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;To set up your development environment, follow the guide to &lt;a href=&#34;/docs/components/fairing/install-fairing/&#34;&gt;installing
Kubeflow Fairing&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;To ensure that Kubeflow Fairing can access your Kubeflow cluster, follow
the guide to &lt;a href=&#34;/docs/components/fairing/configure-fairing/&#34;&gt;configuring your development environment with access
to Kubeflow&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;To learn more about how to use Kubeflow Fairing in your environment,
&lt;a href=&#34;/docs/components/fairing/tutorials/other-tutorials/&#34;&gt;follow the Kubeflow Fairing tutorials&lt;/a&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;what-is-kubeflow-fairing&#34;&gt;What is Kubeflow Fairing?&lt;/h2&gt;
&lt;p&gt;Kubeflow Fairing is a Python package that makes it easy to train and deploy ML
models on &lt;a href=&#34;/docs/about/kubeflow/&#34;&gt;Kubeflow&lt;/a&gt;. Kubeflow Fairing can also been extended to
train or deploy on other platforms. Currently, Kubeflow Fairing has been
extended to train on &lt;a href=&#34;https://cloud.google.com/ml-engine/docs/&#34;&gt;Google AI Platform&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Kubeflow Fairing packages your Jupyter notebook, Python function, or Python
file as a Docker image, then deploys and runs the training job on Kubeflow
or AI Platform. After your training job is complete, you can use Kubeflow
Fairing to deploy your trained model as a prediction endpoint on Kubeflow.&lt;/p&gt;
&lt;p&gt;The following are the goals of the &lt;a href=&#34;https://github.com/kubeflow/fairing&#34;&gt;Kubeflow Fairing project&lt;/a&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Easily package ML training jobs:&lt;/strong&gt; Enable ML practitioners to easily package their ML model training code, and their code&amp;rsquo;s dependencies, as a Docker image.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Easily train ML models in a hybrid cloud environment:&lt;/strong&gt; Provide a high-level API for training ML models to make it easy to run training jobs in the cloud, without needing to understand the underlying infrastructure.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Streamline the process of deploying a trained model:&lt;/strong&gt; Make it easy for ML practitioners to deploy trained ML models to a hybrid cloud environment.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;Next steps&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Learn how to &lt;a href=&#34;/docs/notebooks/setup/&#34;&gt;set up a Jupyter notebooks instance on your Kubeflow
cluster&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Install Kubeflow Fairing</title>
      <link>/docs/components/fairing/install-fairing/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/fairing/install-fairing/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Out of date&lt;/h4&gt;
This guide contains outdated information pertaining to Kubeflow 1.0. This guide
needs to be updated for Kubeflow 1.1.
&lt;/div&gt;

&lt;p&gt;You can use Kubeflow Fairing to build, train, and deploy machine learning (ML)
models in a hybrid cloud environment directly from Python code or a Jupyter
notebook. This guide describes how to install Kubeflow Fairing in your
development environment for &lt;a href=&#34;#set-up-kubeflow-fairing-for-local-development&#34;&gt;local development&lt;/a&gt;, or &lt;a href=&#34;#set-up-kubeflow-fairing-in-a-hosted-jupyter-notebook&#34;&gt;development in a
hosted notebook&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;using-kubeflow-fairing-with-kubeflow-notebooks&#34;&gt;Using Kubeflow Fairing with Kubeflow notebooks&lt;/h2&gt;
&lt;p&gt;Kubeflow notebook servers that are built from one of the standard Jupyter
Docker images include Kubeflow Fairing and come preconfigured for using
Kubeflow Fairing to run training jobs on your Kubeflow cluster.&lt;/p&gt;
&lt;p&gt;If you use a Kubeflow notebook server that was built from a custom Jupyter
Docker image as your development environment, follow the instruction on
&lt;a href=&#34;#set-up-kubeflow-fairing-in-a-hosted-jupyter-notebook&#34;&gt;setting up Kubeflow Fairing in a hosted notebook environment&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;set-up-kubeflow-fairing-for-local-development&#34;&gt;Set up Kubeflow Fairing for local development&lt;/h2&gt;
&lt;p&gt;Follow these instructions to set up Kubeflow Fairing for local development.
This guide has been tested on Linux and Mac OS X. Currently, this guide has
not been tested on Windows.&lt;/p&gt;
&lt;h3 id=&#34;set-up-python&#34;&gt;Set up Python&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;You need &lt;strong&gt;Python 3.6&lt;/strong&gt; or later to use Kubeflow Fairing. To check if
you have Python 3.6 or later installed, run the following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;python3 -V
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The response should be something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Python 3.6.5
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;If you do not have Python 3.6 or later, you can &lt;a href=&#34;https://www.python.org/downloads/&#34;&gt;download
Python&lt;/a&gt; from the Python Software
Foundation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use virtualenv to create a virtual environment to install Kubeflow
Fairing in. To check if you have virtualenv installed, run the
following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;which virtualenv
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The response should be something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;/usr/bin/virtualenv
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you do not have virtualenv, use pip3 to install virtualenv.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;pip3 install virtualenv
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Create a new virtual environment, and activate it.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;virtualenv venv --python&lt;span style=&#34;color:#ce5c00;font-weight:bold&#34;&gt;=&lt;/span&gt;python3
&lt;span style=&#34;color:#204a87&#34;&gt;source&lt;/span&gt; venv/bin/activate
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;install-kubeflow-fairing&#34;&gt;Install Kubeflow Fairing&lt;/h3&gt;
&lt;p&gt;Run the following command to install Kubeflow Fairing in your virtual
environment.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;pip install kubeflow-fairing
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After the install is complete, the &lt;code&gt;fairing&lt;/code&gt; python package is
available. Run the following command to verify that Kubeflow Fairing
is installed:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;pip show kubeflow-fairing
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The response should be something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Name: kubeflow-fairing
Version: 0.6.0
Summary: Kubeflow Fairing Python SDK.
Home-page: https://github.com/kubeflow/fairing
Author: Kubeflow Authors
Author-email: hejinchi@cn.ibm.com
License: Apache License Version 2.0
Location: &amp;lt;path-to-kubeflow-fairing&amp;gt;
Requires: notebook, future, docker, tornado, cloudpickle, oauth2client, numpy, requests, setuptools, httplib2, google-auth, google-api-python-client, urllib3, boto3, azure, six, kubernetes, google-cloud-storage
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;docker-setup&#34;&gt;Docker setup&lt;/h3&gt;
&lt;p&gt;Kubeflow Fairing uses Docker to package your code. Run the following command
to verify if Docker is installed and running:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;docker ps
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;If you receive the &lt;code&gt;docker: command not found&lt;/code&gt; message, &lt;a href=&#34;https://docs.docker.com/install/&#34;&gt;install
Docker&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;If you receive the &lt;code&gt;Error response from daemon: Bad response from Docker engine&lt;/code&gt; message, &lt;a href=&#34;https://docs.docker.com/config/daemon/#start-the-daemon-manually&#34;&gt;restart your docker daemon&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;If you are using Linux and you use sudo to access Docker, follow these
steps to &lt;a href=&#34;https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user&#34;&gt;add your user to the docker group&lt;/a&gt;. Note, the
docker group grants privileges equivalent to the root user. To learn more
about how this affects security in your system, see the guide to the
&lt;a href=&#34;https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface&#34;&gt;Docker daemon attack surface&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 id=&#34;configure-kubeflow-fairing&#34;&gt;Configure Kubeflow Fairing&lt;/h3&gt;
&lt;p&gt;To configure Kubeflow Fairing with access to an environment that you would like to
use for training and deployment, follow the instructions in the &lt;a href=&#34;/docs/components/fairing/configure-fairing/&#34;&gt;guide to
configuring Kubeflow Fairing&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;set-up-kubeflow-fairing-in-a-hosted-jupyter-notebook&#34;&gt;Set up Kubeflow Fairing in a hosted Jupyter notebook&lt;/h2&gt;
&lt;p&gt;Follow these instructions to set up Kubeflow Fairing in a hosted Jupyter
notebook.&lt;/p&gt;
&lt;p&gt;If you are using a Kubeflow notebook server that was built from one of the
standard Jupyter Docker images, your notebooks environment has been
preconfigured for training and deploying ML models with Kubeflow Fairing and
no additional installation steps are required.&lt;/p&gt;
&lt;h3 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h3&gt;
&lt;p&gt;Check the following prerequisites to verify that Kubeflow Fairing is compatible
with your hosted notebook environment.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;In the Jupyter notebooks user interface, click &lt;strong&gt;File&lt;/strong&gt; &amp;gt; &lt;strong&gt;New&lt;/strong&gt; &amp;gt;
&lt;strong&gt;Terminal&lt;/strong&gt; in the menu to start a new terminal session in your notebook
environment.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;You need &lt;strong&gt;Python 3.6&lt;/strong&gt; or later to use Kubeflow Fairing. To check if you
have Python 3.6 or later installed, run the following command in your
terminal session:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;python3 -V
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The response should be something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Python 3.6.5
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Kubeflow Fairing uses Docker to package your code. Run the following
command in your terminal session to verify if Docker is installed and
running in your notebook environment:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;docker ps
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;ul&gt;
&lt;li&gt;If you receive the &lt;code&gt;docker: command not found&lt;/code&gt; message, &lt;a href=&#34;https://docs.docker.com/install/&#34;&gt;install
Docker&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;If you receive the &lt;code&gt;Error response from daemon: Bad response from Docker engine&lt;/code&gt; message, &lt;a href=&#34;https://docs.docker.com/config/daemon/#start-the-daemon-manually&#34;&gt;restart your docker daemon&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;If you are using Linux and you use sudo to access Docker, follow these
steps to &lt;a href=&#34;https://docs.docker.com/install/linux/linux-postinstall/#manage-docker-as-a-non-root-user&#34;&gt;add your user to the docker group&lt;/a&gt;. Note, the
docker group grants privileges equivalent to the root user. To learn
more about how this affects security in your system, see the guide to
the &lt;a href=&#34;https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface&#34;&gt;Docker daemon attack surface&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;install-kubeflow-fairing-1&#34;&gt;Install Kubeflow Fairing&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;In the Jupyter notebooks user interface, click &lt;strong&gt;File&lt;/strong&gt; &amp;gt; &lt;strong&gt;New&lt;/strong&gt; &amp;gt;
&lt;strong&gt;Terminal&lt;/strong&gt; in the menu to start a new terminal session in your notebook
environment.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the following command to install Kubeflow Fairing.&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;pip3 install kubeflow-fairing
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;After successful installation, the &lt;code&gt;fairing&lt;/code&gt; python package should be
available. Run the following command to verify that Kubeflow Fairing
is installed:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;pip3 show kubeflow-fairing
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The response should be something like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Name: kubeflow-fairing
Version: 0.6.0
Summary: Kubeflow Fairing Python SDK.
Home-page: https://github.com/kubeflow/fairing
Author: Kubeflow Authors
Author-email: hejinchi@cn.ibm.com
License: Apache License Version 2.0
Location: &amp;lt;path-to-kubeflow-fairing&amp;gt;
Requires: notebook, future, docker, tornado, cloudpickle, oauth2client, numpy, requests, setuptools, httplib2, google-auth, google-api-python-client, urllib3, boto3, azure, six, kubernetes, google-cloud-storage
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id=&#34;configure-kubeflow-fairing-1&#34;&gt;Configure Kubeflow Fairing&lt;/h3&gt;
&lt;p&gt;To configure Kubeflow Fairing with access to the environment you would like to
use for training and deployment, follow the instructions in the guide to
&lt;a href=&#34;/docs/components/fairing/configure-fairing/&#34;&gt;configuring Kubeflow Fairing&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;Next steps&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;/docs/components/fairing/configure-fairing/&#34;&gt;Configure your Kubeflow Fairing development environment&lt;/a&gt; with access
to run training jobs remotely.&lt;/li&gt;
&lt;li&gt;Follow the &lt;a href=&#34;/docs/components/fairing/tutorials/other-tutorials/&#34;&gt;samples and tutorials&lt;/a&gt; to learn more about how to run
training jobs remotely with Kubeflow Fairing.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Configure Kubeflow Fairing</title>
      <link>/docs/components/fairing/configure-fairing/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/fairing/configure-fairing/</guid>
      <description>
        
        
        

&lt;div class=&#34;alert alert-warning&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;alert-heading&#34;&gt;Out of date&lt;/h4&gt;
This guide contains outdated information pertaining to Kubeflow 1.0. This guide
needs to be updated for Kubeflow 1.1.
&lt;/div&gt;

&lt;p&gt;In order to use Kubeflow Fairing to train or deploy a machine learning
model on Kubeflow, you must configure your development environment with access
to your container image registry and your Kubeflow cluster. This guide
describes how to configure Kubeflow Fairing to run training jobs on Kubeflow.&lt;/p&gt;
&lt;p&gt;Additional configuration steps are required to access Kubeflow when it is hosted on a cloud
environment. Use the following guides to configure Kubeflow Fairing with access
to your hosted Kubeflow environment.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;To use Kubeflow Fairing to train and deploy on Kubeflow on Google Kubernetes
Engine, follow the guide to &lt;a href=&#34;/docs/components/fairing/gcp/configure-gcp/&#34;&gt;configuring Kubeflow Fairing with access to
Google Cloud Platform&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Before you configure Kubeflow Fairing, you must have a Kubeflow environment
and Kubeflow Fairing installed in your development environment.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you do not have a Kubeflow cluster, follow the &lt;a href=&#34;/docs/started/getting-started/&#34;&gt;getting started
with Kubeflow&lt;/a&gt; guide to set one up.&lt;/li&gt;
&lt;li&gt;If you have not installed Kubeflow Fairing, follow the &lt;a href=&#34;/docs/components/fairing/install-fairing/&#34;&gt;installing
Kubeflow Fairing&lt;/a&gt; guide.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;using-kubeflow-fairing-with-kubeflow-notebooks&#34;&gt;Using Kubeflow Fairing with Kubeflow notebooks&lt;/h2&gt;
&lt;p&gt;The standard Kubeflow notebook images include Kubeflow Fairing and come
preconfigured to run training jobs on your Kubeflow cluster. No additional
configuration is required.&lt;/p&gt;
&lt;p&gt;If you built your Kubeflow notebook server from a custom Jupyter Docker image,
follow the instruction in this guide to configure your notebooks environment
with access to your Kubeflow environment.&lt;/p&gt;
&lt;h2 id=&#34;configure-docker-with-access-to-your-container-image-registry&#34;&gt;Configure Docker with access to your container image registry&lt;/h2&gt;
&lt;p&gt;Authorize Docker to access your container image registry by following the
instructions in the &lt;a href=&#34;https://docs.docker.com/engine/reference/commandline/login/&#34;&gt;&lt;code&gt;docker login&lt;/code&gt; reference guide&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;configure-access-to-your-kubeflow-cluster&#34;&gt;Configure access to your Kubeflow cluster&lt;/h2&gt;
&lt;p&gt;Use the following instructions to configure &lt;code&gt;kubeconfig&lt;/code&gt; with access to your
Kubeflow cluster.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Kubeflow Fairing uses &lt;code&gt;kubeconfig&lt;/code&gt; to access your Kubeflow cluster. This
guide uses &lt;code&gt;kubectl&lt;/code&gt; to set up your &lt;code&gt;kubeconfig&lt;/code&gt;. To check if you have
&lt;code&gt;kubectl&lt;/code&gt; installed, run the following command:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;which kubectl
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;The response should be something like this:&lt;/p&gt;
&lt;div class=&#34;highlight&#34;&gt;&lt;pre style=&#34;background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4&#34;&gt;&lt;code class=&#34;language-bash&#34; data-lang=&#34;bash&#34;&gt;/usr/bin/kubectl
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;If you do not have &lt;code&gt;kubectl&lt;/code&gt; installed, follow the instructions in the
guide to &lt;a href=&#34;https://kubernetes.io/docs/tasks/tools/install-kubectl/&#34;&gt;installing and setting up kubectl&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Follow the &lt;a href=&#34;https://kubernetes.io/docs/reference/access-authn-authz/authentication/&#34;&gt;guide to configuring access to Kubernetes
clusters&lt;/a&gt;, to update your &lt;code&gt;kubeconfig&lt;/code&gt; with appropriate
credentials and endpoint information to access your Kubeflow cluster.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;next-steps&#34;&gt;Next steps&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;Follow the &lt;a href=&#34;/docs/components/fairing/tutorials/other-tutorials/&#34;&gt;samples and tutorials&lt;/a&gt; to learn more about how to run
training jobs remotely with Kubeflow Fairing.&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Fairing on Azure</title>
      <link>/docs/components/fairing/azure/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/fairing/azure/</guid>
      <description>
        
        
        &lt;p&gt;This page documents how to run the &lt;a href=&#34;https://github.com/kubeflow/fairing/blob/master/examples/prediction/xgboost-high-level-apis.ipynb&#34;&gt;Fairing prediction example
notebook&lt;/a&gt; on &lt;a href=&#34;https://azure.microsoft.com/en-in/services/kubernetes-service/&#34;&gt;Azure Kubernetes Service
(AKS)&lt;/a&gt; in a notebook hosted on Kubeflow.&lt;/p&gt;
&lt;h2 id=&#34;prerequisites&#34;&gt;Prerequisites&lt;/h2&gt;
&lt;p&gt;Before you configure and use the Kubeflow Fairing Python SDK, you must have a
Kubeflow environment installed. The example notebook does in-cluster training.
The example notebook has been tested to work in a cluster with 2 nodes and
virtual machines with Standard_D4_v3 size. It is not recommended to use the
smallest size virtual machines.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;If you do not have a Kubeflow installation on Azure, follow the &lt;a href=&#34;/docs/azure/deploy/install-kubeflow&#34;&gt;installation
guide&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;You must have the &lt;code&gt;kubectl&lt;/code&gt; command line interface installed and configured
to use the Kubernetes cluster where Kubeflow is installed. In the above
installation guide, the command &lt;code&gt;az aks get-credentials&lt;/code&gt; configures &lt;code&gt;kubectl&lt;/code&gt;
to access your Kubernetes cluster.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;create-azure-container-registry-and-storage&#34;&gt;Create Azure Container Registry and Storage&lt;/h2&gt;
&lt;p&gt;The example notebook uses Azure Container Registry (ACR) to host docker
images for deployment and Azure Storage (Storage) is used as build context for
in-cluster building.&lt;/p&gt;
&lt;p&gt;You can re-use existing ACR and Storage resources or create new ones. For more
information, see the documentation for &lt;a href=&#34;https://docs.microsoft.com/en-us/azure/container-registry/&#34;&gt;ACR&lt;/a&gt; and
&lt;a href=&#34;https://docs.microsoft.com/en-us/azure/storage/&#34;&gt;Storage&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;After you have created your ACR and Storage resources, you must configure a
service principal with access to these resources.&lt;/p&gt;
&lt;p&gt;You can create a new service principal with the following command:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;az ad sp create-for-rbac --name &amp;lt;name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The above command has output like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{
  &amp;quot;appId&amp;quot;: &amp;quot;&amp;lt;client-id&amp;gt;&amp;quot;,
  &amp;quot;displayName&amp;quot;: &amp;quot;&amp;lt;name&amp;gt;&amp;quot;,
  &amp;quot;name&amp;quot;: &amp;quot;http://&amp;lt;name&amp;gt;&amp;quot;,
  &amp;quot;password&amp;quot;: &amp;quot;&amp;lt;client-secret&amp;gt;&amp;quot;,
  &amp;quot;tenant&amp;quot;: &amp;quot;&amp;lt;tenant-id&amp;gt;&amp;quot;
}
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The role you grant must have at least read and write permissions to ACR and
Storage. We recommend using the &lt;code&gt;AcrPush&lt;/code&gt; role and the &lt;code&gt;Storage Account Contributor&lt;/code&gt; role scoped to a resource group.&lt;/p&gt;
&lt;p&gt;You can perform the role assignment for ACR like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;az role assignment create --assignee &amp;lt;id&amp;gt; \
  --scope /subscriptions/&amp;lt;azure-subscription-id&amp;gt;/resourceGroups/&amp;lt;resource-group-name&amp;gt;/providers/Microsoft.ContainerRegistry/registries/&amp;lt;acr-name&amp;gt; \
  --role &amp;quot;AcrPush&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;You can grant full storage rights at a resource group level like this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;az role assignment create --assignee &amp;lt;id&amp;gt; \
  --scope /subscriptions/&amp;lt;azure-subscription-id&amp;gt;/resourceGroups/&amp;lt;resource-group-name&amp;gt; \
  --role &amp;quot;Storage Account Contributor&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;To learn more about how to grant the service principal access, follow the
&lt;a href=&#34;https://docs.microsoft.com/en-us/azure/role-based-access-control/role-assignments-portal&#34;&gt;Azure role-based authentication documentation&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;setting-up-credentials-as-kubernetes-secrets&#34;&gt;Setting up credentials as Kubernetes secrets&lt;/h2&gt;
&lt;p&gt;Before running the notebook, you must first configure credentials so that the
Python code running within the cluster can access the Azure resources required
to train and deploy a model.&lt;/p&gt;
&lt;p&gt;Run the following commands to set up your credentials as a Kubernetes secret.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Set environment variables to use in the following commands.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export AZ_CLIENT_ID=&amp;lt;service-principal-client-id&amp;gt;
export AZ_CLIENT_SECRET=&amp;lt;service-principal-client-secret&amp;gt;
export AZ_TENANT_ID=&amp;lt;tenant-id&amp;gt;
export AZ_SUBSCRIPTION_ID=&amp;lt;subscription-id&amp;gt;
export TARGET_NAMESPACE=&amp;lt;target-namespace e.g. kubeflow-anonymous&amp;gt;
export ACR_NAME=&amp;lt;acr-name&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;AZ_CLIENT_ID:&lt;/strong&gt; The service principal client ID. You can get the
&lt;code&gt;client_id&lt;/code&gt; property from ~/.azure/aksServicePrincipal.json.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AZ_CLIENT_SECRET:&lt;/strong&gt; The service principal secret.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AZ_TENANT_ID:&lt;/strong&gt; The Azure Tenant ID of your account. You can get the
Tenant ID from the &lt;code&gt;tenantId&lt;/code&gt; field in the output of &lt;code&gt;az account show&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;AZ_SUBSCRIPTION:&lt;/strong&gt; The Azure Subscription ID of your account. You can
get the Subscription ID from the &lt;code&gt;id&lt;/code&gt; field in the output of &lt;code&gt;az account show&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;TARGET_NAMESPACE:&lt;/strong&gt; Specify the namespace that your Notebook Server is
in. For example, this guide recommends using &lt;code&gt;kubeflow-anonymous&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;ACR_NAME:&lt;/strong&gt; The name of an ACR that the service principal can access.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the following command to create a secret that Kubeflow can use to access
Azure APIs.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;kubectl create secret generic -n ${TARGET_NAMESPACE} azcreds \
--from-literal=AZ_CLIENT_ID=${AZ_CLIENT_ID} \
--from-literal=AZ_CLIENT_SECRET=${AZ_CLIENT_SECRET} \
--from-literal=AZ_TENANT_ID=${AZ_TENANT_ID} \
--from-literal=AZ_SUBSCRIPTION_ID=${AZ_SUBSCRIPTION_ID}
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use the following command to create a secret that Kubeflow can use to access
ACR.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;kubectl create secret docker-registry -n ${TARGET_NAMESPACE} acrcreds \
--docker-server=${ACR_NAME}.azurecr.io \
--docker-username=${AZ_CLIENT_ID} \
--docker-password=${AZ_CLIENT_SECRET}
kubectl patch serviceaccount default-editor -n ${TARGET_NAMESPACE} \
-p &amp;quot;{\&amp;quot;imagePullSecrets\&amp;quot;: [{\&amp;quot;name\&amp;quot;: \&amp;quot;acrcreds\&amp;quot;}]}&amp;quot;
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;h2 id=&#34;creating-a-notebook-server-in-kubeflow&#34;&gt;Creating a Notebook Server in Kubeflow&lt;/h2&gt;
&lt;p&gt;To create a notebook server, use your Web browser to access the Kubeflow
Central Dashboard and select the &lt;strong&gt;Notebook Servers&lt;/strong&gt; panel from the menu.&lt;/p&gt;
&lt;p&gt;First, select the target namespace in which you want to host the server. In the
default Kubeflow installation, there should be a namespace &lt;code&gt;kubeflow-anonymous&lt;/code&gt;
available in the namespace drop-down menu.&lt;/p&gt;
&lt;p&gt;After the target namespace is selected, click &lt;strong&gt;NEW SERVER&lt;/strong&gt; and fill in the
mandatory fields. The fields with default values can all be left as they
are and do not have to be modified to run the example notebook.&lt;/p&gt;
&lt;p&gt;After launching the server, wait for the &lt;strong&gt;CONNECT&lt;/strong&gt; button to appear and click
&lt;strong&gt;CONNECT&lt;/strong&gt; to launch your Notebook Server. It may take up to a minute for the
server to be ready for connections.&lt;/p&gt;
&lt;h2 id=&#34;cloning-the-example-notebook&#34;&gt;Cloning the example notebook&lt;/h2&gt;
&lt;p&gt;Clone the Kubeflow Fairing repository to download the files used in this example.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Connect to your notebook server, then click the new terminal option
like in the screenshot below:
&lt;img src=&#34;/docs/images/azure-notebook-new-terminal.png&#34; alt=&#34;Creating new terminal after connecting to notebook server&#34; class=&#34;mt-3 mb-3 p-3 border border-info rounded&#34; /&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Run the following command to clone the Kubeflow Fairing project:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;git clone https://github.com/kubeflow/fairing.git
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This command clones the project including the example into your notebook server.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;You can now close the terminal window, and you should now see the &lt;code&gt;fairing&lt;/code&gt; folder
in your notebooks server&amp;rsquo;s Files tab. Navigate to the example notebooks at
&lt;code&gt;fairing/examples/prediction/xgboost-high-level-apis.ipynb&lt;/code&gt;.&lt;/p&gt;
&lt;h2 id=&#34;executing-the-notebook&#34;&gt;Executing the notebook&lt;/h2&gt;
&lt;p&gt;Before running the cells, read the following to learn how to configure Fairing
to use your Azure resources.&lt;/p&gt;
&lt;p&gt;In the &lt;code&gt;xgboost-high-level-apis.ipynb&lt;/code&gt; notebook, find the cell tagged with
&lt;code&gt;parameters&lt;/code&gt; and update this cell to use Azure. Update following values to
configure Fairing to use your Azure backend and Storage.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;export FAIRING_BACKEND = &#39;KubeflowAzureBackend&#39;
export DOCKER_REGISTRY = &#39;&amp;lt;acr-name&amp;gt;.azurecr.io&#39;
export AZURE_REGION = None # This is only relevant if you haven&#39;t created a
                           # Storage yet and let Fairing create it for you.
                           # In that case, you can specify the region as
                           # string, for example, &#39;NorthEurope&#39;.
export AZURE_RESOURCE_GROUP = &#39;&amp;lt;storage-resource-group&amp;gt;&#39;
export AZURE_STORAGE_ACCOUNT = &#39;&amp;lt;storage-name&amp;gt;&#39;
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;After the above steps have been completed, you can run the example notebook.&lt;/p&gt;
&lt;p&gt;You can also have a look at the &lt;a href=&#34;https://dev.azure.com/kubeflow/kubeflow/_build&#34;&gt;CI pipeline&lt;/a&gt; that runs the
example notebook in AKS for steps involved to accomplish a successful run
programmatically.&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Docs: Fairing on GCP</title>
      <link>/docs/components/fairing/gcp/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/fairing/gcp/</guid>
      <description>
        
        
        
      </description>
    </item>
    
    <item>
      <title>Docs: Tutorials</title>
      <link>/docs/components/fairing/tutorials/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/fairing/tutorials/</guid>
      <description>
        
        
        
      </description>
    </item>
    
    <item>
      <title>Docs: Reference</title>
      <link>/docs/components/fairing/reference/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/docs/components/fairing/reference/</guid>
      <description>
        
        
        
      </description>
    </item>
    
  </channel>
</rss>
