Skip to content

Native Installation

Note

This version of the documentation is for installation of Xailient SDK using wheel file (.whl). If you are looking for documentation for installion of Xailient SDK using SDK package, please visit our old documentation.

If your local machines doesn't meet the requirements for native installation we also offer Docker Containers as a deployment option.

Device Setup

To meet the minimum requirements, your device must be a x86_64 or ARM32 architecture device. We've tested the following operating systems:

  • Ubuntu 18.04 LTS
  • Ubuntu 19.04
  • Raspbian Buster

Note

To run Xailient SDK on Windows or MacOS, please run it inside a VirtualBox.

Here are some resources you can refer to to install Ubuntu operating system on a VirtualBox:

For ARM32, we have tested on the following device:

  • RaspberryPi 3B+

Minimum software requirements:

  • Glibc 2.27
  • Python >=3.6
  • Pip
  • VirtualEnv

If your device does not meet the minimum software required, please follow the instructions below to install them.

Download the package lists and update information

$ sudo apt-get update

Note

apt-get update to download the package lists from the repositories and "update" them to get information on the newest versions of packages and their dependencies. It will do this for all repositories and PPAs.

Install python3

The Xailient SDK works with python 3.6 or later. Here we install python 3.7 though you could install any version of python >=3.6.

$ sudo apt-get install python3.7

Install pip for python3

$ sudo apt-get install python3-pip

Install VirtualEnv

$ python3 -m pip install --user virtualenv

Create a Virtual Environment (Recommended)

Create a new python virtual environment to isolate package installation for the system.

$ python3 -m venv env

Activate the virtual environment.

Before you can start using the virtual environment for package installations, you will need to activate it. Activating a virtual environment will put the virtual environment-specific python and pip executables into your shell's PATH.

$ source env/bin/activate

To deactivate the virtual environment later,

(env) $ deactivate

Install XailientSDK

Get SDK Wheel Link

Go to the Console and navigate to MANAGE AI MODELS. For the model you want to deploy, select the SDK you have build for your target platform.

Note

If you have not build an SDK yet, refer to Build SDK section of the documentation.

Click on the icon left side of the platform to copy the downlooad link.

Click on the target platform for the model to download.

Install SDK Wheel

Install using downloaded SDK wheel file
(env) $ python3 -m pip install <download_path/wheel_file_name>
(env) $ python3 -m pip install "<SDK WHEEL LINKs>"

Note

Replace <SDK WHEEL LINK> with the SDK link you copied earlier from the console.

Start the Xailient Daemon which activates your license

(env) $ sudo python3 -m xailient.install

That's it! You can now start using the Xailient SDK. If this is your first time using the Xailient SDK then it may be helpful to read the remainder of this document.

Info about the installed Xailient SDK

(env) $ python3 -m pip show xailient

You can get information about the version of xailient sdk installed, support email address, and location of the installation.

Note

Keep note of the install location "Location" as you will need it in the steps below.

Go to Xailient Installation Folder

To go to xailient folder, use the following command. If you do not know the install location, please refer to "Info about xailient sdk installed" section above.

(env) $ cd <Xailient Install Location>/xailient

Xailient SDK contents

(env) $ ls
  • bin/ -- Executables required for initial registration
  • data/ -- Image files you can use with the sample applications
  • samples/ -- Sample application demonstrating how the Xailient SDK library can be used
  • scripts/ -- License activation scripts
  • sharedLib_x86_64/ --Sample models that can be installed or linked with your applications

Run sample code

In the xailient folder of the install location, go to samples folder. This folder contains a sample python script named "basic_sample.py" that demonstrates how to use the xailient sdk.

The script reads an image named "beatles.jpg" from data folder, runs the detection sdk on this image and saves output to "beatles_output.jpg" in the current working directory.

Now run the sample script.

(env) $ python3 -m xailient.samples.basic_sample
Input Image Output Image

Update Xailient SDK Model

(env) $ python3 -m pip uninstall xailient
(env) $ python3 -m pip install "<new SDK WHEEL URL>"

When you install a new SDK with a different model using pip install, you do not need to run the license activation script again.

Uninstall Xailient

Run the uninstallation script.

(env) $ sudo python3 -m xailient.uninstall

Pip uninstall xailient

(env) $ python3 -m pip uninstall xailient

Note that any changes to the basic_sample.py python script will be overwritten so keep a backup if you intend to keep any changes.