Deploy from Console Installer

To deploy FindFace, use a developer-friendly console installer.

Tip

Before deployment, be sure to consult the system requirements.

Important

The FindFace host must have a static IP address in order to be running successfully. To make the IP address static, open the /etc/network/interfaces file and modify the current primary network interface entry as shown in the case study below. Be sure to substitute the suggested addresses with the actual ones, subject to your network specification.

sudo vi /etc/network/interfaces

iface eth0 inet static
address 192.168.112.144
netmask 255.255.255.0
gateway 192.168.112.254
dns-nameservers 192.168.112.254

Restart networking.

sudo service networking restart

Be sure to edit the etc/network/interfaces file with extreme care. Please refer to the Ubuntu guide on networking before proceeding.

To deploy FindFace from the console installer, do the following:

  1. Download the installer file findface-*.run.

  2. Put the .run file into some directory on the designated host (for example, /home/username).

  3. From this directory, make the .run file executable.

    Note

    Be sure to specify the actual file name instead of findface-*.

    chmod +x findface-*.run
    
  4. Execute the .run file.

    sudo ./findface-*.run
    

    The installer will ask you a few questions and perform several automated checks to ensure that the host meets the system requirements. After filling out each prompt, press Enter. The questions and answers are the following:

    1. Q: Which product should be installed?

      A: 1

      Which product should be installed?
      
        1. [security]  FindFace Multi
        2. [server  ]  FindFace Server
        3. [video-worker]  FindFace Video Worker
        4. [nvidia-drivers]  NVIDIA CUDA drivers (installed automatically when you install gpu-variant of the products above)
      
      (default: security)
      product> 1
      
    2. Q: Please choose installation type:

      A: Choose one of the following variants, subject to your architecture outline and deployment plan:

      Note

      If you select the installation type #3 or #4, keep in mind to install necessary neural network models along with the findface-extraction-api component.

      Please choose installation type:
      
      -  1 [stand-alone ]  Single Server
      -  2 [multi-worker]  Single Server, Multiple video workers
      -  3 [repo        ]  Don't install anything, just set up the APT repository
      -  4 [custom      ]  Fully customized installation
      
      (default: stand-alone)
      type> 1
      
    3. Q: Do you want to install Video Recorder?(y/n)

      A: n

      Do you want to install Video Recorder?(y/n)
      install_video_recorder> n
      
    4. Q: Found X interface(s). Which one should we announce as our external address?

      A: Choose the interface that you are going to use as the instance IP address.

      Found 1 interface(s). Which one should we announce as our external address?
      
      -  1 [lo      ]  127.0.0.1
      -  2 [ens3    ]  192.168.112.254
      
      (default: 192.168.112.254)
      ext_ip.advertised> 2
      
    5. Q: Which variant of Video Worker should be installed?

      A: Specify the findface-video-worker package type, CPU or GPU.

      Which variant of Video Worker should be installed?
      
      -  1 [cpu]  CPU-based implementation, slower but doesn't require GPU
      -  2 [gpu]  CUDA-based implementation of video detector, requires NVIDIA GPU
      
      (default: cpu)
      findface-video-worker.variant> 1
      
    6. Q: Which variant of Extraction API should be installed?

      A: Specify the findface-extraction-api package type, CPU or GPU.

      Which variant of Extraction API should be installed?
      
      -  1 [cpu]  CPU-only implementation, slower but doesn't require GPU
      -  2 [gpu]  CUDA-based implementation, faster, requires NVIDIA GPU (supports both CPU and GPU models)
      
      (default: cpu)
      findface-extraction-api.variant> 1
      
    7. Q: Do you want to configure detectors and features right now?(y/n)

      A: y

      Do you want to configure detectors and features right now?(y/n)
      configure> y
      
    8. Q: Do you want to configure detectors and features right now?(y/n)

      A: y

      Do you want to configure detectors and features right now?(y/n)
      configure> y
      
    9. Q: Please select detectors to install:

      A: The face detector is selected by default. Enter done to proceed.

      Please select detectors to install:
      
      -  1 [v]  Face
      -  2 [ ]  Body
      -  3 [ ]  Car
      
      Enter keyword to select matching choices or -keyword to clear selection.
      Enter "done" to save your selection and proceed to another step.
      detectors>
      -  1 [v]  Face
      -  2 [ ]  Body
      -  3 [ ]  Car
      
      detectors> done
      
    10. Q: Please select face features to install:

      A: By default, all face attributes are subject to installation. We recommend leaving it as is by answering done. If some attribute is not necessary, you can enter the keyword (number) related to it. For example, enter 7 to exclude the head pose recognition. Then enter done.

      Please select face features to install:
      
      -  1 [v]  Age
      -  2 [v]  Gender
      -  3 [v]  Emotions
      -  4 [v]  Beard
      -  5 [v]  Glasses
      -  6 [v]  Medicine masks
      -  7 [v]  Headpose
      
      Enter keyword to select matching choices or -keyword to clear selection.
      Enter "done" to save your selection and proceed to another step.
      face_features> done
      

    The FindFace components will be automatically installed, configured and/or started in the following configuration:

    Service

    Configuration

    postgresql-10

    Installed and started.

    nats-server

    Installed and started.

    etcd

    Installed and started.

    pgbouncer

    Installed and started.

    memcached

    Installed and started.

    nginx

    Installed and started.

    django

    Installed and started as a web framework for the FindFace web interface.

    findface-ntls

    Installed and started.

    findface-tarantool-server

    Installed and started. The number of instances (shards) is calculated using the formula: N = min(max(min(mem_mb // 2000, cpu_cores), 1), 16 * cpu_cores). I.e., it is equal to the RAM size in MB divided by 2000, or the number of CPU physical cores (but at least one shard), or the number of CPU physical cores multiplied by 16, if the first obtained value is greater.

    findface-extraction-api

    Installed and started (CPU/GPU-acceleration).

    findface-sf-api

    Installed and started.

    findface-upload

    Installed.

    findface-video-manager

    Installed and started.

    findface-video-worker-*

    Installed and started (CPU/GPU-acceleration).

    findface-data-*

    Neural network models for object and object attribute recognition. Installed.

    findface-security

    Installed and started.

    findface-security-onvif

    Installed and started.

    findface-counter

    Installed and started.

    findface-liveness-api

    Installed and started.

    jq

    Installed. Used to pretty-print API responses from FindFace.

    python3-ntech.*

    Internal and auxiliary services. Installed and started.

    After the installation is complete, the following output is shown on the console:

    Tip

    Be sure to save this data: you will need it later.

    #############################################################################
    #                       Installation is complete                            #
    #############################################################################
    - upload your license to http://192.168.112.254/#/license/
    - user interface: http://192.168.112.254/
      superuser:      admin
      password:       admin
      documentation:  http://192.168.112.254/doc/
    
  5. Specify your time zone in the /etc/findface-security/config.py configuration file, either in the Region/Country/City or Etc/GMT+H format. The time zone determines the time in reports, logs, and names of such FindFace artifacts as event full frames and thumbnails, etc.

    Tip

    The best way to do so is to copy/paste your time zone from this table on Wikipedia.

    sudo vi /etc/findface-security/config.py
    
    # time zone
    TIME_ZONE = 'America/Argentina/Buenos_Aires'
    
  6. Restart the findface-security service.

    sudo systemctl restart findface-security.service
    
  7. Upload the FindFace license file via the main web interface http://<Host_IP_address>/#/license. To access the web interface, use the provided superuser credentials.

    Important

    Do not disclose the superuser (Super Administrator) credentials to others. To administer the system, create a new user with administrator privileges. Whatever the role, the Super Administrator cannot be deprived of its rights.

  8. The answers to the installer questions were saved to a file /tmp/<findface-installer-*>.json. You can edit this file and use it to install FindFace on other hosts without having to answer the questions again.

    To do so, execute:

    sudo ./<findface-*>.run -f /tmp/<findface-installer-*>.json
    

    Tip

    You can find an example of the installation file in Installation File.

Important

To preserve the FindFace compatibility with the installation environment, we highly recommend you to disable the Ubuntu automatic update. In this case, you will be able to update your OS manually, fully controlling which packages to update.

To disable the Ubuntu automatic update, execute the following commands:

sudo apt-get remove unattended-upgrades
sudo systemctl stop apt-daily.timer
sudo systemctl disable apt-daily.timer
sudo systemctl disable apt-daily.service
sudo systemctl daemon-reload

Important

The FindFace services log a large amount of data, which can eventually lead to disc overload. To prevent this from happening, we advise you to disable rsyslog due to its suboptimal log rotation scheme and use the appropriately configured systemd-journal service instead. See Service Logs for the step-by-step instructions.