Installation Guide

The following installation guide is for Debian-based and Ubuntu-based Linux system with GPU enabled.

Step 1: Install Software Prerequisite via terminal

sudo apt-get update && sudo apt-get install curl nano htop unzip -y

Step 2: Turn-off Swap Memory

We will enter the super user mode, command to turn off the swap memory, and exit the super user mode. Finally we launch htop command to confirm that that the swap memory is already turned off.
sudo su -
swapoff -a
Swp = 0K/0K at the last line of this image means the swap memory is successfully turned off.
Control-c to go back to terminal

Step 3: Docker-CE Installation

If you already have docker engine installed, you can skip this step.
curl -fsSL -o
sudo sh
You can run the following command to check if the docker is successfully installed.
sudo docker run hello-world

Step 4: Docker-Compose Installation

If you already have docker compose installed, you can skip this step.
sudo curl -L "$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

Step 5: Nvidia GPU Driver Installation

To install Nvidia GPU driver use the command below.
sudo ubuntu-drivers devices
sudo ubuntu-drivers autoinstall
sudo shutdown -r now

Step 6: Nvidia-Docker Installation

You can install nvidia-docker with the following command.
distribution=$(. /etc/os-release;echo $ID$VERSION_ID)
curl -s -L | sudo apt-key add -
curl -s -L$distribution/nvidia-docker.list | sudo tee /etc/apt/sources.list.d/nvidia-docker.list
sudo apt-get update && sudo apt-get install -y nvidia-container-toolkit nvidia-docker2
sudo systemctl restart docker

Step 7: Enable Nvidia-Docker

Edit the daemon.json file to support nvidia-docker.
sudo nano /etc/docker/daemon.json
Add the following text below. If there are existing text replace it with the provided text below.
"runtimes": {
"nvidia": {
"path": "nvidia-container-runtime",
"runtimeArgs": []
"default-runtime": "nvidia"
Press CTRL+x to exit editor, and then y to save the file.
Then run the following line.
sudo systemctl restart docker
docker run --rm nvidia/cuda:9.0-base nvidia-smi
In the printed out table there must be the name of the graphic card installed in the server
Example Results from nvidia-smi

Step 8: Deploy Thai National ID Card OCR Docker image

You can purchase our on-premise license by contacting us at [email protected] or call +6686-322-5858. Once you purchase our On-Premise license, You will received the Thai National ID Card Docker image from us in the zip file. It contains two files.
inflating: docker-compose.yml
inflating: thai_id_ocr_op_v3.4.3.docker_image.tar
Enter the extracted directory. You can easily install it by typing the following command
docker load -i thai_id_ocr_op_v3.4.3.docker_image.tar
nano docker-compose.yml
mkdir config
Open website to start using the service at http://localhost:8000