Debian 11 Server Preparation

To prepare a server on Debian 11 for the FindFace Multi deployment, follow the instructions below minding the sequence.

Note

For other platforms, please refer to the following resources:

In this section:

Install FUSE

  1. Install FUSE (Filesystem in Userspace) by running the following command.

    sudo apt install fuse -y
    

GPU: Install NVIDIA Drivers

The first step of the server preparation is the NVIDIA driver installation. It’s applicable only for the GPU configuration. Go straight to the Docker installation if your configuration is CPU-accelerated.

With the GPU-accelerated FindFace Multi, you’ll need the NVIDIA driver version 530 or above. Download a relevant .run installer from NVIDIA Driver Downloads.

Since you use a .run installer from NVIDIA, the following dependencies must be installed:

sudo apt install linux-headers-$(uname -r)
sudo apt install build-essential

Install Docker Products

Docker products must be installed on both CPU and GPU servers. Do the following:

  1. Update the apt package index and install packages to allow apt to use a repository over HTTPS.

    sudo apt-get update
    sudo apt-get install ca-certificates curl gnupg
    
  2. Add the Docker’s official GPG key (GNU Privacy Guard key) to the host.

    sudo install -m 0755 -d /etc/apt/keyrings
    curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    sudo chmod a+r /etc/apt/keyrings/docker.gpg
    
  3. Set up the Docker repository.

    echo \
      "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \
      "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
      sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    
  4. Update the apt package index one more time.

    sudo apt-get update
    
  5. Install 24.* versions of Docker products.

    sudo apt-get install docker-ce=5:24* docker-ce-cli=5:24* containerd.io docker-buildx-plugin
    
  6. Check whether the Docker installation was a success.

    sudo docker run hello-world
    

    This command downloads a test image and runs it in a container. When the container runs, it prints a confirmation message and exits.

  7. Install docker-compose.

    sudo curl -SL https://github.com/docker/compose/releases/download/v2.15.1/docker-compose-linux-x86_64 -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose
    sudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose
    
  8. Perform the Docker Engine post-installation procedures to ease your future work with Docker and FindFace Multi containers. Once you can manage Docker as a non-root user, you don’t have to apply sudo in the commands related to Docker.

    sudo groupadd docker
    sudo usermod -aG docker $USER
    newgrp docker
    
  9. Configure the Docker network.

    sudo su
    BIP=10.$((RANDOM % 256)).$((RANDOM % 256)).1
    cat > /etc/docker/daemon.json <<EOF
    {
        "bip": "$BIP/24",
        "fixed-cidr": "$BIP/24"
    }
    EOF
    

GPU: Install NVIDIA Container Runtime

To deploy containerized GPU-accelerated FindFace Multi, you need NVIDIA Container Runtime. We recommend installing NVIDIA Container Toolkit that includes this runtime. Do the following:

  1. Specify the repository and install NVIDIA Container Toolkit from it by executing the following commands.

    distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \
          && curl -fsSL https://nvidia.github.io/libnvidia-container/gpgkey | sudo gpg --dearmor -o /usr/share/keyrings/nvidia-container-toolkit-keyring.gpg \
          && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.list | \
                sed 's#deb https://#deb [signed-by=/usr/share/keyrings/nvidia-container-toolkit-keyring.gpg] https://#g' | \
                sudo tee /etc/apt/sources.list.d/nvidia-container-toolkit.list
    sudo apt-get update
    sudo apt-get install -y nvidia-container-toolkit
    sudo nvidia-ctk runtime configure --runtime=docker
    sudo systemctl restart docker
    
  2. Switch to the superuser account.

    sudo su
    
  3. Configure the Docker network. Configure usage of the NVIDIA Container Runtime installed along with NVIDIA Container Toolkit.

    BIP=10.$((RANDOM % 256)).$((RANDOM % 256))
    cat > /etc/docker/daemon.json <<EOF
    {
       "default-address-pools":
            [
                    {"base":"$BIP.0/16","size":24}
            ],
        "bip": "$BIP.1/24",
        "fixed-cidr": "$BIP.0/24",
        "runtimes": {
             "nvidia": {
                 "path": "nvidia-container-runtime",
                 "runtimeArgs": []
             }
        },
        "default-runtime": "nvidia"
    }
    EOF
    
  4. Restart Docker.

    systemctl restart docker
    

Now you are all set to install FindFace Multi. Refer to the following sections: