STEP 3. Server preparation ================================= .. _step3: CPU server preparation ------------------------ To prepare a CPU server to FindFace Lite, please, install `Docker Engine (19.03+) and Docker Compose (2.2.3+) `_ . Before you install `Docker Engine (19.03+) and Docker Compose (2.2.3+) `_ for the first time on a new host machine, you need to set up the Docker repository. Steps from setting up the **Docker repository** to **Docker and Docker Compose installation** are described in the guides for Ubuntu OS and CentOS below. Ubuntu OS +++++++++++ .. _ubuntu_cpu: 1. Update :code:`apt` and install packages for data encryption to use the repository over HTTPS: .. code-block:: bash sudo apt-get update sudo apt-get install \ ca-certificates \ curl \ gnupg \ lsb-release 2. Add the GPG key given by Docker. Use the command below: .. code-block:: bash sudo mkdir -p /etc/apt/keyrings curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg 3. Add the Docker repository using the following command: .. code-block:: bash echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null 4. Update the :code:`apt`: .. code-block:: bash sudo apt-get update 5. Install **Docker** and **Docker Compose Plugin**: .. code-block:: bash sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin 6. Check on how the **Docker** was installed using the command which downloads a test image and runs it in a container: .. code-block:: bash sudo docker run hello-world The container will be started, you will see the operation success message, then the container will automatically be stopped. .. image:: /images/helloworld.png :scale: 40% 7. Make sure the **Docker Compose Plugin** is also installed correctly. Use the following command to check: .. code-block:: bash docker compose version .. image:: /images/docker_compose_v.png :scale: 60% Now all requirements for FindFace Lite are followed, please, go to the next :ref:`STEP ` to upload FindFace Lite installer and license on the server. CentOS +++++++++++ 1. Install the :code:`yum-utils` package and set up the repository. Use the command below: .. code-block:: bash sudo yum install -y yum-utils sudo yum-config-manager \ --add-repo \ https://download.docker.com/linux/centos/docker-ce.repo 2. Install **Docker** and **Docker Compose Plugin**: .. code-block:: bash sudo yum install docker-ce docker-ce-cli containerd.io docker-compose-plugin .. note:: If prompted to accept the GPG key, verify that the fingerprint matches **060A 61C5 1B55 8A7F 742B 77AA C52F EB6B 621E 9F35** value, and if so, accept it. 3. Start Docker using the following command: .. code-block:: bash sudo systemctl start docker 4. Check on how the **Docker** was installed using the command which downloads a test image and runs it in a container: .. code-block:: bash sudo docker run hello-world The container will be started, you will see the operation success message, then the container will automatically be stopped. .. image:: /images/helloworld.png :scale: 40% 5. Make sure the **Docker Compose Plugin** is also installed correctly. Use the following command to check: .. code-block:: bash docker compose version .. image:: /images/docker_compose_v.png :scale: 60% Now all requirements for FindFace Lite are followed, please, go to the next :ref:`STEP ` to upload FindFace Lite installer and license on the server. GPU server preparation ------------------------ To prepare a GPU server to FindFace Lite, please, install `NVIDIA Container Toolkit `_. Before you install NVIDIA Container Toolkit for the first time on a new host machine, you need to prepare server according requrements: * NVIDIA Linux drivers >= 418.81.07 (note that older driver releases or branches are unsupported, to install drivers go to the official `NVIDIA guide `_); * NVIDIA GPU with Architecture >= Kepler; * Docker >= 19.03. Steps from checking GPU server configuration to the **Docker software** and **NVIDIA Container Toolkit** installation are described in the guides for Ubuntu OS and CentOS below. Ubuntu OS +++++++++++ 1. Chek the GPU drivers version using the command below: .. code-block:: bash nvidia-smi **Driver Version:** should be >= 418.81.07. .. image:: /images/nvidia-smi.png :scale: 40% If it is not so, please, go to the official `NVIDIA guide `_ to install the drivers. 2. Check a graphics card model using command below: .. code-block:: bash nvidia-smi -L 3. Verify that graphics card has architecture >= **Kepler**. Find your graphics cards model in the list below and check: +---------------------------------------------------+------------------------------------------------------------------------+ | **Architecture (from the oldest to the newest)** | **Series** | +===================================================+========================================================================+ | **Fermi** | GeForce 400 and 500: GTX 480, GTX 470, GTX 580, GTX 570; | +---------------------------------------------------+------------------------------------------------------------------------+ | **Kepler** | GeForce 600 and 700: Nvidia GTX 680, 670, 660, GTX 780, GTX 770; | +---------------------------------------------------+------------------------------------------------------------------------+ | **Maxwell** | GeForce 900: GTX 960, GTX 970, GTX 980; | +---------------------------------------------------+------------------------------------------------------------------------+ | **Pascal** | GeForce 1000: GTX 1050, 1050 Ti, 1060, 1080; | +---------------------------------------------------+------------------------------------------------------------------------+ | **Turing** | GeForce RTX 2000 and GTX 1600: GTX 1660, GTX 1650, RTX 2060, RTX 2080; | +---------------------------------------------------+------------------------------------------------------------------------+ | **Ampere** | GeForce RTX 3080, RTX 3090, RTX 3070, etc. | +---------------------------------------------------+------------------------------------------------------------------------+ 4. Install the latest version of Docker using the command below: .. code-block:: bash curl https://get.docker.com | sh \ && sudo systemctl --now enable docker .. warning:: If the command doesn't work, please, follow all the steps of :ref:`Docker installation on CPU server `. 5. Setup the **NVIDIA package repository** and the **GPG key**: .. code-block:: bash 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 6. Update the :code:`apt` package: .. code-block:: bash sudo apt-get update 7. Install the **nvidia-docker2 package** and dependencies: .. code-block:: bash sudo apt-get install -y nvidia-docker2 8. Restart the **Docker daemon** to complete the installation after setting the default runtime: .. code-block:: bash sudo systemctl restart docker 9. Check the runtime in the config: .. code-block:: bash cat /etc/docker/daemon.json If there is the **nvidia-container-runtime** in the output, installation is succesful. .. image:: /images/nvidia-deamon.png :scale: 40% Now all requirements for FindFace Lite are followed, please, go to the next :ref:`STEP ` to upload FindFace Lite installer and license on the server. CentOS ++++++++ 1. Chek the GPU drivers version using the command below: .. code-block:: bash nvidia-smi **Driver Version:** should be >= 418.81.07. .. image:: /images/nvidia-smi.png :scale: 40% If it is not so, please, go to the official `NVIDIA guide `_ to install the drivers. 2. Check graphics card model using command below: .. code-block:: bash nvidia-smi -L 3. Verify that graphics card has architecture >= **Kepler**. Find your graphics cards model in the list below and check: +---------------------------------------------------+------------------------------------------------------------------------+ | **Architecture (from the oldest to the newest)** | **Series** | +===================================================+========================================================================+ | **Fermi** | GeForce 400 and 500: GTX 480, GTX 470, GTX 580, GTX 570; | +---------------------------------------------------+------------------------------------------------------------------------+ | **Kepler** | GeForce 600 and 700: Nvidia GTX 680, 670, 660, GTX 780, GTX 770; | +---------------------------------------------------+------------------------------------------------------------------------+ | **Maxwell** | GeForce 900: GTX 960, GTX 970, GTX 980; | +---------------------------------------------------+------------------------------------------------------------------------+ | **Pascal** | GeForce 1000: GTX 1050, 1050 Ti, 1060, 1080; | +---------------------------------------------------+------------------------------------------------------------------------+ | **Turing** | GeForce RTX 2000 and GTX 1600: GTX 1660, GTX 1650, RTX 2060, RTX 2080; | +---------------------------------------------------+------------------------------------------------------------------------+ | **Ampere** | GeForce RTX 3080, RTX 3090, RTX 3070, etc. | +---------------------------------------------------+------------------------------------------------------------------------+ 4. Setup the official **Docker CE repository**: .. code-block:: bash sudo yum-config-manager --add-repo=https://download.docker.com/linux/centos/docker-ce.repo 5. Install the :code:`containerd.io` package: .. code-block:: bash sudo yum install -y https://download.docker.com/linux/centos/7/x86_64/stable/Packages/containerd.io-1.4.3-3.1.el7.x86_64.rpm 6. Install the latest version of **Docker** using the command below: .. code-block:: bash sudo yum install docker-ce -y 7. Ensure the Docker service is running with the following command: .. code-block:: bash sudo systemctl --now enable docker 8. Test your Docker installation by running the hello-world container: .. code-block:: bash sudo docker run --rm hello-world The container will be started, you will see the operation success message, then the container will automatically be stopped. .. image:: /images/helloworld.png :scale: 40% 9. After **Docker** is installed continue with **NVIDIA** installation. Setup the repository and the GPG key using the command below: .. code-block:: bash distribution=$(. /etc/os-release;echo $ID$VERSION_ID) \ && curl -s -L https://nvidia.github.io/libnvidia-container/$distribution/libnvidia-container.repo | sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo 10. Update the :code:`yam` package: .. code-block:: bash sudo yum clean expire-cache 11. Install the :code:`nvidia-docker2 package` and dependencies: .. code-block:: bash sudo yum install -y nvidia-docker2 12. Restart the Docker daemon to complete the installation after setting the default runtime: .. code-block:: bash sudo systemctl restart docker 13. Check the runtime in the config: .. code-block:: bash cat /etc/docker/daemon.json If there is the **nvidia-container-runtime** in the output, installation is succesful. .. image:: /images/nvidia-deamon.png :scale: 40% Now all requirements for FindFace Lite are followed, please, go to the next :ref:`STEP ` to upload FindFace Lite installer and license on the server.