Skip to content

Install KDB.AI with Docker

Self installation is available by invitation only. The following steps detail how to perform a self installation using Docker.

Download the KDB.AI image

Using the credentials provided, you can download the image for the specified of KDB.AI.

  • Login to the docker registry:
    docker login registry.dl.kx.com -u username -p password
    
  • Pull the kdbai-db image:
    docker pull registry.dl.kx.com/kdbai-db:<VERSION>
    

Provide a license

Using the license provided, you pass this to the docker image using an environment variable KDB_LICENSE_B64. It can be generated from a valid kc.lic file with base64 encoding. In a *nix based system, we can create the environment variable with the following command:

export KDB_LICENSE_B64=$(base64 path-to/kc.lic)

Start the docker image

Create a location on the local disk to write data, indexes, and logs.

$ tree .
.
└── vecdb
    ├── data
    └── logs

3 directories, 0 files

Set permission to read and write to these directories.

$ chmod 0777 vecdb/data vecdb/logs

Run the container in detached mode using the following command.

$ docker run -d \
     -p 8082:8082 \
     -e KDB_LICENSE_B64 \
     -e KXI_TP_LOG_PATH=/logs \
     -v $PWD/vecdb/data:/data \
     -v $PWD/vecdb/logs:/logs \
     registry.dl.kx.com/kdbai-db:<VERSION>

The startup process provided above can be adjusted using various modifications, offering enhanced flexibility to accommodate different requirements.

Next, check the KDB.AI container is running:

$ sudo docker ps 

Stop KDB.AI

To stop the container, run:

$ sudo docker stop kdbai-db 

To clean the data after stopping KDB.AI, run the following:

$ sudo rm -Rfv vecdb/data/* vecdb/logs/* 
$ rm -Rfv vecdb/data/.assembly.*