Search…
Docker Open Source GPU
These are the steps to install OmniSci as a Docker container on an Ubuntu machine running with NVIDIA Kepler or Pascal series GPU cards.

Preparation

Prepare your host by installing NVIDIA drivers, Docker, and NVIDIA runtime.

Install NVIDIA Drivers

To install NVIDIA drivers, open a terminal window on the host. Run apt update and apt upgrade to ensure that you are using the latest operating system software.
1
sudo apt update
2
sudo apt upgrade
Copied!
Use apt-get to install required utilities.
1
sudo apt-get install \
2
apt-transport-https \
3
ca-certificates \
4
curl \
5
gnupg-agent \
6
software-properties-common
Copied!
Reboot your system to activate all of your changes.
1
sudo reboot
Copied!

Install CUDA

Verify that the gcc compiler is installed with the following command.
1
gcc --version
Copied!
If no version information returns, run the following command.
1
sudo apt install gcc
Copied!
To install the CUDA package.
    2.
    Select the target platform by selecting the operating system (Linux), architecture (based on your environment), distribution (Ubuntu), version (based on your environment), and installer type (OmniSci recommends deb (network)).
    3.
    Install the CUDA package using the installation instructions on the NVIDIA web site.
    4.
    Reboot your system to ensure that all changes are active:
    1
    sudo reboot
    Copied!

Install Docker

Remove any existing Docker installs and the legacy NVIDIA docker runtime.
1
sudo docker volume ls -q -f driver=nvidia-docker | xargs -r -I{} -n1 docker ps -q -a -f volume={} | xargs -r docker rm -f
2
sudo apt-get purge nvidia-docker
Copied!
Remove Docker.
1
sudo apt-get remove docker docker-engine docker.io containerd runc
Copied!
Update with apt-get.
1
sudo apt-get update
Copied!
Use curl to download the latest Docker version.
1
sudo curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Copied!
Add Docker to your Apt repository.
1
sudo add-apt-repository \
2
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
3
$(lsb_release -cs) \
4
stable"
Copied!
Update your repository.
1
sudo apt-get update
Copied!
Install Docker, the command line interface, and the container runtime.
1
sudo apt-get install docker-ce docker-ce-cli containerd.io
Copied!
Optional: Run the following usermod command so that docker command execution does not require sudo privilege. Log out and log back in for the changes to take effect.
1
sudo usermod -aG docker $USER
Copied!

Checkpoint

Verify your Docker installation.
1
sudo docker run hello-world
Copied!

Install NVIDIA Docker runtime

Use curl to add a gpg key:
1
curl -s -L https://nvidia.github.io/nvidia-container-runtime/gpgkey | \
2
sudo apt-key add -
3
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
Copied!
Update your sources list:
1
curl -s -L https://nvidia.github.io/nvidia-container-runtime/$distribution/nvidia-container-runtime.list | \
2
sudo tee /etc/apt/sources.list.d/nvidia-container-runtime.list
Copied!
Update apt-get and install nvidia-container-runtime:
1
sudo apt-get update
2
sudo apt-get install -y nvidia-container-runtime
Copied!
Edit /etc/docker/daemon.json to add the following, and save the changes:
1
{
2
"default-runtime": "nvidia",
3
"runtimes": {
4
"nvidia": {
5
"path": "/usr/bin/nvidia-container-runtime",
6
"runtimeArgs": []
7
}
8
}
9
}
Copied!
Restart the Docker daemon:
1
sudo pkill -SIGHUP dockerd
Copied!
Checkpoint
Verify Docker and NVIDIA runtime work together.
1
sudo docker run --runtime=nvidia --rm nvidia/cuda:10.0-runtime-ubuntu18.04 nvidia-smi
Copied!
Standard NVIDIA-SMI output shows the GPUs in your instance.

Installation

Download OmniSci from DockerHub and Start OmniSci in Docker.
1
sudo docker run --runtime=nvidia \
2
-d --runtime=nvidia \
3
-v /var/lib/omnisci:/omnisci-storage \
4
-p 6273-6280:6273-6280 \
5
omnisci/omnisci-ee-cuda:v5.4.2
Copied!
On startup, you receive the following error:
1
config file does not exist, ignoring --config /omnisci-storage/omnisci.conf
Copied!
This is expected behavior, because OmniSci does not ship with a default omnisci.conf file. To use OmniSci with the capabilities enabled by omnisci.conf:
    1.
    Stop OmniSci.
    2.
    Create the file as described in Configuration File and place it in /var/lib/omnisci.
    3.
    Restart OmniSci.
For more information on CUDA driver installation, see the CUDA Installation Guide.
See also the note regarding the CUDA JIT Cache in Optimizing Performance.
For more information on Docker installation, see the Docker Installation Guide.

Command-Line Access

You can access the command line in the Docker image to perform configuration and run OmniSci utilities.
You need to know the container-id to access the command line. Use the command below to list the running containers.
1
sudo docker container ls
Copied!
You see output similar to the following.
1
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
2
9e01e520c30c omnisci/omnisci-ee-cpu "/bin/sh -c '/omnisci..." 3 days ago Up 3 days 0.0.0.0:6273-6280->6273-6280/tcp confident_neumann
Copied!
Once you have your container ID, you can access the command line using the Docker exec command. For example, here is the command to start a Bash session in the Docker instance listed above. The -it switch makes the session interactive.
1
sudo docker exec -it 9e01e520c30c bash
Copied!
You can end the Bash session with the exit command.
Note
On Ubuntu, nvidia-docker has a dependency on nvidia-modprobe. If you receive the message: Error: Could not load UVM kernel module. Is nvidia-modprobe installed? you can install nvidia-modprobe using the following commands.
On Ubuntu, nvidia-docker has a dependency on nvidia-modprobe. If you receive the message: Error: Could not load UVM kernel module. Is nvidia-modprobe installed? you can install nvidia-modprobe using the following commands.
1
sudo apt-add-repository multiverse
2
sudo apt update
3
sudo apt install nvidia-modprobe
Copied!

Activation

To verify that all systems are go, load some sample data and perform an omnisql query.
OmniSci ships with two sample datasets of airline flight information collected in 2008, and one dataset of New York City census information collected in 2015. To install the sample data, run the following command.
1
sudo docker exec -it <container-id> ./insert_sample_data
Copied!
Where <container-id> is the container in which OmniSci is running.
When prompted, choose whether to insert dataset 1 (7,000,000 rows), dataset 2 (10,000 rows), or dataset 3 (683,000 rows). The examples below use dataset 2.
1
Enter dataset number to download, or 'q' to quit:
2
# Dataset Rows Table Name File Name
3
1) Flights (2008) 7M flights_2008_7M flights_2008_7M.tar.gz
4
2) Flights (2008) 10k flights_2008_10k flights_2008_10k.tar.gz
5
3) NYC Tree Census (2015) 683k nyc_trees_2015_683k nyc_trees_2015_683k.tar.gz
Copied!
Connect to OmniSciDB by entering the following command (default password is HyperInteractive):
1
docker exec -it <container-id> /omnisci/bin/omnisql
2
password: ••••••••••••••••
Copied!
Enter a SQL query such as the following:
1
omnisql> SELECT origin_city AS "Origin", dest_city AS "Destination", AVG(airtime) AS
2
"Average Airtime" FROM flights_2008_10k WHERE distance < 175 GROUP BY origin_city,
3
dest_city;
Copied!
The results should be similar to the results below.
1
Origin|Destination|Average Airtime
2
Austin|Houston|33.055556
3
Norfolk|Baltimore|36.071429
4
Ft. Myers|Orlando|28.666667
5
Orlando|Ft. Myers|32.583333
6
Houston|Austin|29.611111
7
Baltimore|Norfolk|31.714286
Copied!
Last modified 9mo ago