Introduction
JupyterLab is an integrated environment that can streamline the development of Python code and Machine Learning (ML) models in Kinetica. Jupyter notebooks integrate code execution, debugging, documentation, and visualization in a single document for consumption by multiple audiences. With JupyterLab, Jupyter notebooks can easily operate on a live Kinetica instance.
- JupyterLab
- Kinetica 6.2
- CentOS 7
- Python 3.6
- Interaction with Kinetica using ODBC or the native API
- Creating and executing Kinetica UDF’s
- Execution of ML Models on Kinetica (e.g. Pandas, PyTorch, TensorFlow)
The Kinetica Intel build does not give GPU-accelerated performance and
should be used for development purposes only.
Prerequisites
This tutorial requires the following:- Docker
- Kinetica Developer Edition
Docker
Docker can be downloaded from the Docker store:- Mac: https://store.docker.com/editions/community/docker-ce-desktop-mac
- Linux: https://docs.docker.com/install/linux/docker-ce/centos/

Install
All the required code is available in the kinetica-jupyterlab Git repository: You can use git clone to fetch a local copy.Setting Permissions
The two volumes that will be mounted in Docker, docker/share & notebooks, need to be writable by the image’sgpudb user,
which has a uid of 1000.
With some operating systems (osxfs), this is managed automatically by Docker.
For others, the directories will need to be given permission directly. From the
kinetica-jupyterlab directory, run the following:
Entering the License Key
The database is configured to start automatically, but for this to succeed, a license key must be configured. Edit docker/share/conf/gpudb.conf, uncomment the line withlicense_key, and add the key:
Pulling the Image
This section will demonstrate how to use docker-compose to pull the kinetica/kinetica-jupyterlab image from DockerHub. From the kinetica-jupyterlab directory, go into the docker directory and run docker-compose pull.Managing the Container
This tutorial uses docker-compose to manage the parameters of the container. This can simplify the configuration process, as all of the settings are in the docker-compose.yml file.Starting
Run the below docker-compose up command to start the image. The combined log output of Kinetica and JupyterLab will be displayed in the console. This console needs to be open for as long as the container is running. From the kinetica-jupyterlab/docker directory:Using
To use a Unix shell in the container, open up a separate console session and run the following from the kinetica-jupyterlab/docker directory:Stopping
To stop the container, use the docker-compose down command. From the kinetica-jupyterlab/docker directory:Exploring the Environment
To access to GAdmin, open URL http://localhost:8080 and log in as an admin user (default username/password isadmin/admin ).
To access JupyterLab, open URL http://localhost:8888 and enter password
kinetica. When logged in, the file browser will appear on the left.


_test_df) and then press
Shift+Enter to see the contents in the console.

JupyterLab Contents
This repository contains an integrated environment that provides accelerated development of Kinetica-based ML Models. It makes use of CentOS 7, Kinetica, JupyterLab, and Python 3.6 for this purpose. JupyterLab has the following Python 3.6 libraries for integrating ML libraries with Kinetica: It also has the following libraries for ML model development: Example Notebooks are provided that demonstrate:- Connectivity between Pandas Dataframes and Kinetica with ODBC and the native API
- ML models including an SVD recommender
- docker - contains the scripts necessary to build and run the Docker image
- notebooks - contains notebooks and Python scripts needed to run them; will be mounted inside the image and its contents will be visible in JupyterLab