.. _deploy-prepare-debian: 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: * `NVIDIA drivers `__ * `Docker Engine `__ * `Docker Compose `__ * `NVIDIA Container Toolkit `__ .. rubric:: In this section: .. contents:: :local: .. important:: The FindFace Multi host must have a static IP address in order to be running successfully. If the host IP address is static, you do not need to take additional steps. Otherwise, follow this instruction. 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. .. code:: 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. .. code:: sudo service networking restart If you use the Netplan utility for network configuration, make changes to the ``*.yaml`` file located in the ``/etc/netplan/`` directory. .. code:: sudo vi /etc/netplan/*.yaml network: version: 2 renderer: networkd ethernets: eth0: dhcp4: no addresses: [192.168.112.144/24] gateway4: 192.168.112.254 nameservers: addresses: [192.168.112.254] Apply changes with the command: .. code:: sudo netplan apply Edit network configuration files only if you are sure of what you are doing. Install FUSE ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Install FUSE (Filesystem in Userspace) by running the following command. .. code:: 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 :ref:`Docker installation ` if your configuration is CPU-accelerated. With the GPU-accelerated FindFace Multi, you'll need the NVIDIA driver version ``535`` 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: .. code:: sudo apt install linux-headers-$(uname -r) sudo apt install build-essential .. _docker_debian: Install Docker Products ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Docker products must be installed on both CPU and GPU servers. Do the following: #. Update the ``apt`` package index and install packages to allow ``apt`` to use a repository over HTTPS. .. code:: sudo apt-get update sudo apt-get install ca-certificates curl gnupg #. Add the Docker’s official GPG key (GNU Privacy Guard key) to the host. .. code:: 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 #. Set up the Docker repository. .. code:: echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ bullseye stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null #. Update the ``apt`` package index one more time. .. code:: sudo apt-get update #. Install the latest versions of Docker products. .. code:: sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin .. note:: The most recent versions of ``docker-ce`` and ``docker-ce-cli`` that have been tested are ``26.*`` versions. Use later versions of Docker packages, if any, at your own discretion. #. Check whether the Docker installation was a success. .. code:: 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. #. Install ``docker-compose``. .. code:: 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 #. Perform the `Docker Engine post-installation procedures `__ to ease your future work with Docker and :ref:`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. .. code:: sudo groupadd docker sudo usermod -aG docker $USER newgrp docker #. Configure the Docker network. .. code:: BIP=10.$((RANDOM % 256)).$((RANDOM % 256)).1 sudo tee /etc/docker/daemon.json <