Skip to content

Server Kit

IDLive Face Server is built on the top of the Ubuntu 22.04 base image. If you wish to use your own base image, you need the Server Kit. It is a bundle that contains IDLive Face Server's files and a Dockerfile to produce the final image.

The Server kit requires:

  1. Docker 18.09+
  2. Prepared base image
  3. IDLive Face SDK bundle

Prepare base image

The base image should use Linux distribution that satisfy these requirements:

  1. Built for x86-64 architecture.
  2. Based on glibc 2.27+ and Bash. You can't use Alpine Linux.
  3. Uses deb or rpm based Package Manager.

You need to setup the image as required by the IDLive Face Server:

  1. Install Java 17+.
  2. Create a user and a group named server.

This is an example of the Dockerfile for the image based on Ubuntu:

FROM ubuntu:22.04

RUN apt-get update \
 && apt-get install -y openjdk-17-jre-headless \
 && rm -rf /var/lib/apt/lists/*

RUN useradd --create-home server

If you use the GPU build you should also install the CUDA runtime.

Red Hat Universal Base Image 9

On Red Hat UBI 9 you need to additionally install chkconfig package:

yum install chkconfig -y

Without it you can get Unsupported Linux distribution error.

Build server image

Once you've unpacked the Server Kit's archive, there will be an empty facesdk directory there. You need to unpack the IDLive Face SDK bundle into this directory. Make sure there is no intermediary directories:

tar zxf facesdk-linux.tar.gz -C facesdk-serverkit/facesdk --strip-components=1

Next build the server image with Docker in the BuildKit mode. Use the build argument FROM to specify the base image:

export DOCKER_BUILDKIT=1
docker build . --tag idliveface-server --build-arg FROM=base-image

If you can't use BuildKit, there is a Dockerfile that works without it:

docker build . --file Dockerfile.nobuildkit --tag idliveface-server --build-arg FROM=base-image

Note that in this case the resulting image will be bigger in size.