All pages
Powered by GitBook
1 of 7

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Revision History

Date

Revised content

2021/08/20

  • Applied the contents of V1.8.0

  • Fixed some typographical errors

2021/03/08

  • The first edition released

Installation Manual

This manual provides instructions for installing SenseID.

This manual describes how to install the JCV face recognition service "Sense ID." To successfully deploy the service, please read this manual carefully before starting.

This manual is intended for customers who belong to the IT department and have experience using and operating Linux, Kubernetes, Docker, and cloud.

The installation process described in this manual is described in detail in the following figure.

3 License Activation

This page describes the activation of SenseID.

3.1 What is license

A license file is required to use the Go-Workers service of SenseID. The activation of the license is associating with the UDID. License files may differ depending on the services you are using. One SenseID server can correspond to one to three license files. You must rename the license file and place it in the specified directory before you can deploy the service.

Only the server for Go-Workers needs licenses. The server for Ruby-Open-API does not require licenses. Execute the following procedure only on the server for Go-Workers.

The JCV product window provides the SenseID license file. Refer to the following parts for activation details.

3.2 Change license file names

  • Change the SENSEID_FACE_xxx.lic file to senseid_face.lic.

  • Change the SENSEID_KESTREL_xxx.lic file to senseid_kestrel.lic.

  • Change the SENSEID_LIVENESS_xxx.lic

3.3 Replace license files

3.3.1 Unzip the installation package

Package name: 1v1-private-cloud-v1.8.tgz

Be sure to unzip the ZIP file on a Linux-based system. If you unzip it on a non-Linux system, a soft link failure may occur, and the program execution may fail.

3.3.2 Place the license files

Change the directory to the license folder where you unzipped the SenseID installation package.

You can confirm that the following three folders are displayed by executing the following command.

Copy the license files to the specified directories and overwrite the original files.

file to
senseid_liveness.lic
.
$ tar -xvzf 1v1-private-cloud-v1.8.tgz
$ cd 1v1-private-cloud-v1.8/go-workers/fixture/license
$ ls -1

senseid_face
senseid_kestrel
senseid_liveness
#1) Copy the senseid_face.lic to the senseid_face folder, and overwrite the previous license file
$ cp {file_path}/senseid_face.lic {installation_path}/1v1-private-cloud-v1.8/go-workers/fixture/license/senseid_face

#2) Copy the senseid_kestrel.lic to the senseid_kestrel folder, and overwrite the previous license file
$ cp {file_path}/senseid_kestrel.lic {installation_path}/1v1-private-cloud-v1.8/go-workers/fixture/license/senseid_kestrel

#3) Copy the senseid_liveness.lic to the senseid_liveness folder, and overwrite the previous license file
$ cp {file_path}/senseid_liveness.lic {installation_path}/1v1-private-cloud-v1.8/go-workers/fixture/license/senseid_liveness

2 UDID

This page describes the UDID required to issue a Sense ID license.

2.1 What is UDID

The UDID is a server identification code calculated from the server hardware information. SenseID activation is associating with the UDID. Download the UDID acquisition tool and follow the instructions to acquire the UDID before applying for a SenseID license.

2.2 UDID acquisition tool

Only the server for Go-Workers needs licenses. The server for Ruby-Cloud-API does not require licenses. Execute the following procedure only on the server for Go-Workers.

The UDID acquisition tool is used to get the UDID of the deployment target server.

The file name of the UDID acquisition tool isSenseIDPrivateCloud-UDIDGetter-V4.1.0.zip.

2.3 Get UDID

Place and unzip the UDID acquisition tool on the server.

Be sure to unzip the ZIP file on a Linux-based system. If you unzip it on a non-Linux system, a soft link failure may occur, and the program execution may fail.

Change the directory to the unzipped folder and execute theUDIDGetter.sh.

Please sent the outputUDID.txtfile, together with your contract number to the JCV product window .

$ unzip SenseIDPrivateCloud-UDIDGetter-V4.1.0.zip
$ cd /SenseIDPrivateCloud-UDIDGetter-V4.1.0
$ sudo ./UDIDGetter.sh

1 System Requirements

This page describes the system operating environment requirements of SenseID.

1.1 System

Ubuntu Server 18.04 LTS is recommended for the Sense ID usage environment. We recommend a quad-core or higher CPU, 8GM or higher RAM, and 100GB or higher disk capacity on the hardware side. Note that AVX is required for the CPU instruction set.

Configuration items

Configuration requirements

Minimum operating system kernel version number

1.2 Services

The services described in this section are running inside the server. It is strongly recommended to implement a secure API mechanism, authentication mechanism, secure communication, and DNS outside of SenseID for safe use.

It is recommended to use separate servers for Ruby-Cloud-API and Go-Workers if possible.

  • Ruby-Cloud-API

    • The HTTP services, including the main interface for client API calls.

    • Service port: 3000

4 Service Deployment

This page describes detailed steps to install SenseID.

This chapter describes how to deploy and activate the SenseID service, primarily installing, configuring, launching critical services and potential issues and solutions.

4.1 Confirm the installation package

The installation package should have been unzipped to place the license files. See Section for more details.

Change the directory to the root folder where you unzipped the SenseID installation package.

The structure is as follows:

Go-Workers
  • The back-end computing vision services, primarily the encapsulation of algorithms provided to Ruby-Cloud-API in HTTP.

  • Service port: 50050

V3.2.0 or more

CPU model

x86_64

Requirements for the number of CPU cores

Quad-core (4) or more

CPU instruction set

SSE, AVX, FMA;

compatibility: SSE > AVX > FMA;

operating speed: FMA > AVX > SSE

RAM requirements

16GB or more

Supported OS & minimum version

Ubuntu Server (16.04 LTS) or higher

Disk space requirements

100GB or more

4.2 Deploy Go-Workers

This service is a major computing service, so it is recommended to allocate dedicated server resources if possible.

4.2.1 Adjust CPU cores

Before deploying Go-Workers, you need to get the number of physical CPU cores on your server. The command to get the physical CPU core information is as follows.

Change the directory to the Go-Workers folder, open the.envfile, and set theHANDLERSvalue to the number of physical CPU cores obtained above if you are using a dedicated server. Otherwise, specify a number. Save and close the.envfile.

HANDLERS cannot be set to a value that exceeds the number of physical CPU cores on the server. The higher theHANDLERSvalue is, the higher the number of concurrent services and the higher the memory and CPU consumption.

4.2.2 Start Go-Workers service

Before you start, make sure your license has been replaced.

Start the Go-Workers service.

You only need to execute this instruction once.

A script to stop the service is also provided in the same folder. Execute it only when you want to stop the service.

4.2.3 Check Go-Workers service

To confirm whether the Go-Workers service started normally, try the following command to see the logs.

If the tail command contains Server Listen on port 50050, the service has started successfully.

Also, perform the health check with the following command.

An example is as follows (This indicates that the service started successfully).

4.3 Deploy Ruby-Cloud-API

The deployment of the following services depends on Docker. Make sure you have Docker installed on your server.

4.3.1 Load service images

Load the Ruby-Cloud-API image file.

The execution result is as follows.

4.3.2 Set Go-Workers address

Get the IP address of the Go-Workers server.

Open the .env file in the root folder of the SenseID installation package.

Set the WORKER_IP value in the last line to the IP address of the server where the Go-Workers service is deployed.

4.3.3 Adjust CPU cores

Sets the number of physical CPU cores on the server, the same way as Go-Workers.

Open the.envfile, and set theHANDLESvalue to the number of physical CPU cores obtained if you are using a dedicated server. Otherwise, specify a number. Save and close the.envfile.

HANDLES cannot be set to a value that exceeds the number of physical CPU cores on the server. The higher theHANDLESvalue is, the higher the number of concurrent services and the higher the memory and CPU consumption.

4.3.4 Start Ruby-Cloud-API service

Start the Ruby-Cloud-API service.

The results are as follows.

Confirm that the Docker is running.

The results are as follows.

The service is now successfully deployed.

4.3.5 Check Ruby-Cloud-API service

Perform the health check with the following command.

An example is as follows (This indicates that the service started successfully).

3.3.1
$ cd 1v1-private-cloud-v1.8
$ ls -1
api.tar
docker-compose
docker-compose.yml
go-workers
load_image.sh
package.toml
product.toml
$ echo Cores=$(($(lscpu | awk '/^Socket/{print $2}') * $(lscpu | awk '/^Core/{print $4}')))
$ cd go-workers
$ vi .env
$ sudo ./start.sh
$ sudo ./stop.sh
$ tail -f tmp/worker.log.0
$ curl 127.0.0.1:50050/healthcheck
{"request_id":"07a41c21822e4223a373e77bfc186ed2","status":"ok"}
$ cd 1v1-private-cloud-v1.8
$ sudo ./load_image.sh
Loaded image: registry.sensetime.com/senseid-cloudv2/api-1v1:xxx
$ hostname -I | cut -d' ' -f1
$ vi .env
$ vi .env
$ sudo ./docker-compose up -d
Creating network "1v1-private-cloud-yyyymmdd_default" with the default driver
Creating 1v1-private-cloud_api_1 ... done
$ sudo ./docker-compose ps
         Name                    Command             State               Ports
---------------------------------------------------------------------------------------
1v1-private-cloud_api_1   ./entrypoint.sh start   Up (healthy)   0.0.0.0:3000->3000/tcp
$ curl 127.0.0.1:3000/healthcheck
{"code":1000,"status":"ok"}

5 Deployment FAQ

This page describes common issues during SenseID installation.

Q1. The instruction set of the machine for deployment is too low in this version, or the instruction set does not contain the AVX instruction set. It is found that the log contains "SIGILL: illegal instruction” after executing tail -f tmp/worker.log.0 to check the returned log. What’s the solution to this problem?

First, check the instruction set contained in the current machine:

  1. Execute this command: cat /proc/cpuinfo

  2. Check flag

If it does not contain a mix of AVX & AVX2, indicating that the CPU instruction set does not support the Avx instruction set.

There are two solutions:

1) Replace it with a machine containing an AVX instruction set;

2) Force the machine to use an SSE instruction set. However, the service performance will degrade and processing speed will be halved;

Method to force the machine to use an SSE instruction set: open go-workers/. env,

Modify FORCE_SET_SSE=false to FORCE_SET_SSE=true.

Note: Save the exit after modifying, and restart the go-workers. The method to restart the service is as follows:

First execute ./stop/sh then execute ./start.sh

Q2. If the start command (./start.sh) is called repeatedly during deployment, or the port is used, for example, if you execute ./start.sh multiple times in go-workers, it is found that the following errors are reported after checking the log:

Note: Start "./start.sh "once respectively corresponding when starting Go-Workers or Ruby-Cloud-API.

1) Execute

2) Kill the corresponding process No. of ./tool/supervisord -c config/supervisor.conf -d:

Q3. A summary error type about the use of license:

The "private cloud package" which we provide does not contain licenses by default. For details of licenses, please refer to .

1)error panic: bad license: -1

It means the license has broken(such as an empty licenes),please replace the license file again.

2) error panic: open fixture/license/senseid_ocr/senseid_ocr.lic: no such file or directory

It means the license is not imported,please import the license file into the specified folder.

3)error panic: bad license: -16

It meas "udid mismatch", and the hardware fingerprint bound to the license is inconsistent with the current device’s hardware fingerprint.Please make sure the device's hardware information has not changed.

Maybe you use the wrong license or the device's udid is changed.

If you make sure that device's uuid has changed,please provide the new udid to the business person who can apply for the new license to you,and then remember to replace the new license.

Q4 error:-8 ?

It means the file format is incorrect, mainly related to the model file.

For example, using the decompression software under the windows system to decompress and upload the "private cloud package" to server may cause partial damage of the model file. It is recommended that customers re-upload the installation package(xxx.tar) to the server and use the command line(tax xf xxx.tar) to decompress it on the server

Chapter 3 License Activation
listen: listen tcp :50050: bind: address already in use
ps aux | grep supervisord
kill -9 PID
[email protected]