# Getting started

## Overview

The BlurIt On Premise version (aka BlurIt OP) provides a full offline and unlimited self hosted use of BlurIt by deploying the solution directly on your servers.

This guide will go through the installation process of a standard BlurIt OP setup. If you require custom settings related to the number of GPUs and/or the number of workers, please contact us at <contact@blurit.io>.

**If you want to install BlurIt OP on a cloud provider (AWS, Azure, GCP), please** [**follow instructions here**](/cloud-images/introduction)**.**

## Before you start

Before you start, be sure you have received from Wassa the BlurIt OP archive that contains the installation files.

BlurIt OPs runs in a dockerized environment on Linux or Windows, hence the installation of BlurIt OP requires basic knowledge of Linux/Windows and Docker usage.

If you need any help installing BlurIt OP, please contact us at <contact@blurit.io>.


# Requirements

## Hardware requirements

* CPU recommended: 3-4 threads as the base and 1-2 cores per worker on each machine.
* GPU Nvidia (consumer and professional) [computer capability](https://developer.nvidia.com/cuda-gpus) >= sm\_37 for optimal performance
* RAM GPU 4-6 GB for 1 worker depending of the resolution
* RAM > 16 GB
* 60 Go + local storage

## Software dependencies

* Linux Ubuntu >= 20.04 / CentOS >= 8 / Amazon Linux 2 Deep Learning AMI GPU&#x20;
* Windows 10 Pro, 11 Pro and server 2022 with Windows Subsystem for Linux (WSL)
* Install the following dependencies either using the provided script ([Linux](/blurit-on-premise/installation/linux-dependencies) only) or manually ([Linux](/blurit-on-premise/installation/linux-dependencies) or [Windows](/blurit-on-premise/installation/windows-dependencies-wsl)):
  * [nvidia drivers](https://www.nvidia.com/download/index.aspx) recommended >= 470
  * [docker ce](https://docs.docker.com/engine/install/) and [post install linux](https://.docker.com/engine/install/linux-postinstall/)
  * [docker desktop](https://docs.docker.com/desktop/install/windows-install/) for Windows WSL
  * docker-compose <= 1.29
  * [nvidia-docker2](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#setting-up-nvidia-container-toolkit) (set as default docker runtime)

## Blurit archive

* blurit\_stack.yml
* .env
* Blurit-op.postman\_collection.json
* README.md
* licence.txt
* login-registry.txt
* install\_dependencies.sh

###


# Installation

{% content-ref url="/pages/XGRsi3LnCyZ37pzzDvji" %}
[Linux dependencies](/blurit-on-premise/installation/linux-dependencies)
{% endcontent-ref %}

{% content-ref url="/pages/u0NzVXfbZPsHjuBnJzJp" %}
[Windows dependencies (WSL)](/blurit-on-premise/installation/windows-dependencies-wsl)
{% endcontent-ref %}

{% content-ref url="/pages/33MB6VJhfv9yRtJwhgQf" %}
[Configuration](/blurit-on-premise/installation/configuration)
{% endcontent-ref %}

{% content-ref url="/pages/usinf50sM4HYGmrXTSW3" %}
[Run BlurIt OP](/blurit-on-premise/installation/run-blurit-op)
{% endcontent-ref %}

{% content-ref url="/pages/QyDYTQ2GDnrCXKq64Mpq" %}
[Multi-servers installation](/blurit-on-premise/installation/multi-servers-installation)
{% endcontent-ref %}

{% content-ref url="/pages/1j3QnV6qSF26ovSTpiXI" %}
[Post installation verifications](/blurit-on-premise/installation/post-installation-verifications)
{% endcontent-ref %}


# Linux dependencies

*Note: Don't follow this step if you plan to run BlurIt OP on Windows.* [*Go there*](/blurit-on-premise/installation/windows-dependencies-wsl) *instead.*

## Choice 1 : use our dependencies installation script (recommended)

#### Prerequisites Before Installation

Before starting the installation, ensure you have received the archive containing all necessary documents. This archive will be shared via a secured link protected by a password.

**Contents of the Archive**

**Main Archive**: `client_name_YYYYMMDD.tar.gz`

The archive will include the following files:

1. **License File**: `license_client_name_YYYYMMDD_YYYYMMDD`
   * The license file specifies the validity period (start and end dates).
2. **Registry Login**: `login_registry.txt`
   * Contains the credentials to access the registry.
3. **Installation Script**: `linux_installation_script`
   * A script compatible only with Linux systems.
4. **Custom Configuration File** (if applicable): `blurit_stack.yml`

This script will install the software requirements to run BlurIt On-Premise on your server. It will install Nvidia drivers, Docker CE, and Nvidia-docker on Ubuntu, Debian, and RHEL/CentOS. If you are installing BlurIt on an old server and want to maintain specific version dependencies, we don't recommend to use this script but rather to [manually install everything](#manual-dependencies-installation).

To begin, extract the BlurIt OP archive using the following command:

{% code lineNumbers="true" %}

```bash
tar -xzf filename.tar.gz
cd blurit-op
```

{% endcode %}

Replace "filename" with the actual name of the archive that was provided to you.

To start the script, execute the following command:

{% code lineNumbers="true" %}

```sh
sudo ./install_dependencies.sh
```

{% endcode %}

:rotating\_light: After execution of the script, please reboot the server to load the Nvidia drivers and go to the [Configuration](/blurit-on-premise/installation/configuration) page. :rotating\_light:

## Choice 2 : manual dependencies installation

### Nvidia drivers Installation

1. Download the NVIDIA driver >= 470 runfile from: <https://www.nvidia.com/Download/index.aspx?lang=en-us>
2. Open a terminal and navigate to the directory where the downloaded runfile is located.
3. `$ chmod +x <filename>.run` \
   Replace `<filename>` with the actual name of the downloaded runfile.
4. `$ sudo ./<filename>.run`&#x20;
5. `$ sudo reboot`&#x20;

### Docker Installation

The Docker installation documentation is [here](https://docs.docker.com/engine/install/).

{% tabs %}
{% tab title="Ubuntu" %}
{% code lineNumbers="true" fullWidth="false" %}

```bash
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
sudo install -m 0755 -d /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin
```

{% endcode %}
{% endtab %}

{% tab title="Debian" %}
{% code lineNumbers="true" %}

```bash
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
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
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

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
```

{% endcode %}
{% endtab %}

{% tab title="Centos" %}
{% code lineNumbers="true" %}

```bash
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl start docker
```

{% endcode %}
{% endtab %}

{% tab title="RHEL" %}
{% code lineNumbers="true" %}

```bash
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl start docker
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Post-install docker linux (required):&#x20;

{% code lineNumbers="true" %}

```bash
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
```

{% endcode %}

### Nvidia-docker installation

Nvidia-docker installation documentation is [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html).

{% tabs %}
{% tab title="Ubuntu / Debian" %}
{% code lineNumbers="true" %}

```bash
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/stable/deb/nvidia-container-toolkit.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
```

{% endcode %}
{% endtab %}

{% tab title="Centos / RHEL" %}
{% code lineNumbers="true" %}

```bash
curl -s -L https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo | \
  sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo

sudo yum clean expire-cache
sudo yum install -y nvidia-container-toolkit
```

{% endcode %}
{% endtab %}
{% endtabs %}

Configure the Docker daemon to recognize the NVIDIA Container Runtime:

{% code lineNumbers="true" %}

```bash
sudo nvidia-ctk runtime configure --runtime=docker
```

{% endcode %}

Restart the Docker daemon to complete the installation after setting the default runtime:

{% code lineNumbers="true" %}

```bash
sudo systemctl restart docker
```

{% endcode %}

Test if Nvidia-docker is installed:

{% code lineNumbers="true" %}

```bash
sudo docker run --rm --runtime=nvidia --gpus all nvidia/cuda:11.6.2-base-ubuntu20.04 nvidia-smi
```

{% endcode %}

This should result in a console output shown below:

```
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.51.06    Driver Version: 470.51.06    CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla T4            On   | 00000000:00:1E.0 Off |                    0 |
| N/A   34C    P8     9W /  70W |      0MiB / 15109MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
```

### Configuring daemon.json

Open `/etc/docker/daemon.json` with your favorite text editor.

Add `"default-runtime": "nvidia",`  to the json. Exemple:

{% code title="/etc/docker/daemon.json" lineNumbers="true" %}

```json
{
  "default-runtime": "nvidia",
  "runtimes": {
    "nvidia": {
      "args": [],
      "path": "nvidia-container-runtime
    }
  }
}
```

{% endcode %}

### Blurit CLI Installation

The **Blurit CLI** enables you to easily **configure**, **start**, and **interact** with Blurit. It provides a command-line interface to manage features and streamline platform usage.

Start these commands from WSL:

```bash
wget https://cloud.wassa.io/s/Kuj5MDgqkMCdjRv/download --output-document=blurit
chmod +x blurit
sudo mv blurit /usr/bin
```


# Windows dependencies (WSL)

*Don't follow this step if you plan to run BlurIt OP on Linux.* [*Go there*](/blurit-on-premise/installation/linux-dependencies) *instead.*

#### Prerequisites Before Installation

Before starting the installation, ensure you have received the archive containing all necessary documents. This archive will be shared via a secured link protected by a password.

**Contents of the Archive**

**Main Archive**: `client_name_YYYYMMDD.tar.gz`

The archive will include the following files:

1. **License File**: `license_client_name_YYYYMMDD_YYYYMMDD`
   * The license file specifies the validity period (start and end dates).
2. **Registry Login**: `login_registry.txt`
   * Contains the credentials to access the registry.
3. **Custom Configuration File** (if applicable): `blurit_stack.yml`

## Nvidia Driver installation

Download the NVIDIA driver >= 470 exe from: <https://www.nvidia.com/Download/index.aspx?lang=en-us>

You can also update the drivers using [Nvidia Geforce Experience](https://www.nvidia.com/fr-fr/geforce/geforce-experience/).

## Install WSL 2 (Windows Subsystem Linux)

To Check if WSL is installed, open PowerShell as administrator and run:

{% code lineNumbers="true" %}

```powershell
wsl -l –v
```

{% endcode %}

If WSL is not installed:

{% code lineNumbers="true" %}

```
wsl --install -d Ubuntu
```

{% endcode %}

Then reboot your machine.

It is possible to modify the resources allocated to WSL. For more information, you can refer to this link: <https://learn.microsoft.com/fr-fr/windows/wsl/wsl-config#wslconfig>.

## Docker installation

Instruction to install docker CE on windows with WSL 2 backend : <https://docs.docker.com/desktop/install/windows-install/>.

During the install don't forget to tick the Use **WSL 2 instead of Hyper-V** checkbox.

Additionally, if you want the BlurIt app to restart automatically when the machine restarts, check the box labeled 'Start Docker Desktop when you sign, in.'

<figure><img src="/files/JiXQpTr8CT9Rku5A0NcL" alt=""><figcaption></figcaption></figure>

## Nvidia-docker installation

To enter WSL, open PowerShell and type `wsl` followed by pressing Enter.

{% code lineNumbers="true" %}

```bash
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/stable/deb/nvidia-container-toolkit.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
```

{% endcode %}

Verify that Nvidia-Docker is installed:

{% code lineNumbers="true" %}

```bash
sudo docker run --rm --gpus all nvidia/cuda:11.6.2-base-ubuntu20.04 nvidia-smi -a
```

{% endcode %}

### Configuring Docker daemon

Append the following JSON content on the Docker Desktop config like this:

{% code lineNumbers="true" %}

```json
{
	... # current content
	"runtimes": {
		"nvidia": {
			"path": "/usr/bin/nvidia-container-runtime",
			"runtimeArgs": []
		}
	},
	"default-runtime": "nvidia"
}
```

{% endcode %}

<figure><img src="/files/aqY0dxHLB1qmTPwT1tUn" alt=""><figcaption></figcaption></figure>

Restart Docker for the change to take effect.

### Post-install docker linux on WSL (required):&#x20;

{% code lineNumbers="true" %}

```bash
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
```

{% endcode %}

### Blurit CLI Installation

The **Blurit CLI** enables you to easily **configure**, **start**, and **interact** with Blurit. It provides a command-line interface to manage features and streamline platform usage.

Start these commands from WSL:

```bash
wget https://cloud.wassa.io/s/Kuj5MDgqkMCdjRv/download --output-document=blurit
chmod +x blurit
sudo mv blurit /usr/bin
```


# Configuration

## Blurit CLI

The Blurit CLI is installed during the [Linux](/blurit-on-premise/installation/linux-dependencies) or [Windows](/blurit-on-premise/installation/windows-dependencies-wsl) dependencies installation process. This command will prompt you with several questions to assist in setting up your Blurit installation. If Blurit team send you a compose file, it's possible to pass it as argument.

```bash
blurit configure
```

For custom installations, if a `blurit_stack.yml` file is provided, include it as an argument when executing the relevant commands :<br>

```bash
blurit configure blurit_stack.yml
```

## Configuration explanation

The following section provides an explanation of the various questions asked during the configuration process.

### Model

During the configuration process, you'll be prompted to select the AI model version that best fits your performance and precision needs. BlurIt offers two options:

* **tiny**: This model is optimized for speed, processing images and videos faster. It is ideal for scenarios where performance is critical, although it comes with a very slight reduction in precision. This is the default option.
* **standard**: This version provides a balance between speed and precision. While still optimized for fast processing, it offers slightly higher accuracy compared to the tiny model, making it suitable for tasks where precision is more important.

### Web App Authentication

To secure access to the BlurIt web app, you’ll need to set up a username and password during the configuration process. This protects the web interface and ensures that only authorized users can manage files and access data.

1. **Username**: Create a unique username for accessing the web app.
2. **Password**: Set a strong password for added security. Store it securely for future access.

Alternatively, you may choose not to set a username and password for quicker access. However, please note that **disabling authentication** means the web app will be openly accessible, which may expose your data to unauthorized access. This choice comes with the user’s full responsibility for securing access to the application.

### **SSL Configuration**&#x20;

For enhanced security, you can enable SSL to encrypt communication between clients and the server. During the configuration process, you will be prompted to provide the following:

1. **Server Name**: Specify the domain name or IP address used to access your BlurIt web app.
2. **Path to SSL Certificate File (.pem)**: Provide the full path to your SSL certificate file. This file contains the public key and is required for establishing secure HTTPS connections.
3. **Path to SSL Private Key File (.pem)**: Provide the full path to your private key file. This file must correspond to the SSL certificate provided.

If you do not have an SSL certificate, you can use services like [Let's Encrypt](https://letsencrypt.org/) to generate one for free or use self-signed certificates for internal testing.

By enabling SSL and authentication, you ensure that your data and web app are protected against unauthorized access and interception.

### Local storage

These settings define the base directories where BlurIt OP will locate input files (to be processed) and where it will store the output files (blurred videos/images and detection JSONs) on the local server storage, i.e., on the server where BlurIt OP is running.

#### Accessing Windows Drives on WSL

If you are using Windows Subsystem for Linux (WSL), your Windows drives are accessible under the `/mnt/` directory. Each drive is mapped to its respective folder:

* **Drive C:** Located at `/mnt/c/`
* **Drive D:** Located at `/mnt/d/`, and so on.

For example, if you need to access a file located at `C:\Users\YourName\Documents`, you can find it in WSL at:

```bash
/mnt/c/Users/YourName/Documents
```

This mapping makes it easy to navigate between your Windows environment and the Linux subsystem.

The input and output directories will be assigned to the user with ID 1200.

**Why UID/GID 1200?**&#x20;

This choice ensures compatibility across different systems and avoids conflicts with system-reserved or commonly used IDs. It provides a dedicated user/group for these services, improving security and isolation.

### S3 storage

These settings allow the use of S3 storage for the input and output directories for media.

### GPU settings

Select the GPU you wish to use with Blurit.

### Max Threads number

This variable represents the maximum number of threads that the reencoding step will utilize on your CPU. Increasing this value can result in faster reencoding.&#x20;

However, it's important to note that you should reserve some threads for other processes.

Avoid using the maximum number of available threads on your server, as it may impact the performance of other applications.

#### Webhook (optional)

This setting is a configuration that defines a route or URL where a POST request can be sent. This endpoint is typically used to send JSON data to another system or service.

In this specific example, when the POST request is made to the "CUSTOM\_WEBHOOK\_ENDPOINT" route, the JSON payload being sent is as follows:

```json
{
  "status": "Succeeded",
  "task_id": "abc-123-456-789"
}
```

The JSON payload contains two key-value pairs:

* "status" with a value of "Succeeded"
* "task\_id" with a value of "abc-123-456-789"

The purpose of this webhook is to notify or provide information to the system or service listening at the specified endpoint about the status of a task or operation. The receiving system can then process this data according to its requirements.

### Jobs timeouts

This parameter represents the amount of time the application waits before changing the status of a task to "failed." By default, it is set to 43200000 milliseconds (equivalent to 12 hours).


# Run BlurIt OP

## Blurit CLI

The Blurit CLI is installed during the [Linux](/blurit-on-premise/installation/linux-dependencies) or [Windows](/blurit-on-premise/installation/windows-dependencies-wsl) dependencies installation process. This command will prompt you with several questions to assist in setting up your Blurit installation.

```bash
blurit start
```

The application will be available on ports **80** (HTTP) and **443** (HTTPS). The API can be accessed at the URL `/api`, and the Flower interface at `/flower`. The manager remains accessible via the standard URL (DNS or IP).


# Multi-servers installation

#### Add a worker node

🚨 This section pertains to clustering Blurit On-Premise. If you would like more information about it, please contact our customer services.🚨&#x20;

Before joining the manager machine, you need to open some ports:

* `TCP` port `2377` for cluster management communications
* `TCP` and `UDP` port `7946` for communication among nodes
* `UDP` port `4789` for overlay network traffic

Get Join-token on manager machine:

{% code lineNumbers="true" %}

```bash
docker swarm join-token worker
```

{% endcode %}

Replace `<worker-token>` with the actual token obtained from the previous command, and `<ip-of-manager-machine>` with the IP address or hostname of the manager machine. This command will join the worker machine to the swarm cluster.

Join the swarm cluster on the worker machine (<https://docs.docker.com/engine/reference/commandline/swarm\\_join/>):

{% code lineNumbers="true" %}

```bash
docker swarm join --token <worker-token> <ip-of-manager-machine>:2377
```

{% endcode %}

#### Add label to node

Add a label allow to chose the machine to deploy the workers. For multiple machine installation, it's mandatory for a smooth deployment.

This command display every node present on the swarm cluster:

{% code lineNumbers="true" %}

```bash
docker node ls
```

{% endcode %}

Add a label to a node:

{% code lineNumbers="true" %}

```bash
docker node update --label-add blurit-worker-<number of the machine> <node-name>
```

{% endcode %}

Replace `<machine-number>` with the appropriate number for the machine, and `<node-name>` with the name of the node. This command adds a label to the specified node, which will be used for deployment purposes.


# Post installation verifications

## Blurit CLI

The Blurit CLI is installed during the [Linux](/blurit-on-premise/installation/linux-dependencies) or [Windows](/blurit-on-premise/installation/windows-dependencies-wsl) dependencies installation process. This command will prompt you with several questions to assist in setting up your Blurit installation.

```bash
blurit status
```


# Usage

As said in the [Configuration](/blurit-on-premise/installation/configuration) section, BlurIt OP Web Manager or API works within the paths set in `LOCAL_STORAGE_INPUT_PATH` and `LOCAL_STORAGE_OUTPUT_PATH`. Every processed media will be stored in `LOCAL_STORAGE_OUTPUT_PATH`, while the original media will be processed from `LOCAL_STORAGE_INPUT_PATH`.

There are two ways to process files with BlurIt OP:

1. Manager Webapp: The web app manager provides a Graphical User Interface (GUI) accessible at `http://<host> or https://<host>`, where "host" refers to the IP address of the machine where BlurIt OP is deployed or the dns url configured. This interface allows non-developers to process files easily.
2. API: The API is accessible at `http://<host>/api or https://<host>/api`. It allows developers to integrate BlurIt OP file processing capabilities into their own applications or workflows programmatically. This allows for greater flexibility and automation.


# Manager Webapp

## Overview

The Manager is a web application that facilitate usage of BlurIt OP by providing a GUI to non-developer users. It also provide an history of taks processed by BlurIt OP, wether thoses tasks have been created from the Manager or from the API.

## Access

You can access the Manager by visiting `http://<HOST> or https://<HOST>`, where `HOST` is the IP address of the machine or the dns url configured in the [Configuration](/blurit-on-premise/installation/configuration) section.

## License activation

Before using BlurIt OP, you must activate the license.

&#x20;Once you're on the Manager, click on the "Update License" button located at the top right corner of your screen.

<figure><img src="/files/kAOEIxFRlsulzYnGslkC" alt=""><figcaption></figcaption></figure>

After navigating to the Account (`/account`) page, click on the "Edit license" button. Next, paste the license into the designated text area and confirm the changes by clicking on the "Update license" button.

{% embed url="<https://cloud.wassa.io/s/nhQZwaY8uPUs8xP/download>" %}

## Tasks

### Create a task

To start a task, go to Tasks page (`/tasks`) by clicking on side menu "Tasks" and click on the  "Anonymize" button.

<figure><img src="/files/xk9QDXgop0vcy2T6Fk9e" alt=""><figcaption></figcaption></figure>

You can now follow 3 simple steps to create a new task:

1. **Source**: Choose either a file from your PC or a whole folder to process from the local storage or S3.
   * To process a file from your PC, use the file selection option or simply drag and drop the file into the designated area.
   * To process a folder, enter its path in the field. The path you enter represents a subdirectory of the `LOCAL_STORAGE_INPUT_PATH` (or `STORAGE_S3_BUCKET` if you use S3 storage) set in the [Configuration](/blurit-on-premise/installation/configuration) section. Please ensure that the directory already exists and has some files in it. If you don't enter anything, BurIt OP will process files directly in `LOCAL_STORAGE_INPUT_PATH` (or `STORAGE_S3_BUCKET`)
2. **Blur options**: Select the desired task options from the following choices:
   * Face anonymisation
   * Plates anonymisation
   * Coordinates position
   * Add  `_anonymized` suffix
   * Keep the audio track (only for zip/directory/videos)
   * Processing report (zip files only)
     * This option allows you to include in the ZIP file a CSV summary indicating the anonymization success status for all the files that were part of the original ZIP
   * Keep the files that cannot be blured (zip files only)
     * This option allows you to keep, within the anonymized ZIP, the files with unsupported formats that cannot be processed by the software
3. **Output path**: Specify the desired output location, whether it's local storage or S3. You can either change the name of the output file or create a new directory in the output to store your processed media. As for the source, the directory you enter here represents a subdirectory of `LOCAL_STORAGE_OUTPUT_PATH` (or `STORAGE_S3_BUCKET` if you use S3 storage). If you don't enter anything, BurIt OP will save processed files directly in `LOCAL_STORAGE_OUTPUT_PATH` (or `STORAGE_S3_BUCKET`)

<figure><img src="/files/WGqtwbh4iX3kR62iDp3B" alt=""><figcaption></figcaption></figure>

Click on the "Create" button and confirm to initiate the task.

{% embed url="<https://cloud.wassa.io/s/ryy3aFELs8xb8hT/download>" %}

### List tasks

The Tasks page list all the tasks that have been created in BlurIt OP (using the Manager or the API). For each task, the Manager displays:

* The date
* The type (Picture, Video or Archive)
* The file name
* The file size
* The task status (updated in real time)
* A button to download the processed file

The list can be filtered.

### Download processed files

From the Tasks page, click on the download icon located in the file column.

<figure><img src="/files/DqmiGikIcxr6XeeTYI9V" alt=""><figcaption></figcaption></figure>

### Using The Redact Tool

The Redact Tool allows you to access all detections within your media (image or video) so you can adjust, add, or remove them as needed — all while staying within your local environment.

### Access&#x20;

Once your file (image or video) has been processed, you can edit the detections by clicking on this icon to access the redact tool.

<figure><img src="/files/IFKy7FqIRdWtul8tqVHc" alt=""><figcaption></figcaption></figure>

Once done, your media will appear along with all the detected elements.

<figure><img src="/files/KeVE6DPTjzoYnAtw3xeg" alt=""><figcaption></figcaption></figure>

### Adjusting Detections&#x20;

* **Adjusting a detection**\
  Click on the detection of your choice. You can resize or move it on the frame as needed.

<figure><img src="/files/aUgy3SpwTYqOh3LzLlM5" alt=""><figcaption></figcaption></figure>

* **Deactivating a detection**\
  Click on the detection to turn it from green to gray. It will **no longer be applied** to the image or video. You can also deactivate it by unchecking the corresponding box in the left panel, just above the detection preview. You can **reactivate it at any time**.

<figure><img src="/files/QHMo9cVfti1WTKuw4IY0" alt=""><figcaption></figcaption></figure>

* &#x20;**Deleting a detection** &#x20;

  If you want to permanently delete this detection with no option to undo, click “Delete Track.”

<figure><img src="/files/KxTgxLNlm9OgZ9f6EMvP" alt=""><figcaption></figcaption></figure>

* **To add a new detection manually:**\
  In the menu bar at the top left of the screen, you can choose the type of detection you want to add:&#x20;

  * License plate detection&#x20;
  * Face detection&#x20;
  * Custom detection, which you can adjust to match your object’s shape&#x20;

  ➜ When creating a manual detection, make sure to **move it along with your object’s motion in the video**

<figure><img src="/files/2YZ1LbtWNkdzdBUFOXtE" alt=""><figcaption></figcaption></figure>

* **Saving & reprocessing your file**\
  You can save the adjustments you’ve made to access them later, or reprocess the media to apply your changes.

<figure><img src="/files/MbTFoNFJ2Ye9e90BoAfY" alt=""><figcaption></figcaption></figure>


# API

The BlurIt OP API offers several functionalities. It allows you to obtain the current license by using the GET method on the [`/api/license`](/blurit-on-premise/usage/api/license) endpoint. Additionally, you can add a new license by using the POST method on the same endpoint. If a license already exists, it will be replaced by the new license.

Furthermore, the API provides the capability to add a blur task to the queue by using the POST method on the [`/api/blur_it`](/blurit-on-premise/usage/api/tasks) endpoint. You can also add a blur task for a directory by using the POST method on the [`/api/blur_it/directory`](/blurit-on-premise/usage/api/tasks/process-a-directory) endpoint.

Moreover, the API allows you to retrieve the status of a task by using the GET method on the [`/api/task/{task_id}`](/blurit-on-premise/usage/api/tasks/get-the-status-of-a-task) endpoint, where "task\_id" is the task identifier.

\
The API documentation can be found at `http://<HOST>/api/docs`, where `HOST` is the IP address of the machine.

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td></td><td>License</td><td></td><td><a href="/pages/fyzHZmNTxiZdMLer38C5">/pages/fyzHZmNTxiZdMLer38C5</a></td></tr><tr><td></td><td>Blur it</td><td></td><td><a href="/pages/o6O0IRb9m627GmtW8A4A">/pages/o6O0IRb9m627GmtW8A4A</a></td></tr><tr><td></td><td>Blur it directory</td><td></td><td><a href="/pages/WmpKlZGkMqQi7MBpanHf">/pages/WmpKlZGkMqQi7MBpanHf</a></td></tr><tr><td></td><td>Task</td><td></td><td><a href="/pages/epuVjx0DYx1XI0b1chXz">/pages/epuVjx0DYx1XI0b1chXz</a></td></tr></tbody></table>


# License

{% openapi src="/files/Xv4fZHf4yUvciw3wHbGb" path="/api/license" method="get" %}
[openapi.json](https://content.gitbook.com/content/uJafrCUXoVcvKcrCtpgA/blobs/XIIZCMt9oP33tN09k7yQ/openapi.json)
{% endopenapi %}

{% openapi src="/files/Xv4fZHf4yUvciw3wHbGb" path="/api/license" method="post" %}
[openapi.json](https://content.gitbook.com/content/uJafrCUXoVcvKcrCtpgA/blobs/XIIZCMt9oP33tN09k7yQ/openapi.json)
{% endopenapi %}


# Tasks

* [Process a directory](/blurit-on-premise/usage/api/tasks/process-a-directory)
* [Process a file](/blurit-on-premise/usage/api/tasks/process-a-file)
* [Process a zip file](/blurit-on-premise/usage/api/tasks/process-a-zip-file)
* [Get the status of a task](/blurit-on-premise/usage/api/tasks/get-the-status-of-a-task)
* [Revoke a task](/blurit-on-premise/usage/api/tasks/revoke-a-task)


# Process a directory

## Blur It Directory Post

> Add a blurit directory task in task queue.

```json
{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/blur_it/directory":{"post":{"summary":"Blur It Directory Post","description":"Add a blurit directory task in task queue.","operationId":"blur_it_directory_post_api_blur_it_directory_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectAndBlurDirectoryBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRespsonse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DetectAndBlurDirectoryBody":{"title":"DetectAndBlurDirectoryBody","required":["input_directory","output_directory"],"type":"object","properties":{"input_directory":{"$ref":"#/components/schemas/InputDirectory"},"output_directory":{"$ref":"#/components/schemas/OutputDirectory"},"export_media":{"title":"Should we export the blured media ?","type":"boolean","default":true},"export_json":{"title":"Should we export the detections list ?","type":"boolean","default":true},"blur_plates":{"title":"Should we blur plates ?","type":"boolean","default":true},"blur_heads":{"title":"Should we blur heads ?","type":"boolean","default":true},"keep_audio":{"title":"Should we keep audio in the output medias ?","type":"boolean","default":true}},"description":"Detect and blur directory route's body.\nAt least one of output_media or output_json is needed."},"InputDirectory":{"title":"InputDirectory","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"Directory's relative path","type":"string"},"auto_delete":{"title":"If set to True, deletes the input file after processing.","type":"boolean","default":false}},"description":"Input directory structure"},"OutputDirectory":{"title":"OutputDirectory","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"Directory's relative path","type":"string"}},"description":"Output directory structure"},"TaskRespsonse":{"title":"TaskRespsonse","required":["task_id"],"type":"object","properties":{"task_id":{"title":"Unique task hash","type":"string"}},"description":"Task POST result structure"},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}
```


# Process a file

## Blur It Post

> Add a blurit task in task queue.

```json
{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/blur_it":{"post":{"summary":"Blur It Post","description":"Add a blurit task in task queue.","operationId":"blur_it_post_api_blur_it_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectAndBlurBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRespsonse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DetectAndBlurBody":{"title":"DetectAndBlurBody","required":["input_media"],"type":"object","properties":{"input_media":{"$ref":"#/components/schemas/InputFile"},"output_media":{"title":"Output video/image informations","allOf":[{"$ref":"#/components/schemas/OutputMedia"}]},"output_json":{"title":"Output JSON informations (contains detections' descriptions)","allOf":[{"$ref":"#/components/schemas/OutputJSON"}]},"blur_plates":{"title":"Should we blur plates ?","type":"boolean","default":true},"blur_heads":{"title":"Should we blur heads ?","type":"boolean","default":true},"keep_audio":{"title":"Should we keep audio in the output media ?","type":"boolean","default":true}},"description":"Detect and blur route's body.\nAt least one of output_media or output_json is needed."},"InputFile":{"title":"InputFile","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"File's relative path","type":"string"},"expires_at":{"title":"Input file's expiration date. Works only with S3 storage.","type":"string"},"auto_delete":{"title":"If set to True (or not set), deletes the input file after processing.","type":"boolean","default":true}},"description":"Input File structure."},"OutputMedia":{"title":"OutputMedia","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"File's relative path","type":"string"},"lifespan":{"title":"Number of seconds the output will be stored. Works only with S3 storage.","type":"integer"}},"description":"Output Media file structure."},"OutputJSON":{"title":"OutputJSON","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"File's relative path","type":"string"},"lifespan":{"title":"Number of seconds the output will be stored. Works only with S3 storage.","type":"integer"}},"description":"Output JSON file structure."},"TaskRespsonse":{"title":"TaskRespsonse","required":["task_id"],"type":"object","properties":{"task_id":{"title":"Unique task hash","type":"string"}},"description":"Task POST result structure"},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}
```


# Process a zip file

## Zip Blur It Post

> Add a zip\_detect\_and\_blur task in task queue.\
> \
> returns a {"task\_id": str}

```json
{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/blur_it/zip":{"post":{"summary":"Zip Blur It Post","description":"Add a zip_detect_and_blur task in task queue.\n\nreturns a {\"task_id\": str}","operationId":"zip_blur_it_post_api_blur_it_zip_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZipBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ZipBody":{"title":"ZipBody","required":["input_zip","output_zip"],"type":"object","properties":{"input_zip":{"title":"Input zip storage informations","allOf":[{"$ref":"#/components/schemas/InputZip"}]},"output_zip":{"title":"Output zip storage informations","allOf":[{"$ref":"#/components/schemas/OutputZip"}]},"report_format":{"title":"Fomat of the report file. Set to null if you don't want a report file. Possible values: \"csv\", null","type":"string","default":"csv"},"save_unknown_files":{"title":"If set to True, unprocessable files extensions will be returned with processed files, in the output zip. If set to False, they will be deleted.","type":"boolean","default":false},"add_output_sufix":{"title":"If set to True, output files names will be suffixed (eg: \"file.jpg\" => \"file_anonymized.jpg\")","type":"boolean","default":true},"export_media":{"title":"Should we export the blured media ?","type":"boolean","default":true},"export_json":{"title":"Should we export the detections list ?","type":"boolean","default":true},"blur_plates":{"title":"Should we blur plates ?","type":"boolean","default":true},"blur_heads":{"title":"Should we blur heads ?","type":"boolean","default":true},"keep_audio":{"title":"Should we keep audio in the output media ?","type":"boolean","default":true}}},"InputZip":{"title":"InputZip","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"File's relative path","type":"string"},"expires_at":{"title":"Input file's expiration date. Works only with S3 storage.","type":"string"},"auto_delete":{"title":"If set to True (or not set), deletes the input file after processing.","type":"boolean","default":true}},"description":"Output JSON file structure."},"OutputZip":{"title":"OutputZip","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"File's relative path","type":"string"},"lifespan":{"title":"Number of seconds the output will be stored. Works only with S3 storage.","type":"integer"}},"description":"Output Zip file structure."},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}
```


# Get the status of a task

{% openapi src="/files/Xv4fZHf4yUvciw3wHbGb" path="/api/task/{task\_id}" method="get" %}
[openapi.json](https://content.gitbook.com/content/uJafrCUXoVcvKcrCtpgA/blobs/XIIZCMt9oP33tN09k7yQ/openapi.json)
{% endopenapi %}


# Revoke a task

## Revoke Task

> Revokes a posted task. For zip/directories, it doesn't stop the sent sub-tasks

```json
{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/task/{task_id}/revoke":{"put":{"summary":"Revoke Task","description":"Revokes a posted task. For zip/directories, it doesn't stop the sent sub-tasks","operationId":"revoke_task_api_task__task_id__revoke_put","parameters":[{"required":true,"schema":{"title":"Task Id","type":"string"},"name":"task_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"TaskMessageResponse":{"title":"TaskMessageResponse","required":["task_id","message"],"type":"object","properties":{"task_id":{"title":"Unique task hash","type":"string"},"message":{"title":"A message related to the route","type":"string"}},"description":"Task POST result structure"},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}
```


# Command line interface

## Overview

The Blurit command line interface, this CLI lets you interact with Blurit On-Premise to perform various tasks related to media anonymization.

## CLI

The main Blurit CLI command.

```bash
blurit [OPTIONS] COMMAND [ARGS]...
```

### License

Manage Blurit licenses.

#### **info**

Displays all Blurit license information.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```shell
blurit license info
```

Response:

```
+------------+--------------------------+
| Property   | Value                    |
+============+==========================+
| Start Date | 2023-07-31T22:00:00.000Z |
+------------+--------------------------+
| End Date   | 2023-12-31T21:59:59.000Z |
+------------+--------------------------+
| License    | LICENSE                  |
+------------+--------------------------+
```

#### **add**

Upload or update a Blurit On-Premise license.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```shell
blurit license add LICENSE
```

Response:

```
+------------+--------------------------+
| Property   | Value                    |
+============+==========================+
| Start Date | 2023-06-27T22:00:00.000Z |
+------------+--------------------------+
| End Date   | 2023-09-30T21:59:59.000Z |
+------------+--------------------------+
| License    | LICENSE                  |
+------------+--------------------------+
```

### Tasks

Manage Blurit tasks.

#### **create**

Create a new Blurit task. Options vary depending on the input type (file, directory, S3 or s3-directory). File processing only needs input argument but output can be specified to store the exit media to a precise location.

options:

* \--input-file \[file|directory|s3|s3-directory] REQUIRED
* \--no-face-blur Disable face blur.&#x20;
* \--no-plate-blur Disable plate blur.&#x20;
* \--json-coord Use JSON coordinates.&#x20;
* \--auto-delete Auto deletion of input media&#x20;
* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json] Output format in JSON

```shell
blurit task create [OPTIONS] INPUT OUTPUT
```

Example: Create a task by specifying input and output directories:

```bash
blurit task create --input-type directory input output
```

Response:

```
job id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
```

#### **status**

Get the status of a specific task using its ID.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

return:

* Succeeded
* Started
* Sent
* Failed
* Couldn't contact the Blurit server

```shell
blurit task status TASK_ID
```

Example:

```bash
blurit tasks status 31bc8405-4a56-4cb2-a67e-689797ad9a1a
```

Response:

```bash
Succeeded
```

#### **list**

List history call tasks.

options:

* \--page TEXT Specify the page number&#x20;
* \--count TEXT Specify the number of results per page&#x20;
* \--starting-date TEXT Specify the starting date&#x20;
* \--ending-date TEXT Specify the ending date&#x20;
* \--filetype \[picture|video|directory] Specify the file type
* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```bash
blurit list
```

Response:

```
+--------------------------+-------------------+-------------+--------------------------------------+---------------+-----------------------+---------------+
| Created At               | Processing Time   | File Type   | Job ID                               | File Name     | Output Media URL      | Task Status   |
+==========================+===================+=============+======================================+===============+=======================+===============+
| 2023-08-24T09:18:42.625Z | 05:42:50.70       | directory   | 31bc8405-4a56-4cb2-a67e-689797ad9a1a | 629d57_part_1 | 629d57_part_2_process | Succeeded     |
+--------------------------+-------------------+-------------+--------------------------------------+---------------+-----------------------+---------------+

```

### Configure

Configure the Blurit application, need to be done at least once before first deployment ('blurit start').

```
blurit configure
```

### Start

Start the Blurit server, CLI must be on the host machine.

```
blurit start
```

### Restart

Restart the Blurit server, CLI must be on the host machine.

```
blurit restart
```

### Stop

Stop the Blurit server, CLI must be on the host machine.

```
blurit stop
```

### Stats

Display total and period (month, day) statistics.

options:

* \--date-start TEXT Starting date with format: %Y-%m-%d&#x20;
* \--date-end TEXT Ending date with format: %Y-%m-%d&#x20;
* \--granularity \[day|month] Display statistics by month or days&#x20;
* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json] Output format in JSON&#x20;
* \--help Show this message and exit.

```
blurit stats
```

**Response:**

```
+------------------------------+-----------+
| Metric                       | Value     |
+==============================+===========+
| Total Videos API Calls       | 73        |
+------------------------------+-----------+
| Total Pictures API Calls     | 443       |
+------------------------------+-----------+
| Total Videos Consumption     | 3.33 GB   |
+------------------------------+-----------+
| Total Pictures Consumption   | 806.07 MB |
+------------------------------+-----------+
| Monthly Videos API Calls     | 4         |
+------------------------------+-----------+
| Monthly Pictures API Calls   | 8         |
+------------------------------+-----------+
| Monthly Videos Consumption   | 22.12 MB  |
+------------------------------+-----------+
| Monthly Pictures Consumption | 9.42 MB   |
+------------------------------+-----------+
```

### Doc

Display link to documentation.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```
blurit doc
```

response:

```
API Documentation:
Operation: https://doc-op.blurit.io
Local: http://127.0.0.1:8084/api/docs
```

### Uninstall

Uninstall the Blurit server, CLI must be on the host machine.

```
blurit uninstall
```

#### **Output Format**&#x20;

The Blurit CLI supports two output formats: text (default) and JSON. You can specify the output format using the -o or --output-format option. For example, to get JSON output, use -o json.

Example:

```
blurit tasks status 31bc8405-4a56-4cb2-a67e-689797ad9a1a -o json
```

Response:

```
{'task_id': '31bc8405-4a56-4cb2-a67e-689797ad9a1a', 'status': 'Succeeded', 'result': {'input_directory': {'protocol': 'file', 'path': 'input/629d57_part_2', 'auto_delete': False}, 'output_directory': {'protocol': 'file', 'path': 'output/629d57_part_2_process'}, 'size': {'VIDEO': 4979394177}, 'nb_files': {'VIDEO': 252}}}
```

#### **Support and Contribution**&#x20;

If you have any questions, issues, or would like to make a return of the Blurit CLI, please contact us at <support@blurit.io>. We hope this guide helps you effectively use the Blurit CLI to manage your media anonymization tasks.


# Monitoring With Flower

**Accessing the Flower Web Interface**

Once the installation of Blurit is complete, Flower's web interface is accessible at:

```arduino
http://<your-server-address>/flower
```

Use the **username** and **password** configured during the installation of Blurit to log in.

**Overview of the Interface**

The Flower interface provides an intuitive way to monitor and manage Celery tasks and workers in real-time. Below is a detailed breakdown of the key sections and columns in the interface.

## **Dashboard: Monitoring Workers Overview**

The **Dashboard** tab in Flower provides an overview of all Celery workers currently running. This page allows you to quickly monitor worker states and performance.

**Column Descriptions**

1. **Worker Name**
   * Displays the unique name of each worker. Typically, the name is prefixed with `celery@` followed by a unique identifier (often based on the hostname).
   * Example: `celery@18e5d5189283`.
2. **Status**
   * Indicates the current status of the worker.
   * **Online**: The worker is active and communicating with the broker.
   * **Offline**: The worker is not responding or has been stopped.
3. **Active**
   * The number of tasks currently being processed by this worker.
   * A high value here relative to the worker’s capacity could indicate overload.
4. **Processed**
   * The total number of tasks processed by the worker since it started.
5. **Failed**
   * The total number of tasks that have failed on this worker.
   * A high number may indicate recurring issues with specific tasks or code.
6. **Succeeded**
   * The total number of tasks successfully executed by the worker.
7. **Retried**
   * The number of tasks that were retried after encountering a temporary error.
8. **Load Average**
   * The system's average load (CPU, memory) for the container or machine running the worker.
   * Format: `1 min, 5 min, 15 min`.
   * Example: `0.19, 0.08, 0.08` indicates a low load across all three timeframes.

**Available Actions**

* **Search Bar**: Use the search bar in the top-right corner to filter workers by name or other attributes. This is helpful when managing many workers.
* **Refresh**: Click the **Refresh** button to update the data displayed on the dashboard.

<figure><img src="/files/k44bUJQI5XWAC0wZCwyy" alt=""><figcaption></figcaption></figure>

## **Tasks: Monitoring and Managing Individual Tasks**

The **Tasks** tab in Flower allows you to monitor the state and details of individual Celery tasks in real-time. This tab is especially useful for diagnosing specific issues or analyzing task performance.

**Column Descriptions**

1. **Name**
   * The name of the task, as defined in your Celery code.
   * Example: `blurit.image`.
   * This typically corresponds to a function or method in your application.
2. **UUID**
   * A unique identifier for each task, useful for debugging or referencing specific tasks.
   * Example: `c2e583bc-1dc9-4193-9df5-fe412aa0b180`.
3. **State**
   * The current state of the task.
   * Common states include:
     * **PENDING**: The task is waiting to be executed.
     * **STARTED**: The task is currently running.
     * **SUCCESS**: The task has completed successfully.
     * **FAILURE**: The task execution failed.
   * Example in the screenshot: **SUCCESS**.
4. **args**
   * The positional arguments passed to the task when it was executed.
   * Example: `()` (no positional arguments in this case).
5. **kwargs**
   * The keyword arguments (named parameters) passed to the task.
   * Example:

     ```json
     jsonCopier le code{
         "input_image": {"protocol": "file", "path": "input/1732010550292-480.jpg"},
         "output_image": {"protocol": "file", "path": "output/878ac326-2b6c-482e-9888-e4346d285ad0.jpg"},
         "lifespan": 3600
     }
     ```
6. **Result**
   * The result returned by the task after execution.
   * Example (summary):

     ```json
     jsonCopier le code{
         "input_image": {"protocol": "file", "path": "input/1732010550292-480.jpg"},
         "output_image": {"protocol": "file", "path": "output/878ac326-2b6c-482e-9888-e4346d285ad0.jpg"},
         "chronos": {"total": 2.219586, "childs": {...}}
     }
     ```
7. **Received**
   * The timestamp when the task was received by the worker.
   * Example: `2024-11-19 10:02:30.472`.
8. **Started**
   * The timestamp when the task started execution.
   * Example: `2024-11-19 10:02:30.478`.
9. **Runtime**
   * The total time the task took to execute, in seconds.
   * Example: `2.733`.
10. **Worker**
    * The Celery worker that executed the task.
    * Example: `celery@83b122840b58`.

<figure><img src="/files/49ljQW55RAL4qq2Ko6Gw" alt=""><figcaption></figcaption></figure>

## **Usage Tips**

1. **Search for Tasks**
   * Use the search bar to filter tasks by **UUID**, **Name**, or **State**. This is especially helpful when dealing with large numbers of tasks.
2. **Diagnose Failures**
   * For tasks in the **FAILURE** state, the `kwargs` and `Result` columns provide valuable details about what went wrong.
3. **Performance Optimization**
   * Use the `Runtime` column to identify tasks that take a long time to execute, which may need optimization.
4. **Input and Output Validation**
   * The `kwargs` and `Result` columns are also useful for verifying the input and output data of specific tasks.


# Release notes

## 2.7.4&#x20;

### ✨ New Features & Improvements&#x20;

* We’ve added the ability to **customize your detections** through the new redact too&#x6C;**.** It allows you to **edit detections** in your images or videos — you can **adjust, add, or remove** them as needed.

## 2.5.4&#x20;

### ✨ New Features & Improvements&#x20;

* An audio removal option is now available for your videos.You can choose to remove the audio track to enhance the protection of any personal data that may have been recorded during video capture.&#x20;

## 2.4.7&#x20;

### ✨ New Features & Improvements&#x20;

* The ZIP format is now supported. You can upload ZIP files containing images and/or videos; their contents will be automatically processed to simplify the anonymization of large data volumes.&#x20;

## 2.2.0

### ✨ New Features & Improvements

* **Improved Detection**: Integration of a **new AI model** that significantly enhances the **accuracy and speed of face and license plate detection**. Reducing false positives.

## 2.1.0

### ✨ New Features & Improvements

* **Updated Torch-CUDA Version**: Upgraded `torch-cuda` to version **2.5.1+cu124** to ensure compatibility with the latest CUDA updates and improve performance.

## 2.0.9

**Permission Updates**: The following processes are now configured to use **UID 1200** and **GID 1200**:

* **Blur Worker**
* **Directory Worker**
* **Manager API**

### Technical Details

* These updates improve permission management and enhance security for service execution.
* **Why UID/GID 1200?** This choice ensures compatibility across different systems and avoids conflicts with system-reserved or commonly used IDs. It provides a dedicated user/group for these services, improving security and isolation.

## 2.0.8

### New Features & Improvements

* Added asynchronous CPU and GPU processing to improve performance.
* Introduced a new feature to clear the GPU cache for better resource management.

## 2.0.7

### ✨ New Feature: Intuitive Dashboard for Task & Consumption Tracking

We’ve added a **Dashboard** page to give you a clear overview of service usage and resource consumption.

#### 🔹 Key Features:

📊 **Service Usage** – Total API calls, daily & monthly breakdown\
📉 **Consumption Tracking** – Data usage (MB) per day & month\
📆 **Dynamic Charts** – Yearly & monthly trends for better insights

## 2.0.6

Starting from this version, custom port configuration has been removed. Applications are now accessible exclusively through the standard ports **80** (HTTP) and **443** (HTTPS). Use the dedicated paths `/api` and `/flower` to access the API and the Flower

## 2.0.2

### **New Features:**

* SSL configuration for cloud version

**Hotfixes:**

* **Web App:** Improved input validation to allow spaces in the input path.
* **BlurIt Model:** Resolved an issue with handling videos with low FPS.

## 2.0.1

### ✨ **New Features:**

* Added HTTP Basic Authentication for the web application, enhancing security.

## 2.0

### ✨ **New Features:**

* **High-Performance Algorithm** : This new algorithm delivers enhanced computing power and speed, resulting in better overall performance for your tasks.&#x20;
* **Lightweight Model :** In addition to the high-performance algorithm, we’ve introduced a smaller, more efficient model that uses **less GPU RAM**, making it ideal for environments with limited resources. Despite its compact size, it still provides robust results, ensuring you don't have to compromise on accuracy or efficiency.

## 1.1.0:

* CLI configuration all in one

## 1.0.0:

* installation script
* NEW CLI
* fix: not processing image or video with uppercase extension (e.g. image.PNG)


# Introduction

## AWS Quickstart

**BlurIt On-Premise Cloud Images** are an all-in-one solution designed to run BlurIt On-Premise on your favorite cloud providers. By leveraging our preconfigured cloud images available on the marketplaces, you can deploy the BlurIt On-Premise solution with complete autonomy.

**Important**: while you can autonomously create virtual servers with our images, you still need to contact us to obtain a valid license.&#x20;

## Supported providers

✅ [AWS](https://aws.amazon.com/marketplace/pp/prodview-khnd7pnhybcca?applicationId=AWS-Marketplace-Console\&ref_=beagle\&sr=0-5)

⏳ Azure (late October)

⏳ GCP (November)

## Supported servers

We highly recommend deploying BlurIt OP on virtual server with Nvidia GPU for better performance, although the software can be run on CPU only.

AMD GPU are not supported.

For a complete list of hardware requirements, please [see details here](/blurit-on-premise/requirements#hardware-requirements).


# AWS

This step-by-step guide will walk you through deploying a BlurIt OP instance using our preconfigured AMI on AWS.

## Step 1: Access the AWS Marketplace

1. Log in to your AWS account.
2. Go to the [AWS Marketplace](https://aws.amazon.com/marketplace).
3. In the search bar, type **BlurIt**.
4. Select the **BlurIt** image from the search results.

## Step 2: Launch the Instance

1. On the AMI BlurIt page, click **Continue to Subscribe**.
2. Review and accept the terms of use.
3. Click **Continue to Configuration**.
4. Choose the **AWS region** where you want to deploy the instance.
5. Under **Fulfillment Option**, select **AMI**.
6. Choose the recommended instance type (With Nvidia GPU).
7. Click **Continue to Launch**.

## Step 3: Configure Networking and Options

1. Select or create a **VPC** and a **Security Group** that allows SSH traffic and TCP ports 8080 to 8085 (these values may differ if you later don't use default values during the configuration process).
2. Launch the instance.

## Step 4: Connect to the Instance

1. Go to the **EC2 Console** to see your running instance.
2. Click on the instance to retrieve the public IP address or DNS name of the instance.
3. Use an SSH client to connect to the instance with the following command:

   ```bash
   ssh -i /path/to/your-key.pem ubuntu@your-instance-public-ip
   ```

## Step 5: Configure Blurit

1. Once connected, begin by configuring your BlurIt server and answering the prompts:

   ```bash
   blurit configure
   ```
2. Start your BlurIt server:

   ```bash
   blurit start
   ```
3. Activate your BlurIt server by adding your license:

   ```bash
   blurit license add <license>
   ```

Please consult [this page](/blurit-on-premise/installation/configuration) for full documentation.

## Step 6: Access the manager

Once connected, open your web browser and navigate to your instance's public IP address (or DNS name):

```
http://<your-instance-public-ip>:8084
```

## Step 7: Using the BlurIt API

The BlurIt API is available at the following endpoint on your instance:

```
http://<your-instance-public-ip>/api
```

Refer to the [API documentation](/blurit-on-premise/usage/api) for details on the available endpoints and how to integrate them into your workflows.


# Getting started

## Overview

The BlurIt On Premise version (aka BlurIt OP) provides a full offline and unlimited self hosted use of BlurIt by deploying the solution directly on your servers.

This guide will go through the installation process of a standard BlurIt OP setup. If you require custom settings related to the number of GPUs and/or the number of workers, please contact us at <contact@blurit.io>.

**If you want to install BlurIt OP on a cloud provider (AWS, Azure, GCP), please** [**follow instructions here**](/2.5.4/cloud-images/introduction)**.**

## Before you start

Before you start, be sure you have received from Wassa the BlurIt OP archive that contains the installation files.

BlurIt OPs runs in a dockerized environment on Linux or Windows, hence the installation of BlurIt OP requires basic knowledge of Linux/Windows and Docker usage.

If you need any help installing BlurIt OP, please contact us at <contact@blurit.io>.


# Requirements

## Hardware requirements

* CPU recommended: 3-4 threads as the base and 1-2 cores per worker on each machine.
* GPU Nvidia (consumer and professional) [computer capability](https://developer.nvidia.com/cuda-gpus) >= sm\_37 for optimal performance
* RAM GPU 4-6 GB for 1 worker depending of the resolution
* RAM > 16 GB
* 60 Go + local storage

## Software dependencies

* Linux Ubuntu >= 20.04 / CentOS >= 8 / Amazon Linux 2 Deep Learning AMI GPU&#x20;
* Windows 10 Pro, 11 Pro and server 2022 with Windows Subsystem for Linux (WSL)
* Install the following dependencies either using the provided script ([Linux](/2.5.4/blurit-on-premise/installation/linux-dependencies) only) or manually ([Linux](/2.5.4/blurit-on-premise/installation/linux-dependencies) or [Windows](/2.5.4/blurit-on-premise/installation/windows-dependencies-wsl)):
  * [nvidia drivers](https://www.nvidia.com/download/index.aspx) recommended >= 470
  * [docker ce](https://docs.docker.com/engine/install/) and [post install linux](https://.docker.com/engine/install/linux-postinstall/)
  * [docker desktop](https://docs.docker.com/desktop/install/windows-install/) for Windows WSL
  * docker-compose <= 1.29
  * [nvidia-docker2](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#setting-up-nvidia-container-toolkit) (set as default docker runtime)

## Blurit archive

* blurit\_stack.yml
* .env
* Blurit-op.postman\_collection.json
* README.md
* licence.txt
* login-registry.txt
* install\_dependencies.sh

###


# Installation

{% content-ref url="/pages/XGRsi3LnCyZ37pzzDvji" %}
[Linux dependencies](/2.5.4/blurit-on-premise/installation/linux-dependencies)
{% endcontent-ref %}

{% content-ref url="/pages/u0NzVXfbZPsHjuBnJzJp" %}
[Windows dependencies (WSL)](/2.5.4/blurit-on-premise/installation/windows-dependencies-wsl)
{% endcontent-ref %}

{% content-ref url="/pages/33MB6VJhfv9yRtJwhgQf" %}
[Configuration](/2.5.4/blurit-on-premise/installation/configuration)
{% endcontent-ref %}

{% content-ref url="/pages/usinf50sM4HYGmrXTSW3" %}
[Run BlurIt OP](/2.5.4/blurit-on-premise/installation/run-blurit-op)
{% endcontent-ref %}

{% content-ref url="/pages/QyDYTQ2GDnrCXKq64Mpq" %}
[Multi-servers installation](/2.5.4/blurit-on-premise/installation/multi-servers-installation)
{% endcontent-ref %}

{% content-ref url="/pages/1j3QnV6qSF26ovSTpiXI" %}
[Post installation verifications](/2.5.4/blurit-on-premise/installation/post-installation-verifications)
{% endcontent-ref %}


# Linux dependencies

*Note: Don't follow this step if you plan to run BlurIt OP on Windows.* [*Go there*](/2.5.4/blurit-on-premise/installation/windows-dependencies-wsl) *instead.*

## Choice 1 : use our dependencies installation script (recommended)

#### Prerequisites Before Installation

Before starting the installation, ensure you have received the archive containing all necessary documents. This archive will be shared via a secured link protected by a password.

**Contents of the Archive**

**Main Archive**: `client_name_YYYYMMDD.tar.gz`

The archive will include the following files:

1. **License File**: `license_client_name_YYYYMMDD_YYYYMMDD`
   * The license file specifies the validity period (start and end dates).
2. **Registry Login**: `login_registry.txt`
   * Contains the credentials to access the registry.
3. **Installation Script**: `linux_installation_script`
   * A script compatible only with Linux systems.
4. **Custom Configuration File** (if applicable): `blurit_stack.yml`

This script will install the software requirements to run BlurIt On-Premise on your server. It will install Nvidia drivers, Docker CE, and Nvidia-docker on Ubuntu, Debian, and RHEL/CentOS. If you are installing BlurIt on an old server and want to maintain specific version dependencies, we don't recommend to use this script but rather to [manually install everything](#manual-dependencies-installation).

To begin, extract the BlurIt OP archive using the following command:

{% code lineNumbers="true" %}

```bash
tar -xzf filename.tar.gz
cd blurit-op
```

{% endcode %}

Replace "filename" with the actual name of the archive that was provided to you.

To start the script, execute the following command:

{% code lineNumbers="true" %}

```sh
sudo ./install_dependencies.sh
```

{% endcode %}

:rotating\_light: After execution of the script, please reboot the server to load the Nvidia drivers and go to the [Configuration](/2.5.4/blurit-on-premise/installation/configuration) page. :rotating\_light:

## Choice 2 : manual dependencies installation

### Nvidia drivers Installation

1. Download the NVIDIA driver >= 470 runfile from: <https://www.nvidia.com/Download/index.aspx?lang=en-us>
2. Open a terminal and navigate to the directory where the downloaded runfile is located.
3. `$ chmod +x <filename>.run` \
   Replace `<filename>` with the actual name of the downloaded runfile.
4. `$ sudo ./<filename>.run`&#x20;
5. `$ sudo reboot`&#x20;

### Docker Installation

The Docker installation documentation is [here](https://docs.docker.com/engine/install/).

{% tabs %}
{% tab title="Ubuntu" %}
{% code lineNumbers="true" fullWidth="false" %}

```bash
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
sudo install -m 0755 -d /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin
```

{% endcode %}
{% endtab %}

{% tab title="Debian" %}
{% code lineNumbers="true" %}

```bash
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
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
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

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
```

{% endcode %}
{% endtab %}

{% tab title="Centos" %}
{% code lineNumbers="true" %}

```bash
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl start docker
```

{% endcode %}
{% endtab %}

{% tab title="RHEL" %}
{% code lineNumbers="true" %}

```bash
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl start docker
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Post-install docker linux (required):&#x20;

{% code lineNumbers="true" %}

```bash
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
```

{% endcode %}

### Nvidia-docker installation

Nvidia-docker installation documentation is [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html).

{% tabs %}
{% tab title="Ubuntu / Debian" %}
{% code lineNumbers="true" %}

```bash
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/stable/deb/nvidia-container-toolkit.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
```

{% endcode %}
{% endtab %}

{% tab title="Centos / RHEL" %}
{% code lineNumbers="true" %}

```bash
curl -s -L https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo | \
  sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo

sudo yum clean expire-cache
sudo yum install -y nvidia-container-toolkit
```

{% endcode %}
{% endtab %}
{% endtabs %}

Configure the Docker daemon to recognize the NVIDIA Container Runtime:

{% code lineNumbers="true" %}

```bash
sudo nvidia-ctk runtime configure --runtime=docker
```

{% endcode %}

Restart the Docker daemon to complete the installation after setting the default runtime:

{% code lineNumbers="true" %}

```bash
sudo systemctl restart docker
```

{% endcode %}

Test if Nvidia-docker is installed:

{% code lineNumbers="true" %}

```bash
sudo docker run --rm --runtime=nvidia --gpus all nvidia/cuda:11.6.2-base-ubuntu20.04 nvidia-smi
```

{% endcode %}

This should result in a console output shown below:

```
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.51.06    Driver Version: 470.51.06    CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla T4            On   | 00000000:00:1E.0 Off |                    0 |
| N/A   34C    P8     9W /  70W |      0MiB / 15109MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
```

### Configuring daemon.json

Open `/etc/docker/daemon.json` with your favorite text editor.

Add `"default-runtime": "nvidia",`  to the json. Exemple:

{% code title="/etc/docker/daemon.json" lineNumbers="true" %}

```json
{
  "default-runtime": "nvidia",
  "runtimes": {
    "nvidia": {
      "args": [],
      "path": "nvidia-container-runtime
    }
  }
}
```

{% endcode %}

### Blurit CLI Installation

The **Blurit CLI** enables you to easily **configure**, **start**, and **interact** with Blurit. It provides a command-line interface to manage features and streamline platform usage.

Start these commands from WSL:

```bash
wget https://cloud.wassa.io/s/Kuj5MDgqkMCdjRv/download --output-document=blurit
chmod +x blurit
sudo mv blurit /usr/bin
```


# Windows dependencies (WSL)

*Don't follow this step if you plan to run BlurIt OP on Linux.* [*Go there*](/2.5.4/blurit-on-premise/installation/linux-dependencies) *instead.*

#### Prerequisites Before Installation

Before starting the installation, ensure you have received the archive containing all necessary documents. This archive will be shared via a secured link protected by a password.

**Contents of the Archive**

**Main Archive**: `client_name_YYYYMMDD.tar.gz`

The archive will include the following files:

1. **License File**: `license_client_name_YYYYMMDD_YYYYMMDD`
   * The license file specifies the validity period (start and end dates).
2. **Registry Login**: `login_registry.txt`
   * Contains the credentials to access the registry.
3. **Custom Configuration File** (if applicable): `blurit_stack.yml`

## Nvidia Driver installation

Download the NVIDIA driver >= 470 exe from: <https://www.nvidia.com/Download/index.aspx?lang=en-us>

You can also update the drivers using [Nvidia Geforce Experience](https://www.nvidia.com/fr-fr/geforce/geforce-experience/).

## Install WSL 2 (Windows Subsystem Linux)

To Check if WSL is installed, open PowerShell as administrator and run:

{% code lineNumbers="true" %}

```powershell
wsl -l –v
```

{% endcode %}

If WSL is not installed:

{% code lineNumbers="true" %}

```
wsl --install -d Ubuntu
```

{% endcode %}

Then reboot your machine.

It is possible to modify the resources allocated to WSL. For more information, you can refer to this link: <https://learn.microsoft.com/fr-fr/windows/wsl/wsl-config#wslconfig>.

## Docker installation

Instruction to install docker CE on windows with WSL 2 backend : <https://docs.docker.com/desktop/install/windows-install/>.

During the install don't forget to tick the Use **WSL 2 instead of Hyper-V** checkbox.

Additionally, if you want the BlurIt app to restart automatically when the machine restarts, check the box labeled 'Start Docker Desktop when you sign, in.'

<figure><img src="/files/JiXQpTr8CT9Rku5A0NcL" alt=""><figcaption></figcaption></figure>

## Nvidia-docker installation

To enter WSL, open PowerShell and type `wsl` followed by pressing Enter.

{% code lineNumbers="true" %}

```bash
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/stable/deb/nvidia-container-toolkit.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
```

{% endcode %}

Verify that Nvidia-Docker is installed:

{% code lineNumbers="true" %}

```bash
sudo docker run --rm --gpus all nvidia/cuda:11.6.2-base-ubuntu20.04 nvidia-smi -a
```

{% endcode %}

### Configuring Docker daemon

Append the following JSON content on the Docker Desktop config like this:

{% code lineNumbers="true" %}

```json
{
	... # current content
	"runtimes": {
		"nvidia": {
			"path": "/usr/bin/nvidia-container-runtime",
			"runtimeArgs": []
		}
	},
	"default-runtime": "nvidia"
}
```

{% endcode %}

<figure><img src="/files/aqY0dxHLB1qmTPwT1tUn" alt=""><figcaption></figcaption></figure>

Restart Docker for the change to take effect.

### Post-install docker linux on WSL (required):&#x20;

{% code lineNumbers="true" %}

```bash
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
```

{% endcode %}

### Blurit CLI Installation

The **Blurit CLI** enables you to easily **configure**, **start**, and **interact** with Blurit. It provides a command-line interface to manage features and streamline platform usage.

Start these commands from WSL:

```bash
wget https://cloud.wassa.io/s/Kuj5MDgqkMCdjRv/download --output-document=blurit
chmod +x blurit
sudo mv blurit /usr/bin
```


# Configuration

## Blurit CLI

The Blurit CLI is installed during the [Linux](/2.5.4/blurit-on-premise/installation/linux-dependencies) or [Windows](/2.5.4/blurit-on-premise/installation/windows-dependencies-wsl) dependencies installation process. This command will prompt you with several questions to assist in setting up your Blurit installation. If Blurit team send you a compose file, it's possible to pass it as argument.

```bash
blurit configure
```

For custom installations, if a `blurit_stack.yml` file is provided, include it as an argument when executing the relevant commands :<br>

```bash
blurit configure blurit_stack.yml
```

## Configuration explanation

The following section provides an explanation of the various questions asked during the configuration process.

### Model

During the configuration process, you'll be prompted to select the AI model version that best fits your performance and precision needs. BlurIt offers two options:

* **tiny**: This model is optimized for speed, processing images and videos faster. It is ideal for scenarios where performance is critical, although it comes with a very slight reduction in precision. This is the default option.
* **standard**: This version provides a balance between speed and precision. While still optimized for fast processing, it offers slightly higher accuracy compared to the tiny model, making it suitable for tasks where precision is more important.

### Web App Authentication

To secure access to the BlurIt web app, you’ll need to set up a username and password during the configuration process. This protects the web interface and ensures that only authorized users can manage files and access data.

1. **Username**: Create a unique username for accessing the web app.
2. **Password**: Set a strong password for added security. Store it securely for future access.

Alternatively, you may choose not to set a username and password for quicker access. However, please note that **disabling authentication** means the web app will be openly accessible, which may expose your data to unauthorized access. This choice comes with the user’s full responsibility for securing access to the application.

### **SSL Configuration**&#x20;

For enhanced security, you can enable SSL to encrypt communication between clients and the server. During the configuration process, you will be prompted to provide the following:

1. **Server Name**: Specify the domain name or IP address used to access your BlurIt web app.
2. **Path to SSL Certificate File (.pem)**: Provide the full path to your SSL certificate file. This file contains the public key and is required for establishing secure HTTPS connections.
3. **Path to SSL Private Key File (.pem)**: Provide the full path to your private key file. This file must correspond to the SSL certificate provided.

If you do not have an SSL certificate, you can use services like [Let's Encrypt](https://letsencrypt.org/) to generate one for free or use self-signed certificates for internal testing.

By enabling SSL and authentication, you ensure that your data and web app are protected against unauthorized access and interception.

### Local storage

These settings define the base directories where BlurIt OP will locate input files (to be processed) and where it will store the output files (blurred videos/images and detection JSONs) on the local server storage, i.e., on the server where BlurIt OP is running.

#### Accessing Windows Drives on WSL

If you are using Windows Subsystem for Linux (WSL), your Windows drives are accessible under the `/mnt/` directory. Each drive is mapped to its respective folder:

* **Drive C:** Located at `/mnt/c/`
* **Drive D:** Located at `/mnt/d/`, and so on.

For example, if you need to access a file located at `C:\Users\YourName\Documents`, you can find it in WSL at:

```bash
/mnt/c/Users/YourName/Documents
```

This mapping makes it easy to navigate between your Windows environment and the Linux subsystem.

The input and output directories will be assigned to the user with ID 1200.

**Why UID/GID 1200?**&#x20;

This choice ensures compatibility across different systems and avoids conflicts with system-reserved or commonly used IDs. It provides a dedicated user/group for these services, improving security and isolation.

### S3 storage

These settings allow the use of S3 storage for the input and output directories for media.

### GPU settings

Select the GPU you wish to use with Blurit.

### Max Threads number

This variable represents the maximum number of threads that the reencoding step will utilize on your CPU. Increasing this value can result in faster reencoding.&#x20;

However, it's important to note that you should reserve some threads for other processes.

Avoid using the maximum number of available threads on your server, as it may impact the performance of other applications.

#### Webhook (optional)

This setting is a configuration that defines a route or URL where a POST request can be sent. This endpoint is typically used to send JSON data to another system or service.

In this specific example, when the POST request is made to the "CUSTOM\_WEBHOOK\_ENDPOINT" route, the JSON payload being sent is as follows:

```json
{
  "status": "Succeeded",
  "task_id": "abc-123-456-789"
}
```

The JSON payload contains two key-value pairs:

* "status" with a value of "Succeeded"
* "task\_id" with a value of "abc-123-456-789"

The purpose of this webhook is to notify or provide information to the system or service listening at the specified endpoint about the status of a task or operation. The receiving system can then process this data according to its requirements.

### Jobs timeouts

This parameter represents the amount of time the application waits before changing the status of a task to "failed." By default, it is set to 43200000 milliseconds (equivalent to 12 hours).


# Run BlurIt OP

## Blurit CLI

The Blurit CLI is installed during the [Linux](/2.5.4/blurit-on-premise/installation/linux-dependencies) or [Windows](/2.5.4/blurit-on-premise/installation/windows-dependencies-wsl) dependencies installation process. This command will prompt you with several questions to assist in setting up your Blurit installation.

```bash
blurit start
```

The application will be available on ports **80** (HTTP) and **443** (HTTPS). The API can be accessed at the URL `/api`, and the Flower interface at `/flower`. The manager remains accessible via the standard URL (DNS or IP).


# Multi-servers installation

#### Add a worker node

🚨 This section pertains to clustering Blurit On-Premise. If you would like more information about it, please contact our customer services.🚨&#x20;

Before joining the manager machine, you need to open some ports:

* `TCP` port `2377` for cluster management communications
* `TCP` and `UDP` port `7946` for communication among nodes
* `UDP` port `4789` for overlay network traffic

Get Join-token on manager machine:

{% code lineNumbers="true" %}

```bash
docker swarm join-token worker
```

{% endcode %}

Replace `<worker-token>` with the actual token obtained from the previous command, and `<ip-of-manager-machine>` with the IP address or hostname of the manager machine. This command will join the worker machine to the swarm cluster.

Join the swarm cluster on the worker machine (<https://docs.docker.com/engine/reference/commandline/swarm\\_join/>):

{% code lineNumbers="true" %}

```bash
docker swarm join --token <worker-token> <ip-of-manager-machine>:2377
```

{% endcode %}

#### Add label to node

Add a label allow to chose the machine to deploy the workers. For multiple machine installation, it's mandatory for a smooth deployment.

This command display every node present on the swarm cluster:

{% code lineNumbers="true" %}

```bash
docker node ls
```

{% endcode %}

Add a label to a node:

{% code lineNumbers="true" %}

```bash
docker node update --label-add blurit-worker-<number of the machine> <node-name>
```

{% endcode %}

Replace `<machine-number>` with the appropriate number for the machine, and `<node-name>` with the name of the node. This command adds a label to the specified node, which will be used for deployment purposes.


# Post installation verifications

## Blurit CLI

The Blurit CLI is installed during the [Linux](/2.5.4/blurit-on-premise/installation/linux-dependencies) or [Windows](/2.5.4/blurit-on-premise/installation/windows-dependencies-wsl) dependencies installation process. This command will prompt you with several questions to assist in setting up your Blurit installation.

```bash
blurit status
```


# Usage

As said in the [Configuration](/2.5.4/blurit-on-premise/installation/configuration) section, BlurIt OP Web Manager or API works within the paths set in `LOCAL_STORAGE_INPUT_PATH` and `LOCAL_STORAGE_OUTPUT_PATH`. Every processed media will be stored in `LOCAL_STORAGE_OUTPUT_PATH`, while the original media will be processed from `LOCAL_STORAGE_INPUT_PATH`.

There are two ways to process files with BlurIt OP:

1. Manager Webapp: The web app manager provides a Graphical User Interface (GUI) accessible at `http://<host> or https://<host>`, where "host" refers to the IP address of the machine where BlurIt OP is deployed or the dns url configured. This interface allows non-developers to process files easily.
2. API: The API is accessible at `http://<host>/api or https://<host>/api`. It allows developers to integrate BlurIt OP file processing capabilities into their own applications or workflows programmatically. This allows for greater flexibility and automation.


# Manager Webapp

## Overview

The Manager is a web application that facilitate usage of BlurIt OP by providing a GUI to non-developer users. It also provide an history of taks processed by BlurIt OP, wether thoses tasks have been created from the Manager or from the API.

## Access

You can access the Manager by visiting `http://<HOST> or https://<HOST>`, where `HOST` is the IP address of the machine or the dns url configured in the [Configuration](/2.5.4/blurit-on-premise/installation/configuration) section.

## License activation

Before using BlurIt OP, you must activate the license.

&#x20;Once you're on the Manager, click on the "Update License" button located at the top right corner of your screen.

<figure><img src="/files/kAOEIxFRlsulzYnGslkC" alt=""><figcaption></figcaption></figure>

After navigating to the Account (`/account`) page, click on the "Edit license" button. Next, paste the license into the designated text area and confirm the changes by clicking on the "Update license" button.

{% embed url="<https://cloud.wassa.io/s/nhQZwaY8uPUs8xP/download>" %}

## Tasks

### Create a task

To start a task, go to Tasks page (`/tasks`) by clicking on side menu "Tasks" and click on the  "Anonymize" button.

<figure><img src="/files/xk9QDXgop0vcy2T6Fk9e" alt=""><figcaption></figcaption></figure>

You can now follow 3 simple steps to create a new task:

1. **Source**: Choose either a file from your PC or a whole folder to process from the local storage or S3.
   * To process a file from your PC, use the file selection option or simply drag and drop the file into the designated area.
   * To process a folder, enter its path in the field. The path you enter represents a subdirectory of the `LOCAL_STORAGE_INPUT_PATH` (or `STORAGE_S3_BUCKET` if you use S3 storage) set in the [Configuration](/2.5.4/blurit-on-premise/installation/configuration) section. Please ensure that the directory already exists and has some files in it. If you don't enter anything, BurIt OP will process files directly in `LOCAL_STORAGE_INPUT_PATH` (or `STORAGE_S3_BUCKET`)
2. **Blur options**: Select the desired task options from the following choices:
   * Face anonymisation
   * Plates anonymisation
   * Coordinates position
   * Add  `_anonymized` suffix
   * Keep the audio track (only for zip/directory/videos)
   * Processing report (zip files only)
     * This option allows you to include in the ZIP file a CSV summary indicating the anonymization success status for all the files that were part of the original ZIP
   * Keep the files that cannot be blured (zip files only)
     * This option allows you to keep, within the anonymized ZIP, the files with unsupported formats that cannot be processed by the software
3. **Output path**: Specify the desired output location, whether it's local storage or S3. You can either change the name of the output file or create a new directory in the output to store your processed media. As for the source, the directory you enter here represents a subdirectory of `LOCAL_STORAGE_OUTPUT_PATH` (or `STORAGE_S3_BUCKET` if you use S3 storage). If you don't enter anything, BurIt OP will save processed files directly in `LOCAL_STORAGE_OUTPUT_PATH` (or `STORAGE_S3_BUCKET`)

<figure><img src="/files/WGqtwbh4iX3kR62iDp3B" alt=""><figcaption></figcaption></figure>

Click on the "Create" button and confirm to initiate the task.

{% embed url="<https://cloud.wassa.io/s/ryy3aFELs8xb8hT/download>" %}

### List tasks

The Tasks page list all the tasks that have been created in BlurIt OP (using the Manager or the API). For each task, the Manager displays:

* The date
* The type (Picture, Video or Archive)
* The file name
* The file size
* The task status (updated in real time)
* A button to download the processed file

The list can be filtered.

### Download processed files

From the Tasks page, click on the download icon located in the file column.

<figure><img src="/files/DqmiGikIcxr6XeeTYI9V" alt=""><figcaption></figcaption></figure>


# API

The BlurIt OP API offers several functionalities. It allows you to obtain the current license by using the GET method on the [`/api/license`](/2.5.4/blurit-on-premise/usage/api/license) endpoint. Additionally, you can add a new license by using the POST method on the same endpoint. If a license already exists, it will be replaced by the new license.

Furthermore, the API provides the capability to add a blur task to the queue by using the POST method on the [`/api/blur_it`](/2.5.4/blurit-on-premise/usage/api/tasks) endpoint. You can also add a blur task for a directory by using the POST method on the [`/api/blur_it/directory`](/2.5.4/blurit-on-premise/usage/api/tasks/process-a-directory) endpoint.

Moreover, the API allows you to retrieve the status of a task by using the GET method on the [`/api/task/{task_id}`](/2.5.4/blurit-on-premise/usage/api/tasks/get-the-status-of-a-task) endpoint, where "task\_id" is the task identifier.

\
The API documentation can be found at `http://<HOST>/api/docs`, where `HOST` is the IP address of the machine.

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td></td><td>License</td><td></td><td><a href="/pages/fyzHZmNTxiZdMLer38C5">/pages/fyzHZmNTxiZdMLer38C5</a></td></tr><tr><td></td><td>Blur it</td><td></td><td><a href="/pages/o6O0IRb9m627GmtW8A4A">/pages/o6O0IRb9m627GmtW8A4A</a></td></tr><tr><td></td><td>Blur it directory</td><td></td><td><a href="/pages/WmpKlZGkMqQi7MBpanHf">/pages/WmpKlZGkMqQi7MBpanHf</a></td></tr><tr><td></td><td>Task</td><td></td><td><a href="/pages/epuVjx0DYx1XI0b1chXz">/pages/epuVjx0DYx1XI0b1chXz</a></td></tr></tbody></table>


# License

{% openapi src="/files/Xv4fZHf4yUvciw3wHbGb" path="/api/license" method="get" %}
[openapi.json](https://content.gitbook.com/content/r5JRRd6eCX0rkSLsBQU0/blobs/aVsI537TlZrxjx94r2eG/openapi.json)
{% endopenapi %}

{% openapi src="/files/Xv4fZHf4yUvciw3wHbGb" path="/api/license" method="post" %}
[openapi.json](https://content.gitbook.com/content/r5JRRd6eCX0rkSLsBQU0/blobs/aVsI537TlZrxjx94r2eG/openapi.json)
{% endopenapi %}


# Tasks

* [Process a directory](/2.5.4/blurit-on-premise/usage/api/tasks/process-a-directory)
* [Process a file](/2.5.4/blurit-on-premise/usage/api/tasks/process-a-file)
* [Process a zip file](/2.5.4/blurit-on-premise/usage/api/tasks/process-a-zip-file)
* [Get the status of a task](/2.5.4/blurit-on-premise/usage/api/tasks/get-the-status-of-a-task)
* [Revoke a task](/2.5.4/blurit-on-premise/usage/api/tasks/revoke-a-task)


# Process a directory

## Blur It Directory Post

> Add a blurit directory task in task queue.

```json
{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/blur_it/directory":{"post":{"summary":"Blur It Directory Post","description":"Add a blurit directory task in task queue.","operationId":"blur_it_directory_post_api_blur_it_directory_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectAndBlurDirectoryBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRespsonse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DetectAndBlurDirectoryBody":{"title":"DetectAndBlurDirectoryBody","required":["input_directory","output_directory"],"type":"object","properties":{"input_directory":{"$ref":"#/components/schemas/InputDirectory"},"output_directory":{"$ref":"#/components/schemas/OutputDirectory"},"export_media":{"title":"Should we export the blured media ?","type":"boolean","default":true},"export_json":{"title":"Should we export the detections list ?","type":"boolean","default":true},"blur_plates":{"title":"Should we blur plates ?","type":"boolean","default":true},"blur_heads":{"title":"Should we blur heads ?","type":"boolean","default":true},"keep_audio":{"title":"Should we keep audio in the output medias ?","type":"boolean","default":true}},"description":"Detect and blur directory route's body.\nAt least one of output_media or output_json is needed."},"InputDirectory":{"title":"InputDirectory","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"Directory's relative path","type":"string"},"auto_delete":{"title":"If set to True, deletes the input file after processing.","type":"boolean","default":false}},"description":"Input directory structure"},"OutputDirectory":{"title":"OutputDirectory","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"Directory's relative path","type":"string"}},"description":"Output directory structure"},"TaskRespsonse":{"title":"TaskRespsonse","required":["task_id"],"type":"object","properties":{"task_id":{"title":"Unique task hash","type":"string"}},"description":"Task POST result structure"},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}
```


# Process a file

## Blur It Post

> Add a blurit task in task queue.

```json
{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/blur_it":{"post":{"summary":"Blur It Post","description":"Add a blurit task in task queue.","operationId":"blur_it_post_api_blur_it_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectAndBlurBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRespsonse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DetectAndBlurBody":{"title":"DetectAndBlurBody","required":["input_media"],"type":"object","properties":{"input_media":{"$ref":"#/components/schemas/InputFile"},"output_media":{"title":"Output video/image informations","allOf":[{"$ref":"#/components/schemas/OutputMedia"}]},"output_json":{"title":"Output JSON informations (contains detections' descriptions)","allOf":[{"$ref":"#/components/schemas/OutputJSON"}]},"blur_plates":{"title":"Should we blur plates ?","type":"boolean","default":true},"blur_heads":{"title":"Should we blur heads ?","type":"boolean","default":true},"keep_audio":{"title":"Should we keep audio in the output media ?","type":"boolean","default":true}},"description":"Detect and blur route's body.\nAt least one of output_media or output_json is needed."},"InputFile":{"title":"InputFile","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"File's relative path","type":"string"},"expires_at":{"title":"Input file's expiration date. Works only with S3 storage.","type":"string"},"auto_delete":{"title":"If set to True (or not set), deletes the input file after processing.","type":"boolean","default":true}},"description":"Input File structure."},"OutputMedia":{"title":"OutputMedia","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"File's relative path","type":"string"},"lifespan":{"title":"Number of seconds the output will be stored. Works only with S3 storage.","type":"integer"}},"description":"Output Media file structure."},"OutputJSON":{"title":"OutputJSON","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"File's relative path","type":"string"},"lifespan":{"title":"Number of seconds the output will be stored. Works only with S3 storage.","type":"integer"}},"description":"Output JSON file structure."},"TaskRespsonse":{"title":"TaskRespsonse","required":["task_id"],"type":"object","properties":{"task_id":{"title":"Unique task hash","type":"string"}},"description":"Task POST result structure"},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}
```


# Process a zip file

## Zip Blur It Post

> Add a zip\_detect\_and\_blur task in task queue.\
> \
> returns a {"task\_id": str}

```json
{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/blur_it/zip":{"post":{"summary":"Zip Blur It Post","description":"Add a zip_detect_and_blur task in task queue.\n\nreturns a {\"task_id\": str}","operationId":"zip_blur_it_post_api_blur_it_zip_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZipBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ZipBody":{"title":"ZipBody","required":["input_zip","output_zip"],"type":"object","properties":{"input_zip":{"title":"Input zip storage informations","allOf":[{"$ref":"#/components/schemas/InputZip"}]},"output_zip":{"title":"Output zip storage informations","allOf":[{"$ref":"#/components/schemas/OutputZip"}]},"report_format":{"title":"Fomat of the report file. Set to null if you don't want a report file. Possible values: \"csv\", null","type":"string","default":"csv"},"save_unknown_files":{"title":"If set to True, unprocessable files extensions will be returned with processed files, in the output zip. If set to False, they will be deleted.","type":"boolean","default":false},"add_output_sufix":{"title":"If set to True, output files names will be suffixed (eg: \"file.jpg\" => \"file_anonymized.jpg\")","type":"boolean","default":true},"export_media":{"title":"Should we export the blured media ?","type":"boolean","default":true},"export_json":{"title":"Should we export the detections list ?","type":"boolean","default":true},"blur_plates":{"title":"Should we blur plates ?","type":"boolean","default":true},"blur_heads":{"title":"Should we blur heads ?","type":"boolean","default":true},"keep_audio":{"title":"Should we keep audio in the output media ?","type":"boolean","default":true}}},"InputZip":{"title":"InputZip","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"File's relative path","type":"string"},"expires_at":{"title":"Input file's expiration date. Works only with S3 storage.","type":"string"},"auto_delete":{"title":"If set to True (or not set), deletes the input file after processing.","type":"boolean","default":true}},"description":"Output JSON file structure."},"OutputZip":{"title":"OutputZip","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"File's relative path","type":"string"},"lifespan":{"title":"Number of seconds the output will be stored. Works only with S3 storage.","type":"integer"}},"description":"Output Zip file structure."},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}
```


# Get the status of a task

{% openapi src="/files/Xv4fZHf4yUvciw3wHbGb" path="/api/task/{task\_id}" method="get" %}
[openapi.json](https://content.gitbook.com/content/r5JRRd6eCX0rkSLsBQU0/blobs/aVsI537TlZrxjx94r2eG/openapi.json)
{% endopenapi %}


# Revoke a task

## Revoke Task

> Revokes a posted task. For zip/directories, it doesn't stop the sent sub-tasks

```json
{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/task/{task_id}/revoke":{"put":{"summary":"Revoke Task","description":"Revokes a posted task. For zip/directories, it doesn't stop the sent sub-tasks","operationId":"revoke_task_api_task__task_id__revoke_put","parameters":[{"required":true,"schema":{"title":"Task Id","type":"string"},"name":"task_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"TaskMessageResponse":{"title":"TaskMessageResponse","required":["task_id","message"],"type":"object","properties":{"task_id":{"title":"Unique task hash","type":"string"},"message":{"title":"A message related to the route","type":"string"}},"description":"Task POST result structure"},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}
```


# Command line interface

## Overview

The Blurit command line interface, this CLI lets you interact with Blurit On-Premise to perform various tasks related to media anonymization.

## CLI

The main Blurit CLI command.

```bash
blurit [OPTIONS] COMMAND [ARGS]...
```

### License

Manage Blurit licenses.

#### **info**

Displays all Blurit license information.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```shell
blurit license info
```

Response:

```
+------------+--------------------------+
| Property   | Value                    |
+============+==========================+
| Start Date | 2023-07-31T22:00:00.000Z |
+------------+--------------------------+
| End Date   | 2023-12-31T21:59:59.000Z |
+------------+--------------------------+
| License    | LICENSE                  |
+------------+--------------------------+
```

#### **add**

Upload or update a Blurit On-Premise license.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```shell
blurit license add LICENSE
```

Response:

```
+------------+--------------------------+
| Property   | Value                    |
+============+==========================+
| Start Date | 2023-06-27T22:00:00.000Z |
+------------+--------------------------+
| End Date   | 2023-09-30T21:59:59.000Z |
+------------+--------------------------+
| License    | LICENSE                  |
+------------+--------------------------+
```

### Tasks

Manage Blurit tasks.

#### **create**

Create a new Blurit task. Options vary depending on the input type (file, directory, S3 or s3-directory). File processing only needs input argument but output can be specified to store the exit media to a precise location.

options:

* \--input-file \[file|directory|s3|s3-directory] REQUIRED
* \--no-face-blur Disable face blur.&#x20;
* \--no-plate-blur Disable plate blur.&#x20;
* \--json-coord Use JSON coordinates.&#x20;
* \--auto-delete Auto deletion of input media&#x20;
* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json] Output format in JSON

```shell
blurit task create [OPTIONS] INPUT OUTPUT
```

Example: Create a task by specifying input and output directories:

```bash
blurit task create --input-type directory input output
```

Response:

```
job id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
```

#### **status**

Get the status of a specific task using its ID.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

return:

* Succeeded
* Started
* Sent
* Failed
* Couldn't contact the Blurit server

```shell
blurit task status TASK_ID
```

Example:

```bash
blurit tasks status 31bc8405-4a56-4cb2-a67e-689797ad9a1a
```

Response:

```bash
Succeeded
```

#### **list**

List history call tasks.

options:

* \--page TEXT Specify the page number&#x20;
* \--count TEXT Specify the number of results per page&#x20;
* \--starting-date TEXT Specify the starting date&#x20;
* \--ending-date TEXT Specify the ending date&#x20;
* \--filetype \[picture|video|directory] Specify the file type
* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```bash
blurit list
```

Response:

```
+--------------------------+-------------------+-------------+--------------------------------------+---------------+-----------------------+---------------+
| Created At               | Processing Time   | File Type   | Job ID                               | File Name     | Output Media URL      | Task Status   |
+==========================+===================+=============+======================================+===============+=======================+===============+
| 2023-08-24T09:18:42.625Z | 05:42:50.70       | directory   | 31bc8405-4a56-4cb2-a67e-689797ad9a1a | 629d57_part_1 | 629d57_part_2_process | Succeeded     |
+--------------------------+-------------------+-------------+--------------------------------------+---------------+-----------------------+---------------+

```

### Configure

Configure the Blurit application, need to be done at least once before first deployment ('blurit start').

```
blurit configure
```

### Start

Start the Blurit server, CLI must be on the host machine.

```
blurit start
```

### Restart

Restart the Blurit server, CLI must be on the host machine.

```
blurit restart
```

### Stop

Stop the Blurit server, CLI must be on the host machine.

```
blurit stop
```

### Stats

Display total and period (month, day) statistics.

options:

* \--date-start TEXT Starting date with format: %Y-%m-%d&#x20;
* \--date-end TEXT Ending date with format: %Y-%m-%d&#x20;
* \--granularity \[day|month] Display statistics by month or days&#x20;
* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json] Output format in JSON&#x20;
* \--help Show this message and exit.

```
blurit stats
```

**Response:**

```
+------------------------------+-----------+
| Metric                       | Value     |
+==============================+===========+
| Total Videos API Calls       | 73        |
+------------------------------+-----------+
| Total Pictures API Calls     | 443       |
+------------------------------+-----------+
| Total Videos Consumption     | 3.33 GB   |
+------------------------------+-----------+
| Total Pictures Consumption   | 806.07 MB |
+------------------------------+-----------+
| Monthly Videos API Calls     | 4         |
+------------------------------+-----------+
| Monthly Pictures API Calls   | 8         |
+------------------------------+-----------+
| Monthly Videos Consumption   | 22.12 MB  |
+------------------------------+-----------+
| Monthly Pictures Consumption | 9.42 MB   |
+------------------------------+-----------+
```

### Doc

Display link to documentation.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```
blurit doc
```

response:

```
API Documentation:
Operation: https://doc-op.blurit.io
Local: http://127.0.0.1:8084/api/docs
```

### Uninstall

Uninstall the Blurit server, CLI must be on the host machine.

```
blurit uninstall
```

#### **Output Format**&#x20;

The Blurit CLI supports two output formats: text (default) and JSON. You can specify the output format using the -o or --output-format option. For example, to get JSON output, use -o json.

Example:

```
blurit tasks status 31bc8405-4a56-4cb2-a67e-689797ad9a1a -o json
```

Response:

```
{'task_id': '31bc8405-4a56-4cb2-a67e-689797ad9a1a', 'status': 'Succeeded', 'result': {'input_directory': {'protocol': 'file', 'path': 'input/629d57_part_2', 'auto_delete': False}, 'output_directory': {'protocol': 'file', 'path': 'output/629d57_part_2_process'}, 'size': {'VIDEO': 4979394177}, 'nb_files': {'VIDEO': 252}}}
```

#### **Support and Contribution**&#x20;

If you have any questions, issues, or would like to make a return of the Blurit CLI, please contact us at <support@blurit.io>. We hope this guide helps you effectively use the Blurit CLI to manage your media anonymization tasks.


# Monitoring With Flower

**Accessing the Flower Web Interface**

Once the installation of Blurit is complete, Flower's web interface is accessible at:

```arduino
http://<your-server-address>/flower
```

Use the **username** and **password** configured during the installation of Blurit to log in.

**Overview of the Interface**

The Flower interface provides an intuitive way to monitor and manage Celery tasks and workers in real-time. Below is a detailed breakdown of the key sections and columns in the interface.

## **Dashboard: Monitoring Workers Overview**

The **Dashboard** tab in Flower provides an overview of all Celery workers currently running. This page allows you to quickly monitor worker states and performance.

**Column Descriptions**

1. **Worker Name**
   * Displays the unique name of each worker. Typically, the name is prefixed with `celery@` followed by a unique identifier (often based on the hostname).
   * Example: `celery@18e5d5189283`.
2. **Status**
   * Indicates the current status of the worker.
   * **Online**: The worker is active and communicating with the broker.
   * **Offline**: The worker is not responding or has been stopped.
3. **Active**
   * The number of tasks currently being processed by this worker.
   * A high value here relative to the worker’s capacity could indicate overload.
4. **Processed**
   * The total number of tasks processed by the worker since it started.
5. **Failed**
   * The total number of tasks that have failed on this worker.
   * A high number may indicate recurring issues with specific tasks or code.
6. **Succeeded**
   * The total number of tasks successfully executed by the worker.
7. **Retried**
   * The number of tasks that were retried after encountering a temporary error.
8. **Load Average**
   * The system's average load (CPU, memory) for the container or machine running the worker.
   * Format: `1 min, 5 min, 15 min`.
   * Example: `0.19, 0.08, 0.08` indicates a low load across all three timeframes.

**Available Actions**

* **Search Bar**: Use the search bar in the top-right corner to filter workers by name or other attributes. This is helpful when managing many workers.
* **Refresh**: Click the **Refresh** button to update the data displayed on the dashboard.

<figure><img src="/files/k44bUJQI5XWAC0wZCwyy" alt=""><figcaption></figcaption></figure>

## **Tasks: Monitoring and Managing Individual Tasks**

The **Tasks** tab in Flower allows you to monitor the state and details of individual Celery tasks in real-time. This tab is especially useful for diagnosing specific issues or analyzing task performance.

**Column Descriptions**

1. **Name**
   * The name of the task, as defined in your Celery code.
   * Example: `blurit.image`.
   * This typically corresponds to a function or method in your application.
2. **UUID**
   * A unique identifier for each task, useful for debugging or referencing specific tasks.
   * Example: `c2e583bc-1dc9-4193-9df5-fe412aa0b180`.
3. **State**
   * The current state of the task.
   * Common states include:
     * **PENDING**: The task is waiting to be executed.
     * **STARTED**: The task is currently running.
     * **SUCCESS**: The task has completed successfully.
     * **FAILURE**: The task execution failed.
   * Example in the screenshot: **SUCCESS**.
4. **args**
   * The positional arguments passed to the task when it was executed.
   * Example: `()` (no positional arguments in this case).
5. **kwargs**
   * The keyword arguments (named parameters) passed to the task.
   * Example:

     ```json
     jsonCopier le code{
         "input_image": {"protocol": "file", "path": "input/1732010550292-480.jpg"},
         "output_image": {"protocol": "file", "path": "output/878ac326-2b6c-482e-9888-e4346d285ad0.jpg"},
         "lifespan": 3600
     }
     ```
6. **Result**
   * The result returned by the task after execution.
   * Example (summary):

     ```json
     jsonCopier le code{
         "input_image": {"protocol": "file", "path": "input/1732010550292-480.jpg"},
         "output_image": {"protocol": "file", "path": "output/878ac326-2b6c-482e-9888-e4346d285ad0.jpg"},
         "chronos": {"total": 2.219586, "childs": {...}}
     }
     ```
7. **Received**
   * The timestamp when the task was received by the worker.
   * Example: `2024-11-19 10:02:30.472`.
8. **Started**
   * The timestamp when the task started execution.
   * Example: `2024-11-19 10:02:30.478`.
9. **Runtime**
   * The total time the task took to execute, in seconds.
   * Example: `2.733`.
10. **Worker**
    * The Celery worker that executed the task.
    * Example: `celery@83b122840b58`.

<figure><img src="/files/49ljQW55RAL4qq2Ko6Gw" alt=""><figcaption></figcaption></figure>

## **Usage Tips**

1. **Search for Tasks**
   * Use the search bar to filter tasks by **UUID**, **Name**, or **State**. This is especially helpful when dealing with large numbers of tasks.
2. **Diagnose Failures**
   * For tasks in the **FAILURE** state, the `kwargs` and `Result` columns provide valuable details about what went wrong.
3. **Performance Optimization**
   * Use the `Runtime` column to identify tasks that take a long time to execute, which may need optimization.
4. **Input and Output Validation**
   * The `kwargs` and `Result` columns are also useful for verifying the input and output data of specific tasks.


# Release notes

## 2.2.0

### ✨ New Features & Improvements

* **Improved Detection**: Integration of a **new AI model** that significantly enhances the **accuracy and speed of face and license plate detection**. Reducing false positives.

## 2.1.0

### ✨ New Features & Improvements

* **Updated Torch-CUDA Version**: Upgraded `torch-cuda` to version **2.5.1+cu124** to ensure compatibility with the latest CUDA updates and improve performance.

## 2.0.9

**Permission Updates**: The following processes are now configured to use **UID 1200** and **GID 1200**:

* **Blur Worker**
* **Directory Worker**
* **Manager API**

### Technical Details

* These updates improve permission management and enhance security for service execution.
* **Why UID/GID 1200?** This choice ensures compatibility across different systems and avoids conflicts with system-reserved or commonly used IDs. It provides a dedicated user/group for these services, improving security and isolation.

## 2.0.8

### New Features & Improvements

* Added asynchronous CPU and GPU processing to improve performance.
* Introduced a new feature to clear the GPU cache for better resource management.

## 2.0.7

### ✨ New Feature: Intuitive Dashboard for Task & Consumption Tracking

We’ve added a **Dashboard** page to give you a clear overview of service usage and resource consumption.

#### 🔹 Key Features:

📊 **Service Usage** – Total API calls, daily & monthly breakdown\
📉 **Consumption Tracking** – Data usage (MB) per day & month\
📆 **Dynamic Charts** – Yearly & monthly trends for better insights

## 2.0.6

Starting from this version, custom port configuration has been removed. Applications are now accessible exclusively through the standard ports **80** (HTTP) and **443** (HTTPS). Use the dedicated paths `/api` and `/flower` to access the API and the Flower

## 2.0.2

### **New Features:**

* SSL configuration for cloud version

**Hotfixes:**

* **Web App:** Improved input validation to allow spaces in the input path.
* **BlurIt Model:** Resolved an issue with handling videos with low FPS.

## 2.0.1

### ✨ **New Features:**

* Added HTTP Basic Authentication for the web application, enhancing security.

## 2.0

### ✨ **New Features:**

* **High-Performance Algorithm** : This new algorithm delivers enhanced computing power and speed, resulting in better overall performance for your tasks.&#x20;
* **Lightweight Model :** In addition to the high-performance algorithm, we’ve introduced a smaller, more efficient model that uses **less GPU RAM**, making it ideal for environments with limited resources. Despite its compact size, it still provides robust results, ensuring you don't have to compromise on accuracy or efficiency.

## 1.1.0:

* CLI configuration all in one

## 1.0.0:

* installation script
* NEW CLI
* fix: not processing image or video with uppercase extension (e.g. image.PNG)


# Introduction

## AWS Quickstart

**BlurIt On-Premise Cloud Images** are an all-in-one solution designed to run BlurIt On-Premise on your favorite cloud providers. By leveraging our preconfigured cloud images available on the marketplaces, you can deploy the BlurIt On-Premise solution with complete autonomy.

**Important**: while you can autonomously create virtual servers with our images, you still need to contact us to obtain a valid license.&#x20;

## Supported providers

✅ [AWS](https://aws.amazon.com/marketplace/pp/prodview-khnd7pnhybcca?applicationId=AWS-Marketplace-Console\&ref_=beagle\&sr=0-5)

⏳ Azure (late October)

⏳ GCP (November)

## Supported servers

We highly recommend deploying BlurIt OP on virtual server with Nvidia GPU for better performance, although the software can be run on CPU only.

AMD GPU are not supported.

For a complete list of hardware requirements, please [see details here](/2.5.4/blurit-on-premise/requirements#hardware-requirements).


# AWS

This step-by-step guide will walk you through deploying a BlurIt OP instance using our preconfigured AMI on AWS.

## Step 1: Access the AWS Marketplace

1. Log in to your AWS account.
2. Go to the [AWS Marketplace](https://aws.amazon.com/marketplace).
3. In the search bar, type **BlurIt**.
4. Select the **BlurIt** image from the search results.

## Step 2: Launch the Instance

1. On the AMI BlurIt page, click **Continue to Subscribe**.
2. Review and accept the terms of use.
3. Click **Continue to Configuration**.
4. Choose the **AWS region** where you want to deploy the instance.
5. Under **Fulfillment Option**, select **AMI**.
6. Choose the recommended instance type (With Nvidia GPU).
7. Click **Continue to Launch**.

## Step 3: Configure Networking and Options

1. Select or create a **VPC** and a **Security Group** that allows SSH traffic and TCP ports 8080 to 8085 (these values may differ if you later don't use default values during the configuration process).
2. Launch the instance.

## Step 4: Connect to the Instance

1. Go to the **EC2 Console** to see your running instance.
2. Click on the instance to retrieve the public IP address or DNS name of the instance.
3. Use an SSH client to connect to the instance with the following command:

   ```bash
   ssh -i /path/to/your-key.pem ubuntu@your-instance-public-ip
   ```

## Step 5: Configure Blurit

1. Once connected, begin by configuring your BlurIt server and answering the prompts:

   ```bash
   blurit configure
   ```
2. Start your BlurIt server:

   ```bash
   blurit start
   ```
3. Activate your BlurIt server by adding your license:

   ```bash
   blurit license add <license>
   ```

Please consult [this page](/2.5.4/blurit-on-premise/installation/configuration) for full documentation.

## Step 6: Access the manager

Once connected, open your web browser and navigate to your instance's public IP address (or DNS name):

```
http://<your-instance-public-ip>:8084
```

## Step 7: Using the BlurIt API

The BlurIt API is available at the following endpoint on your instance:

```
http://<your-instance-public-ip>/api
```

Refer to the [API documentation](/2.5.4/blurit-on-premise/usage/api) for details on the available endpoints and how to integrate them into your workflows.


# Getting started

## Overview

The BlurIt On Premise version (aka BlurIt OP) provides a full offline and unlimited self hosted use of BlurIt by deploying the solution directly on your servers.

This guide will go through the installation process of a standard BlurIt OP setup. If you require custom settings related to the number of GPUs and/or the number of workers, please contact us at <contact@blurit.io>.

**If you want to install BlurIt OP on a cloud provider (AWS, Azure, GCP), please** [**follow instructions here**](/2.4.7/cloud-images/introduction)**.**

## Before you start

Before you start, be sure you have received from Wassa the BlurIt OP archive that contains the installation files.

BlurIt OPs runs in a dockerized environment on Linux or Windows, hence the installation of BlurIt OP requires basic knowledge of Linux/Windows and Docker usage.

If you need any help installing BlurIt OP, please contact us at <contact@blurit.io>.


# Requirements

## Hardware requirements

* CPU recommended: 3-4 threads as the base and 1-2 cores per worker on each machine.
* GPU Nvidia (consumer and professional) [computer capability](https://developer.nvidia.com/cuda-gpus) >= sm\_37 for optimal performance
* RAM GPU 4-6 GB for 1 worker depending of the resolution
* RAM > 16 GB
* 60 Go + local storage

## Software dependencies

* Linux Ubuntu >= 20.04 / CentOS >= 8 / Amazon Linux 2 Deep Learning AMI GPU&#x20;
* Windows 10 Pro, 11 Pro and server 2022 with Windows Subsystem for Linux (WSL)
* Install the following dependencies either using the provided script ([Linux](/2.4.7/blurit-on-premise/installation/linux-dependencies) only) or manually ([Linux](/2.4.7/blurit-on-premise/installation/linux-dependencies) or [Windows](/2.4.7/blurit-on-premise/installation/windows-dependencies-wsl)):
  * [nvidia drivers](https://www.nvidia.com/download/index.aspx) recommended >= 470
  * [docker ce](https://docs.docker.com/engine/install/) and [post install linux](https://.docker.com/engine/install/linux-postinstall/)
  * [docker desktop](https://docs.docker.com/desktop/install/windows-install/) for Windows WSL
  * docker-compose <= 1.29
  * [nvidia-docker2](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#setting-up-nvidia-container-toolkit) (set as default docker runtime)

## Blurit archive

* blurit\_stack.yml
* .env
* Blurit-op.postman\_collection.json
* README.md
* licence.txt
* login-registry.txt
* install\_dependencies.sh

###


# Installation

{% content-ref url="/pages/XGRsi3LnCyZ37pzzDvji" %}
[Linux dependencies](/2.4.7/blurit-on-premise/installation/linux-dependencies)
{% endcontent-ref %}

{% content-ref url="/pages/u0NzVXfbZPsHjuBnJzJp" %}
[Windows dependencies (WSL)](/2.4.7/blurit-on-premise/installation/windows-dependencies-wsl)
{% endcontent-ref %}

{% content-ref url="/pages/33MB6VJhfv9yRtJwhgQf" %}
[Configuration](/2.4.7/blurit-on-premise/installation/configuration)
{% endcontent-ref %}

{% content-ref url="/pages/usinf50sM4HYGmrXTSW3" %}
[Run BlurIt OP](/2.4.7/blurit-on-premise/installation/run-blurit-op)
{% endcontent-ref %}

{% content-ref url="/pages/QyDYTQ2GDnrCXKq64Mpq" %}
[Multi-servers installation](/2.4.7/blurit-on-premise/installation/multi-servers-installation)
{% endcontent-ref %}

{% content-ref url="/pages/1j3QnV6qSF26ovSTpiXI" %}
[Post installation verifications](/2.4.7/blurit-on-premise/installation/post-installation-verifications)
{% endcontent-ref %}


# Linux dependencies

*Note: Don't follow this step if you plan to run BlurIt OP on Windows.* [*Go there*](/2.4.7/blurit-on-premise/installation/windows-dependencies-wsl) *instead.*

## Choice 1 : use our dependencies installation script (recommended)

#### Prerequisites Before Installation

Before starting the installation, ensure you have received the archive containing all necessary documents. This archive will be shared via a secured link protected by a password.

**Contents of the Archive**

**Main Archive**: `client_name_YYYYMMDD.tar.gz`

The archive will include the following files:

1. **License File**: `license_client_name_YYYYMMDD_YYYYMMDD`
   * The license file specifies the validity period (start and end dates).
2. **Registry Login**: `login_registry.txt`
   * Contains the credentials to access the registry.
3. **Installation Script**: `linux_installation_script`
   * A script compatible only with Linux systems.
4. **Custom Configuration File** (if applicable): `blurit_stack.yml`

This script will install the software requirements to run BlurIt On-Premise on your server. It will install Nvidia drivers, Docker CE, and Nvidia-docker on Ubuntu, Debian, and RHEL/CentOS. If you are installing BlurIt on an old server and want to maintain specific version dependencies, we don't recommend to use this script but rather to [manually install everything](#manual-dependencies-installation).

To begin, extract the BlurIt OP archive using the following command:

{% code lineNumbers="true" %}

```bash
tar -xzf filename.tar.gz
cd blurit-op
```

{% endcode %}

Replace "filename" with the actual name of the archive that was provided to you.

To start the script, execute the following command:

{% code lineNumbers="true" %}

```sh
sudo ./install_dependencies.sh
```

{% endcode %}

:rotating\_light: After execution of the script, please reboot the server to load the Nvidia drivers and go to the [Configuration](/2.4.7/blurit-on-premise/installation/configuration) page. :rotating\_light:

## Choice 2 : manual dependencies installation

### Nvidia drivers Installation

1. Download the NVIDIA driver >= 470 runfile from: <https://www.nvidia.com/Download/index.aspx?lang=en-us>
2. Open a terminal and navigate to the directory where the downloaded runfile is located.
3. `$ chmod +x <filename>.run` \
   Replace `<filename>` with the actual name of the downloaded runfile.
4. `$ sudo ./<filename>.run`&#x20;
5. `$ sudo reboot`&#x20;

### Docker Installation

The Docker installation documentation is [here](https://docs.docker.com/engine/install/).

{% tabs %}
{% tab title="Ubuntu" %}
{% code lineNumbers="true" fullWidth="false" %}

```bash
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
sudo install -m 0755 -d /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin
```

{% endcode %}
{% endtab %}

{% tab title="Debian" %}
{% code lineNumbers="true" %}

```bash
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
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
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

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
```

{% endcode %}
{% endtab %}

{% tab title="Centos" %}
{% code lineNumbers="true" %}

```bash
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl start docker
```

{% endcode %}
{% endtab %}

{% tab title="RHEL" %}
{% code lineNumbers="true" %}

```bash
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl start docker
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Post-install docker linux (required):&#x20;

{% code lineNumbers="true" %}

```bash
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
```

{% endcode %}

### Nvidia-docker installation

Nvidia-docker installation documentation is [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html).

{% tabs %}
{% tab title="Ubuntu / Debian" %}
{% code lineNumbers="true" %}

```bash
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/stable/deb/nvidia-container-toolkit.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
```

{% endcode %}
{% endtab %}

{% tab title="Centos / RHEL" %}
{% code lineNumbers="true" %}

```bash
curl -s -L https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo | \
  sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo

sudo yum clean expire-cache
sudo yum install -y nvidia-container-toolkit
```

{% endcode %}
{% endtab %}
{% endtabs %}

Configure the Docker daemon to recognize the NVIDIA Container Runtime:

{% code lineNumbers="true" %}

```bash
sudo nvidia-ctk runtime configure --runtime=docker
```

{% endcode %}

Restart the Docker daemon to complete the installation after setting the default runtime:

{% code lineNumbers="true" %}

```bash
sudo systemctl restart docker
```

{% endcode %}

Test if Nvidia-docker is installed:

{% code lineNumbers="true" %}

```bash
sudo docker run --rm --runtime=nvidia --gpus all nvidia/cuda:11.6.2-base-ubuntu20.04 nvidia-smi
```

{% endcode %}

This should result in a console output shown below:

```
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.51.06    Driver Version: 470.51.06    CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla T4            On   | 00000000:00:1E.0 Off |                    0 |
| N/A   34C    P8     9W /  70W |      0MiB / 15109MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
```

### Configuring daemon.json

Open `/etc/docker/daemon.json` with your favorite text editor.

Add `"default-runtime": "nvidia",`  to the json. Exemple:

{% code title="/etc/docker/daemon.json" lineNumbers="true" %}

```json
{
  "default-runtime": "nvidia",
  "runtimes": {
    "nvidia": {
      "args": [],
      "path": "nvidia-container-runtime
    }
  }
}
```

{% endcode %}

### Blurit CLI Installation

The **Blurit CLI** enables you to easily **configure**, **start**, and **interact** with Blurit. It provides a command-line interface to manage features and streamline platform usage.

Start these commands from WSL:

```bash
wget https://cloud.wassa.io/s/Kuj5MDgqkMCdjRv/download --output-document=blurit
chmod +x blurit
sudo mv blurit /usr/bin
```


# Windows dependencies (WSL)

*Don't follow this step if you plan to run BlurIt OP on Linux.* [*Go there*](/2.4.7/blurit-on-premise/installation/linux-dependencies) *instead.*

#### Prerequisites Before Installation

Before starting the installation, ensure you have received the archive containing all necessary documents. This archive will be shared via a secured link protected by a password.

**Contents of the Archive**

**Main Archive**: `client_name_YYYYMMDD.tar.gz`

The archive will include the following files:

1. **License File**: `license_client_name_YYYYMMDD_YYYYMMDD`
   * The license file specifies the validity period (start and end dates).
2. **Registry Login**: `login_registry.txt`
   * Contains the credentials to access the registry.
3. **Custom Configuration File** (if applicable): `blurit_stack.yml`

## Nvidia Driver installation

Download the NVIDIA driver >= 470 exe from: <https://www.nvidia.com/Download/index.aspx?lang=en-us>

You can also update the drivers using [Nvidia Geforce Experience](https://www.nvidia.com/fr-fr/geforce/geforce-experience/).

## Install WSL 2 (Windows Subsystem Linux)

To Check if WSL is installed, open PowerShell as administrator and run:

{% code lineNumbers="true" %}

```powershell
wsl -l –v
```

{% endcode %}

If WSL is not installed:

{% code lineNumbers="true" %}

```
wsl --install -d Ubuntu
```

{% endcode %}

Then reboot your machine.

It is possible to modify the resources allocated to WSL. For more information, you can refer to this link: <https://learn.microsoft.com/fr-fr/windows/wsl/wsl-config#wslconfig>.

## Docker installation

Instruction to install docker CE on windows with WSL 2 backend : <https://docs.docker.com/desktop/install/windows-install/>.

During the install don't forget to tick the Use **WSL 2 instead of Hyper-V** checkbox.

Additionally, if you want the BlurIt app to restart automatically when the machine restarts, check the box labeled 'Start Docker Desktop when you sign, in.'

<figure><img src="/files/JiXQpTr8CT9Rku5A0NcL" alt=""><figcaption></figcaption></figure>

## Nvidia-docker installation

To enter WSL, open PowerShell and type `wsl` followed by pressing Enter.

{% code lineNumbers="true" %}

```bash
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/stable/deb/nvidia-container-toolkit.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
```

{% endcode %}

Verify that Nvidia-Docker is installed:

{% code lineNumbers="true" %}

```bash
sudo docker run --rm --gpus all nvidia/cuda:11.6.2-base-ubuntu20.04 nvidia-smi -a
```

{% endcode %}

### Configuring Docker daemon

Append the following JSON content on the Docker Desktop config like this:

{% code lineNumbers="true" %}

```json
{
	... # current content
	"runtimes": {
		"nvidia": {
			"path": "/usr/bin/nvidia-container-runtime",
			"runtimeArgs": []
		}
	},
	"default-runtime": "nvidia"
}
```

{% endcode %}

<figure><img src="/files/aqY0dxHLB1qmTPwT1tUn" alt=""><figcaption></figcaption></figure>

Restart Docker for the change to take effect.

### Post-install docker linux on WSL (required):&#x20;

{% code lineNumbers="true" %}

```bash
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
```

{% endcode %}

### Blurit CLI Installation

The **Blurit CLI** enables you to easily **configure**, **start**, and **interact** with Blurit. It provides a command-line interface to manage features and streamline platform usage.

Start these commands from WSL:

```bash
wget https://cloud.wassa.io/s/Kuj5MDgqkMCdjRv/download --output-document=blurit
chmod +x blurit
sudo mv blurit /usr/bin
```


# Configuration

## Blurit CLI

The Blurit CLI is installed during the [Linux](/2.4.7/blurit-on-premise/installation/linux-dependencies) or [Windows](/2.4.7/blurit-on-premise/installation/windows-dependencies-wsl) dependencies installation process. This command will prompt you with several questions to assist in setting up your Blurit installation. If Blurit team send you a compose file, it's possible to pass it as argument.

```bash
blurit configure
```

For custom installations, if a `blurit_stack.yml` file is provided, include it as an argument when executing the relevant commands :<br>

```bash
blurit configure blurit_stack.yml
```

## Configuration explanation

The following section provides an explanation of the various questions asked during the configuration process.

### Model

During the configuration process, you'll be prompted to select the AI model version that best fits your performance and precision needs. BlurIt offers two options:

* **tiny**: This model is optimized for speed, processing images and videos faster. It is ideal for scenarios where performance is critical, although it comes with a very slight reduction in precision. This is the default option.
* **standard**: This version provides a balance between speed and precision. While still optimized for fast processing, it offers slightly higher accuracy compared to the tiny model, making it suitable for tasks where precision is more important.

### Web App Authentication

To secure access to the BlurIt web app, you’ll need to set up a username and password during the configuration process. This protects the web interface and ensures that only authorized users can manage files and access data.

1. **Username**: Create a unique username for accessing the web app.
2. **Password**: Set a strong password for added security. Store it securely for future access.

Alternatively, you may choose not to set a username and password for quicker access. However, please note that **disabling authentication** means the web app will be openly accessible, which may expose your data to unauthorized access. This choice comes with the user’s full responsibility for securing access to the application.

### **SSL Configuration**&#x20;

For enhanced security, you can enable SSL to encrypt communication between clients and the server. During the configuration process, you will be prompted to provide the following:

1. **Server Name**: Specify the domain name or IP address used to access your BlurIt web app.
2. **Path to SSL Certificate File (.pem)**: Provide the full path to your SSL certificate file. This file contains the public key and is required for establishing secure HTTPS connections.
3. **Path to SSL Private Key File (.pem)**: Provide the full path to your private key file. This file must correspond to the SSL certificate provided.

If you do not have an SSL certificate, you can use services like [Let's Encrypt](https://letsencrypt.org/) to generate one for free or use self-signed certificates for internal testing.

By enabling SSL and authentication, you ensure that your data and web app are protected against unauthorized access and interception.

### Local storage

These settings define the base directories where BlurIt OP will locate input files (to be processed) and where it will store the output files (blurred videos/images and detection JSONs) on the local server storage, i.e., on the server where BlurIt OP is running.

#### Accessing Windows Drives on WSL

If you are using Windows Subsystem for Linux (WSL), your Windows drives are accessible under the `/mnt/` directory. Each drive is mapped to its respective folder:

* **Drive C:** Located at `/mnt/c/`
* **Drive D:** Located at `/mnt/d/`, and so on.

For example, if you need to access a file located at `C:\Users\YourName\Documents`, you can find it in WSL at:

```bash
/mnt/c/Users/YourName/Documents
```

This mapping makes it easy to navigate between your Windows environment and the Linux subsystem.

The input and output directories will be assigned to the user with ID 1200.

**Why UID/GID 1200?**&#x20;

This choice ensures compatibility across different systems and avoids conflicts with system-reserved or commonly used IDs. It provides a dedicated user/group for these services, improving security and isolation.

### S3 storage

These settings allow the use of S3 storage for the input and output directories for media.

### GPU settings

Select the GPU you wish to use with Blurit.

### Max Threads number

This variable represents the maximum number of threads that the reencoding step will utilize on your CPU. Increasing this value can result in faster reencoding.&#x20;

However, it's important to note that you should reserve some threads for other processes.

Avoid using the maximum number of available threads on your server, as it may impact the performance of other applications.

#### Webhook (optional)

This setting is a configuration that defines a route or URL where a POST request can be sent. This endpoint is typically used to send JSON data to another system or service.

In this specific example, when the POST request is made to the "CUSTOM\_WEBHOOK\_ENDPOINT" route, the JSON payload being sent is as follows:

```json
{
  "status": "Succeeded",
  "task_id": "abc-123-456-789"
}
```

The JSON payload contains two key-value pairs:

* "status" with a value of "Succeeded"
* "task\_id" with a value of "abc-123-456-789"

The purpose of this webhook is to notify or provide information to the system or service listening at the specified endpoint about the status of a task or operation. The receiving system can then process this data according to its requirements.

### Jobs timeouts

This parameter represents the amount of time the application waits before changing the status of a task to "failed." By default, it is set to 43200000 milliseconds (equivalent to 12 hours).


# Run BlurIt OP

## Blurit CLI

The Blurit CLI is installed during the [Linux](/2.4.7/blurit-on-premise/installation/linux-dependencies) or [Windows](/2.4.7/blurit-on-premise/installation/windows-dependencies-wsl) dependencies installation process. This command will prompt you with several questions to assist in setting up your Blurit installation.

```bash
blurit start
```

The application will be available on ports **80** (HTTP) and **443** (HTTPS). The API can be accessed at the URL `/api`, and the Flower interface at `/flower`. The manager remains accessible via the standard URL (DNS or IP).


# Multi-servers installation

#### Add a worker node

🚨 This section pertains to clustering Blurit On-Premise. If you would like more information about it, please contact our customer services.🚨&#x20;

Before joining the manager machine, you need to open some ports:

* `TCP` port `2377` for cluster management communications
* `TCP` and `UDP` port `7946` for communication among nodes
* `UDP` port `4789` for overlay network traffic

Get Join-token on manager machine:

{% code lineNumbers="true" %}

```bash
docker swarm join-token worker
```

{% endcode %}

Replace `<worker-token>` with the actual token obtained from the previous command, and `<ip-of-manager-machine>` with the IP address or hostname of the manager machine. This command will join the worker machine to the swarm cluster.

Join the swarm cluster on the worker machine (<https://docs.docker.com/engine/reference/commandline/swarm\\_join/>):

{% code lineNumbers="true" %}

```bash
docker swarm join --token <worker-token> <ip-of-manager-machine>:2377
```

{% endcode %}

#### Add label to node

Add a label allow to chose the machine to deploy the workers. For multiple machine installation, it's mandatory for a smooth deployment.

This command display every node present on the swarm cluster:

{% code lineNumbers="true" %}

```bash
docker node ls
```

{% endcode %}

Add a label to a node:

{% code lineNumbers="true" %}

```bash
docker node update --label-add blurit-worker-<number of the machine> <node-name>
```

{% endcode %}

Replace `<machine-number>` with the appropriate number for the machine, and `<node-name>` with the name of the node. This command adds a label to the specified node, which will be used for deployment purposes.


# Post installation verifications

## Blurit CLI

The Blurit CLI is installed during the [Linux](/2.4.7/blurit-on-premise/installation/linux-dependencies) or [Windows](/2.4.7/blurit-on-premise/installation/windows-dependencies-wsl) dependencies installation process. This command will prompt you with several questions to assist in setting up your Blurit installation.

```bash
blurit status
```


# Usage

As said in the [Configuration](/2.4.7/blurit-on-premise/installation/configuration) section, BlurIt OP Web Manager or API works within the paths set in `LOCAL_STORAGE_INPUT_PATH` and `LOCAL_STORAGE_OUTPUT_PATH`. Every processed media will be stored in `LOCAL_STORAGE_OUTPUT_PATH`, while the original media will be processed from `LOCAL_STORAGE_INPUT_PATH`.

There are two ways to process files with BlurIt OP:

1. Manager Webapp: The web app manager provides a Graphical User Interface (GUI) accessible at `http://<host> or https://<host>`, where "host" refers to the IP address of the machine where BlurIt OP is deployed or the dns url configured. This interface allows non-developers to process files easily.
2. API: The API is accessible at `http://<host>/api or https://<host>/api`. It allows developers to integrate BlurIt OP file processing capabilities into their own applications or workflows programmatically. This allows for greater flexibility and automation.


# Manager Webapp

## Overview

The Manager is a web application that facilitate usage of BlurIt OP by providing a GUI to non-developer users. It also provide an history of taks processed by BlurIt OP, wether thoses tasks have been created from the Manager or from the API.

## Access

You can access the Manager by visiting `http://<HOST> or https://<HOST>`, where `HOST` is the IP address of the machine or the dns url configured in the [Configuration](/2.4.7/blurit-on-premise/installation/configuration) section.

## License activation

Before using BlurIt OP, you must activate the license.

&#x20;Once you're on the Manager, click on the "Update License" button located at the top right corner of your screen.

<figure><img src="/files/kAOEIxFRlsulzYnGslkC" alt=""><figcaption></figcaption></figure>

After navigating to the Account (`/account`) page, click on the "Edit license" button. Next, paste the license into the designated text area and confirm the changes by clicking on the "Update license" button.

{% embed url="<https://cloud.wassa.io/s/nhQZwaY8uPUs8xP/download>" %}

## Tasks

### Create a task

To start a task, go to Tasks page (`/tasks`) by clicking on side menu "Tasks" and click on the  "Anonymize" button.

<figure><img src="/files/xk9QDXgop0vcy2T6Fk9e" alt=""><figcaption></figcaption></figure>

You can now follow 3 simple steps to create a new task:

1. **Source**: Choose either a file from your PC or a whole folder to process from the local storage or S3.
   * To process a file from your PC, use the file selection option or simply drag and drop the file into the designated area.
   * To process a folder, enter its path in the field. The path you enter represents a subdirectory of the `LOCAL_STORAGE_INPUT_PATH` (or `STORAGE_S3_BUCKET` if you use S3 storage) set in the [Configuration](/2.4.7/blurit-on-premise/installation/configuration) section. Please ensure that the directory already exists and has some files in it. If you don't enter anything, BurIt OP will process files directly in `LOCAL_STORAGE_INPUT_PATH` (or `STORAGE_S3_BUCKET`)
2. **Blur options**: Select the desired task options from the following choices:
   * Face anonymisation
   * Plates anonymisation
   * Coordinates position
   * Add  `_anonymized` suffix
   * Processing report (zip files only)
     * This option allows you to include in the ZIP file a CSV summary indicating the anonymization success status for all the files that were part of the original ZIP
   * Keep the files that cannot be blured (zip files only)
     * This option allows you to keep, within the anonymized ZIP, the files with unsupported formats that cannot be processed by the software
3. **Output path**: Specify the desired output location, whether it's local storage or S3. You can either change the name of the output file or create a new directory in the output to store your processed media. As for the source, the directory you enter here represents a subdirectory of `LOCAL_STORAGE_OUTPUT_PATH` (or `STORAGE_S3_BUCKET` if you use S3 storage). If you don't enter anything, BurIt OP will save processed files directly in `LOCAL_STORAGE_OUTPUT_PATH` (or `STORAGE_S3_BUCKET`)

<figure><img src="/files/6vGCupowCeJFWLLEJKhZ" alt=""><figcaption></figcaption></figure>

Click on the "Create" button and confirm to initiate the task.

{% embed url="<https://cloud.wassa.io/s/ryy3aFELs8xb8hT/download>" %}

### List tasks

The Tasks page list all the tasks that have been created in BlurIt OP (using the Manager or the API). For each task, the Manager displays:

* The date
* The type (Picture, Video or Archive)
* The file name
* The file size
* The task status (updated in real time)
* A button to download the processed file

The list can be filtered.

### Download processed files

From the Tasks page, click on the download icon located in the file column.

<figure><img src="/files/DqmiGikIcxr6XeeTYI9V" alt=""><figcaption></figcaption></figure>


# API

The BlurIt OP API offers several functionalities. It allows you to obtain the current license by using the GET method on the [`/api/license`](/2.4.7/blurit-on-premise/usage/api/license) endpoint. Additionally, you can add a new license by using the POST method on the same endpoint. If a license already exists, it will be replaced by the new license.

Furthermore, the API provides the capability to add a blur task to the queue by using the POST method on the [`/api/blur_it`](/2.4.7/blurit-on-premise/usage/api/tasks) endpoint. You can also add a blur task for a directory by using the POST method on the [`/api/blur_it/directory`](/2.4.7/blurit-on-premise/usage/api/tasks/process-a-directory) endpoint.

Moreover, the API allows you to retrieve the status of a task by using the GET method on the [`/api/task/{task_id}`](/2.4.7/blurit-on-premise/usage/api/tasks/get-the-status-of-a-task) endpoint, where "task\_id" is the task identifier.

\
The API documentation can be found at `http://<HOST>/api/docs`, where `HOST` is the IP address of the machine.

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td></td><td>License</td><td></td><td><a href="/pages/fyzHZmNTxiZdMLer38C5">/pages/fyzHZmNTxiZdMLer38C5</a></td></tr><tr><td></td><td>Blur it</td><td></td><td><a href="/pages/o6O0IRb9m627GmtW8A4A">/pages/o6O0IRb9m627GmtW8A4A</a></td></tr><tr><td></td><td>Blur it directory</td><td></td><td><a href="/pages/WmpKlZGkMqQi7MBpanHf">/pages/WmpKlZGkMqQi7MBpanHf</a></td></tr><tr><td></td><td>Task</td><td></td><td><a href="/pages/epuVjx0DYx1XI0b1chXz">/pages/epuVjx0DYx1XI0b1chXz</a></td></tr></tbody></table>


# License

{% openapi src="/files/Xv4fZHf4yUvciw3wHbGb" path="/api/license" method="get" %}
[openapi.json](https://content.gitbook.com/content/NxhqihnfBe3jfQzCC62l/blobs/YMRZ0Ife4uwb6HBzM360/openapi.json)
{% endopenapi %}

{% openapi src="/files/Xv4fZHf4yUvciw3wHbGb" path="/api/license" method="post" %}
[openapi.json](https://content.gitbook.com/content/NxhqihnfBe3jfQzCC62l/blobs/YMRZ0Ife4uwb6HBzM360/openapi.json)
{% endopenapi %}


# Tasks

* [Process a directory](/2.4.7/blurit-on-premise/usage/api/tasks/process-a-directory)
* [Process a file](/2.4.7/blurit-on-premise/usage/api/tasks/process-a-file)
* [Process a zip file](/2.4.7/blurit-on-premise/usage/api/tasks/process-a-zip-file)
* [Get the status of a task](/2.4.7/blurit-on-premise/usage/api/tasks/get-the-status-of-a-task)
* [Revoke a task](/2.4.7/blurit-on-premise/usage/api/tasks/revoke-a-task)


# Process a directory

## Blur It Directory Post

> Add a blurit directory task in task queue.

```json
{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/blur_it/directory":{"post":{"summary":"Blur It Directory Post","description":"Add a blurit directory task in task queue.","operationId":"blur_it_directory_post_api_blur_it_directory_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectAndBlurDirectoryBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRespsonse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DetectAndBlurDirectoryBody":{"title":"DetectAndBlurDirectoryBody","required":["input_directory","output_directory"],"type":"object","properties":{"input_directory":{"$ref":"#/components/schemas/InputDirectory"},"output_directory":{"$ref":"#/components/schemas/OutputDirectory"},"export_media":{"title":"Should we export the blured media ?","type":"boolean","default":true},"export_json":{"title":"Should we export the detections list ?","type":"boolean","default":true},"blur_plates":{"title":"Should we blur plates ?","type":"boolean","default":true},"blur_heads":{"title":"Should we blur heads ?","type":"boolean","default":true},"keep_audio":{"title":"Should we keep audio in the output medias ?","type":"boolean","default":true}},"description":"Detect and blur directory route's body.\nAt least one of output_media or output_json is needed."},"InputDirectory":{"title":"InputDirectory","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"Directory's relative path","type":"string"},"auto_delete":{"title":"If set to True, deletes the input file after processing.","type":"boolean","default":false}},"description":"Input directory structure"},"OutputDirectory":{"title":"OutputDirectory","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"Directory's relative path","type":"string"}},"description":"Output directory structure"},"TaskRespsonse":{"title":"TaskRespsonse","required":["task_id"],"type":"object","properties":{"task_id":{"title":"Unique task hash","type":"string"}},"description":"Task POST result structure"},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}
```


# Process a file

## Blur It Post

> Add a blurit task in task queue.

```json
{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/blur_it":{"post":{"summary":"Blur It Post","description":"Add a blurit task in task queue.","operationId":"blur_it_post_api_blur_it_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DetectAndBlurBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskRespsonse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"DetectAndBlurBody":{"title":"DetectAndBlurBody","required":["input_media"],"type":"object","properties":{"input_media":{"$ref":"#/components/schemas/InputFile"},"output_media":{"title":"Output video/image informations","allOf":[{"$ref":"#/components/schemas/OutputMedia"}]},"output_json":{"title":"Output JSON informations (contains detections' descriptions)","allOf":[{"$ref":"#/components/schemas/OutputJSON"}]},"blur_plates":{"title":"Should we blur plates ?","type":"boolean","default":true},"blur_heads":{"title":"Should we blur heads ?","type":"boolean","default":true},"keep_audio":{"title":"Should we keep audio in the output media ?","type":"boolean","default":true}},"description":"Detect and blur route's body.\nAt least one of output_media or output_json is needed."},"InputFile":{"title":"InputFile","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"File's relative path","type":"string"},"expires_at":{"title":"Input file's expiration date. Works only with S3 storage.","type":"string"},"auto_delete":{"title":"If set to True (or not set), deletes the input file after processing.","type":"boolean","default":true}},"description":"Input File structure."},"OutputMedia":{"title":"OutputMedia","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"File's relative path","type":"string"},"lifespan":{"title":"Number of seconds the output will be stored. Works only with S3 storage.","type":"integer"}},"description":"Output Media file structure."},"OutputJSON":{"title":"OutputJSON","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"File's relative path","type":"string"},"lifespan":{"title":"Number of seconds the output will be stored. Works only with S3 storage.","type":"integer"}},"description":"Output JSON file structure."},"TaskRespsonse":{"title":"TaskRespsonse","required":["task_id"],"type":"object","properties":{"task_id":{"title":"Unique task hash","type":"string"}},"description":"Task POST result structure"},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}
```


# Process a zip file

## Zip Blur It Post

> Add a zip\_detect\_and\_blur task in task queue.\
> \
> returns a {"task\_id": str}

```json
{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/blur_it/zip":{"post":{"summary":"Zip Blur It Post","description":"Add a zip_detect_and_blur task in task queue.\n\nreturns a {\"task_id\": str}","operationId":"zip_blur_it_post_api_blur_it_zip_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ZipBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"ZipBody":{"title":"ZipBody","required":["input_zip","output_zip"],"type":"object","properties":{"input_zip":{"title":"Input zip storage informations","allOf":[{"$ref":"#/components/schemas/InputZip"}]},"output_zip":{"title":"Output zip storage informations","allOf":[{"$ref":"#/components/schemas/OutputZip"}]},"report_format":{"title":"Fomat of the report file. Set to null if you don't want a report file. Possible values: \"csv\", null","type":"string","default":"csv"},"save_unknown_files":{"title":"If set to True, unprocessable files extensions will be returned with processed files, in the output zip. If set to False, they will be deleted.","type":"boolean","default":false},"add_output_sufix":{"title":"If set to True, output files names will be suffixed (eg: \"file.jpg\" => \"file_anonymized.jpg\")","type":"boolean","default":true},"export_media":{"title":"Should we export the blured media ?","type":"boolean","default":true},"export_json":{"title":"Should we export the detections list ?","type":"boolean","default":true},"blur_plates":{"title":"Should we blur plates ?","type":"boolean","default":true},"blur_heads":{"title":"Should we blur heads ?","type":"boolean","default":true},"keep_audio":{"title":"Should we keep audio in the output media ?","type":"boolean","default":true}}},"InputZip":{"title":"InputZip","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"File's relative path","type":"string"},"expires_at":{"title":"Input file's expiration date. Works only with S3 storage.","type":"string"},"auto_delete":{"title":"If set to True (or not set), deletes the input file after processing.","type":"boolean","default":true}},"description":"Output JSON file structure."},"OutputZip":{"title":"OutputZip","required":["protocol","path"],"type":"object","properties":{"protocol":{"title":"Must be 'file' (for local storage) or 's3' (for S3 storage)","type":"string"},"path":{"title":"File's relative path","type":"string"},"lifespan":{"title":"Number of seconds the output will be stored. Works only with S3 storage.","type":"integer"}},"description":"Output Zip file structure."},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}
```


# Get the status of a task

{% openapi src="/files/Xv4fZHf4yUvciw3wHbGb" path="/api/task/{task\_id}" method="get" %}
[openapi.json](https://content.gitbook.com/content/NxhqihnfBe3jfQzCC62l/blobs/YMRZ0Ife4uwb6HBzM360/openapi.json)
{% endopenapi %}


# Revoke a task

## Revoke Task

> Revokes a posted task. For zip/directories, it doesn't stop the sent sub-tasks

```json
{"openapi":"3.0.2","info":{"title":"FastAPI","version":"0.1.0"},"paths":{"/api/task/{task_id}/revoke":{"put":{"summary":"Revoke Task","description":"Revokes a posted task. For zip/directories, it doesn't stop the sent sub-tasks","operationId":"revoke_task_api_task__task_id__revoke_put","parameters":[{"required":true,"schema":{"title":"Task Id","type":"string"},"name":"task_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TaskMessageResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"TaskMessageResponse":{"title":"TaskMessageResponse","required":["task_id","message"],"type":"object","properties":{"task_id":{"title":"Unique task hash","type":"string"},"message":{"title":"A message related to the route","type":"string"}},"description":"Task POST result structure"},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}
```


# Command line interface

## Overview

The Blurit command line interface, this CLI lets you interact with Blurit On-Premise to perform various tasks related to media anonymization.

## CLI

The main Blurit CLI command.

```bash
blurit [OPTIONS] COMMAND [ARGS]...
```

### License

Manage Blurit licenses.

#### **info**

Displays all Blurit license information.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```shell
blurit license info
```

Response:

```
+------------+--------------------------+
| Property   | Value                    |
+============+==========================+
| Start Date | 2023-07-31T22:00:00.000Z |
+------------+--------------------------+
| End Date   | 2023-12-31T21:59:59.000Z |
+------------+--------------------------+
| License    | LICENSE                  |
+------------+--------------------------+
```

#### **add**

Upload or update a Blurit On-Premise license.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```shell
blurit license add LICENSE
```

Response:

```
+------------+--------------------------+
| Property   | Value                    |
+============+==========================+
| Start Date | 2023-06-27T22:00:00.000Z |
+------------+--------------------------+
| End Date   | 2023-09-30T21:59:59.000Z |
+------------+--------------------------+
| License    | LICENSE                  |
+------------+--------------------------+
```

### Tasks

Manage Blurit tasks.

#### **create**

Create a new Blurit task. Options vary depending on the input type (file, directory, S3 or s3-directory). File processing only needs input argument but output can be specified to store the exit media to a precise location.

options:

* \--input-file \[file|directory|s3|s3-directory] REQUIRED
* \--no-face-blur Disable face blur.&#x20;
* \--no-plate-blur Disable plate blur.&#x20;
* \--json-coord Use JSON coordinates.&#x20;
* \--auto-delete Auto deletion of input media&#x20;
* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json] Output format in JSON

```shell
blurit task create [OPTIONS] INPUT OUTPUT
```

Example: Create a task by specifying input and output directories:

```bash
blurit task create --input-type directory input output
```

Response:

```
job id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
```

#### **status**

Get the status of a specific task using its ID.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

return:

* Succeeded
* Started
* Sent
* Failed
* Couldn't contact the Blurit server

```shell
blurit task status TASK_ID
```

Example:

```bash
blurit tasks status 31bc8405-4a56-4cb2-a67e-689797ad9a1a
```

Response:

```bash
Succeeded
```

#### **list**

List history call tasks.

options:

* \--page TEXT Specify the page number&#x20;
* \--count TEXT Specify the number of results per page&#x20;
* \--starting-date TEXT Specify the starting date&#x20;
* \--ending-date TEXT Specify the ending date&#x20;
* \--filetype \[picture|video|directory] Specify the file type
* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```bash
blurit list
```

Response:

```
+--------------------------+-------------------+-------------+--------------------------------------+---------------+-----------------------+---------------+
| Created At               | Processing Time   | File Type   | Job ID                               | File Name     | Output Media URL      | Task Status   |
+==========================+===================+=============+======================================+===============+=======================+===============+
| 2023-08-24T09:18:42.625Z | 05:42:50.70       | directory   | 31bc8405-4a56-4cb2-a67e-689797ad9a1a | 629d57_part_1 | 629d57_part_2_process | Succeeded     |
+--------------------------+-------------------+-------------+--------------------------------------+---------------+-----------------------+---------------+

```

### Configure

Configure the Blurit application, need to be done at least once before first deployment ('blurit start').

```
blurit configure
```

### Start

Start the Blurit server, CLI must be on the host machine.

```
blurit start
```

### Restart

Restart the Blurit server, CLI must be on the host machine.

```
blurit restart
```

### Stop

Stop the Blurit server, CLI must be on the host machine.

```
blurit stop
```

### Stats

Display total and period (month, day) statistics.

options:

* \--date-start TEXT Starting date with format: %Y-%m-%d&#x20;
* \--date-end TEXT Ending date with format: %Y-%m-%d&#x20;
* \--granularity \[day|month] Display statistics by month or days&#x20;
* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json] Output format in JSON&#x20;
* \--help Show this message and exit.

```
blurit stats
```

**Response:**

```
+------------------------------+-----------+
| Metric                       | Value     |
+==============================+===========+
| Total Videos API Calls       | 73        |
+------------------------------+-----------+
| Total Pictures API Calls     | 443       |
+------------------------------+-----------+
| Total Videos Consumption     | 3.33 GB   |
+------------------------------+-----------+
| Total Pictures Consumption   | 806.07 MB |
+------------------------------+-----------+
| Monthly Videos API Calls     | 4         |
+------------------------------+-----------+
| Monthly Pictures API Calls   | 8         |
+------------------------------+-----------+
| Monthly Videos Consumption   | 22.12 MB  |
+------------------------------+-----------+
| Monthly Pictures Consumption | 9.42 MB   |
+------------------------------+-----------+
```

### Doc

Display link to documentation.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```
blurit doc
```

response:

```
API Documentation:
Operation: https://doc-op.blurit.io
Local: http://127.0.0.1:8084/api/docs
```

### Uninstall

Uninstall the Blurit server, CLI must be on the host machine.

```
blurit uninstall
```

#### **Output Format**&#x20;

The Blurit CLI supports two output formats: text (default) and JSON. You can specify the output format using the -o or --output-format option. For example, to get JSON output, use -o json.

Example:

```
blurit tasks status 31bc8405-4a56-4cb2-a67e-689797ad9a1a -o json
```

Response:

```
{'task_id': '31bc8405-4a56-4cb2-a67e-689797ad9a1a', 'status': 'Succeeded', 'result': {'input_directory': {'protocol': 'file', 'path': 'input/629d57_part_2', 'auto_delete': False}, 'output_directory': {'protocol': 'file', 'path': 'output/629d57_part_2_process'}, 'size': {'VIDEO': 4979394177}, 'nb_files': {'VIDEO': 252}}}
```

#### **Support and Contribution**&#x20;

If you have any questions, issues, or would like to make a return of the Blurit CLI, please contact us at <support@blurit.io>. We hope this guide helps you effectively use the Blurit CLI to manage your media anonymization tasks.


# Monitoring With Flower

**Accessing the Flower Web Interface**

Once the installation of Blurit is complete, Flower's web interface is accessible at:

```arduino
http://<your-server-address>/flower
```

Use the **username** and **password** configured during the installation of Blurit to log in.

**Overview of the Interface**

The Flower interface provides an intuitive way to monitor and manage Celery tasks and workers in real-time. Below is a detailed breakdown of the key sections and columns in the interface.

## **Dashboard: Monitoring Workers Overview**

The **Dashboard** tab in Flower provides an overview of all Celery workers currently running. This page allows you to quickly monitor worker states and performance.

**Column Descriptions**

1. **Worker Name**
   * Displays the unique name of each worker. Typically, the name is prefixed with `celery@` followed by a unique identifier (often based on the hostname).
   * Example: `celery@18e5d5189283`.
2. **Status**
   * Indicates the current status of the worker.
   * **Online**: The worker is active and communicating with the broker.
   * **Offline**: The worker is not responding or has been stopped.
3. **Active**
   * The number of tasks currently being processed by this worker.
   * A high value here relative to the worker’s capacity could indicate overload.
4. **Processed**
   * The total number of tasks processed by the worker since it started.
5. **Failed**
   * The total number of tasks that have failed on this worker.
   * A high number may indicate recurring issues with specific tasks or code.
6. **Succeeded**
   * The total number of tasks successfully executed by the worker.
7. **Retried**
   * The number of tasks that were retried after encountering a temporary error.
8. **Load Average**
   * The system's average load (CPU, memory) for the container or machine running the worker.
   * Format: `1 min, 5 min, 15 min`.
   * Example: `0.19, 0.08, 0.08` indicates a low load across all three timeframes.

**Available Actions**

* **Search Bar**: Use the search bar in the top-right corner to filter workers by name or other attributes. This is helpful when managing many workers.
* **Refresh**: Click the **Refresh** button to update the data displayed on the dashboard.

<figure><img src="/files/k44bUJQI5XWAC0wZCwyy" alt=""><figcaption></figcaption></figure>

## **Tasks: Monitoring and Managing Individual Tasks**

The **Tasks** tab in Flower allows you to monitor the state and details of individual Celery tasks in real-time. This tab is especially useful for diagnosing specific issues or analyzing task performance.

**Column Descriptions**

1. **Name**
   * The name of the task, as defined in your Celery code.
   * Example: `blurit.image`.
   * This typically corresponds to a function or method in your application.
2. **UUID**
   * A unique identifier for each task, useful for debugging or referencing specific tasks.
   * Example: `c2e583bc-1dc9-4193-9df5-fe412aa0b180`.
3. **State**
   * The current state of the task.
   * Common states include:
     * **PENDING**: The task is waiting to be executed.
     * **STARTED**: The task is currently running.
     * **SUCCESS**: The task has completed successfully.
     * **FAILURE**: The task execution failed.
   * Example in the screenshot: **SUCCESS**.
4. **args**
   * The positional arguments passed to the task when it was executed.
   * Example: `()` (no positional arguments in this case).
5. **kwargs**
   * The keyword arguments (named parameters) passed to the task.
   * Example:

     ```json
     jsonCopier le code{
         "input_image": {"protocol": "file", "path": "input/1732010550292-480.jpg"},
         "output_image": {"protocol": "file", "path": "output/878ac326-2b6c-482e-9888-e4346d285ad0.jpg"},
         "lifespan": 3600
     }
     ```
6. **Result**
   * The result returned by the task after execution.
   * Example (summary):

     ```json
     jsonCopier le code{
         "input_image": {"protocol": "file", "path": "input/1732010550292-480.jpg"},
         "output_image": {"protocol": "file", "path": "output/878ac326-2b6c-482e-9888-e4346d285ad0.jpg"},
         "chronos": {"total": 2.219586, "childs": {...}}
     }
     ```
7. **Received**
   * The timestamp when the task was received by the worker.
   * Example: `2024-11-19 10:02:30.472`.
8. **Started**
   * The timestamp when the task started execution.
   * Example: `2024-11-19 10:02:30.478`.
9. **Runtime**
   * The total time the task took to execute, in seconds.
   * Example: `2.733`.
10. **Worker**
    * The Celery worker that executed the task.
    * Example: `celery@83b122840b58`.

<figure><img src="/files/49ljQW55RAL4qq2Ko6Gw" alt=""><figcaption></figcaption></figure>

## **Usage Tips**

1. **Search for Tasks**
   * Use the search bar to filter tasks by **UUID**, **Name**, or **State**. This is especially helpful when dealing with large numbers of tasks.
2. **Diagnose Failures**
   * For tasks in the **FAILURE** state, the `kwargs` and `Result` columns provide valuable details about what went wrong.
3. **Performance Optimization**
   * Use the `Runtime` column to identify tasks that take a long time to execute, which may need optimization.
4. **Input and Output Validation**
   * The `kwargs` and `Result` columns are also useful for verifying the input and output data of specific tasks.


# Release notes

## 2.2.0

### ✨ New Features & Improvements

* **Improved Detection**: Integration of a **new AI model** that significantly enhances the **accuracy and speed of face and license plate detection**. Reducing false positives.

## 2.1.0

### ✨ New Features & Improvements

* **Updated Torch-CUDA Version**: Upgraded `torch-cuda` to version **2.5.1+cu124** to ensure compatibility with the latest CUDA updates and improve performance.

## 2.0.9

**Permission Updates**: The following processes are now configured to use **UID 1200** and **GID 1200**:

* **Blur Worker**
* **Directory Worker**
* **Manager API**

### Technical Details

* These updates improve permission management and enhance security for service execution.
* **Why UID/GID 1200?** This choice ensures compatibility across different systems and avoids conflicts with system-reserved or commonly used IDs. It provides a dedicated user/group for these services, improving security and isolation.

## 2.0.8

### New Features & Improvements

* Added asynchronous CPU and GPU processing to improve performance.
* Introduced a new feature to clear the GPU cache for better resource management.

## 2.0.7

### ✨ New Feature: Intuitive Dashboard for Task & Consumption Tracking

We’ve added a **Dashboard** page to give you a clear overview of service usage and resource consumption.

#### 🔹 Key Features:

📊 **Service Usage** – Total API calls, daily & monthly breakdown\
📉 **Consumption Tracking** – Data usage (MB) per day & month\
📆 **Dynamic Charts** – Yearly & monthly trends for better insights

## 2.0.6

Starting from this version, custom port configuration has been removed. Applications are now accessible exclusively through the standard ports **80** (HTTP) and **443** (HTTPS). Use the dedicated paths `/api` and `/flower` to access the API and the Flower

## 2.0.2

### **New Features:**

* SSL configuration for cloud version

**Hotfixes:**

* **Web App:** Improved input validation to allow spaces in the input path.
* **BlurIt Model:** Resolved an issue with handling videos with low FPS.

## 2.0.1

### ✨ **New Features:**

* Added HTTP Basic Authentication for the web application, enhancing security.

## 2.0

### ✨ **New Features:**

* **High-Performance Algorithm** : This new algorithm delivers enhanced computing power and speed, resulting in better overall performance for your tasks.&#x20;
* **Lightweight Model :** In addition to the high-performance algorithm, we’ve introduced a smaller, more efficient model that uses **less GPU RAM**, making it ideal for environments with limited resources. Despite its compact size, it still provides robust results, ensuring you don't have to compromise on accuracy or efficiency.

## 1.1.0:

* CLI configuration all in one

## 1.0.0:

* installation script
* NEW CLI
* fix: not processing image or video with uppercase extension (e.g. image.PNG)


# Introduction

## AWS Quickstart

**BlurIt On-Premise Cloud Images** are an all-in-one solution designed to run BlurIt On-Premise on your favorite cloud providers. By leveraging our preconfigured cloud images available on the marketplaces, you can deploy the BlurIt On-Premise solution with complete autonomy.

**Important**: while you can autonomously create virtual servers with our images, you still need to contact us to obtain a valid license.&#x20;

## Supported providers

✅ [AWS](https://aws.amazon.com/marketplace/pp/prodview-khnd7pnhybcca?applicationId=AWS-Marketplace-Console\&ref_=beagle\&sr=0-5)

⏳ Azure (late October)

⏳ GCP (November)

## Supported servers

We highly recommend deploying BlurIt OP on virtual server with Nvidia GPU for better performance, although the software can be run on CPU only.

AMD GPU are not supported.

For a complete list of hardware requirements, please [see details here](/2.4.7/blurit-on-premise/requirements#hardware-requirements).


# AWS

This step-by-step guide will walk you through deploying a BlurIt OP instance using our preconfigured AMI on AWS.

## Step 1: Access the AWS Marketplace

1. Log in to your AWS account.
2. Go to the [AWS Marketplace](https://aws.amazon.com/marketplace).
3. In the search bar, type **BlurIt**.
4. Select the **BlurIt** image from the search results.

## Step 2: Launch the Instance

1. On the AMI BlurIt page, click **Continue to Subscribe**.
2. Review and accept the terms of use.
3. Click **Continue to Configuration**.
4. Choose the **AWS region** where you want to deploy the instance.
5. Under **Fulfillment Option**, select **AMI**.
6. Choose the recommended instance type (With Nvidia GPU).
7. Click **Continue to Launch**.

## Step 3: Configure Networking and Options

1. Select or create a **VPC** and a **Security Group** that allows SSH traffic and TCP ports 8080 to 8085 (these values may differ if you later don't use default values during the configuration process).
2. Launch the instance.

## Step 4: Connect to the Instance

1. Go to the **EC2 Console** to see your running instance.
2. Click on the instance to retrieve the public IP address or DNS name of the instance.
3. Use an SSH client to connect to the instance with the following command:

   ```bash
   ssh -i /path/to/your-key.pem ubuntu@your-instance-public-ip
   ```

## Step 5: Configure Blurit

1. Once connected, begin by configuring your BlurIt server and answering the prompts:

   ```bash
   blurit configure
   ```
2. Start your BlurIt server:

   ```bash
   blurit start
   ```
3. Activate your BlurIt server by adding your license:

   ```bash
   blurit license add <license>
   ```

Please consult [this page](/2.4.7/blurit-on-premise/installation/configuration) for full documentation.

## Step 6: Access the manager

Once connected, open your web browser and navigate to your instance's public IP address (or DNS name):

```
http://<your-instance-public-ip>:8084
```

## Step 7: Using the BlurIt API

The BlurIt API is available at the following endpoint on your instance:

```
http://<your-instance-public-ip>/api
```

Refer to the [API documentation](/2.4.7/blurit-on-premise/usage/api) for details on the available endpoints and how to integrate them into your workflows.


# Getting started

## Overview

The BlurIt On Premise version (aka BlurIt OP) provides a full offline and unlimited self hosted use of BlurIt by deploying the solution directly on your servers.

This guide will go through the installation process of a standard BlurIt OP setup. If you require custom settings related to the number of GPUs and/or the number of workers, please contact us at <contact@blurit.io>.

**If you want to install BlurIt OP on a cloud provider (AWS, Azure, GCP), please** [**follow instructions here**](/2.2.0/cloud-images/introduction)**.**

## Before you start

Before you start, be sure you have received from Wassa the BlurIt OP archive that contains the installation files.

BlurIt OPs runs in a dockerized environment on Linux or Windows, hence the installation of BlurIt OP requires basic knowledge of Linux/Windows and Docker usage.

If you need any help installing BlurIt OP, please contact us at <contact@blurit.io>.


# Requirements

## Hardware requirements

* CPU recommended: 3-4 threads as the base and 1-2 cores per worker on each machine.
* GPU Nvidia (consumer and professional) [computer capability](https://developer.nvidia.com/cuda-gpus) >= sm\_37 for optimal performance
* RAM GPU 4-6 GB for 1 worker depending of the resolution
* RAM > 16 GB
* 60 Go + local storage

## Software dependencies

* Linux Ubuntu >= 20.04 / CentOS >= 8 / Amazon Linux 2 Deep Learning AMI GPU&#x20;
* Windows 10 Pro, 11 Pro and server 2022 with Windows Subsystem for Linux (WSL)
* Install the following dependencies either using the provided script ([Linux](/2.2.0/blurit-on-premise/installation/linux-dependencies) only) or manually ([Linux](/2.2.0/blurit-on-premise/installation/linux-dependencies) or [Windows](/2.2.0/blurit-on-premise/installation/windows-dependencies-wsl)):
  * [nvidia drivers](https://www.nvidia.com/download/index.aspx) recommended >= 470
  * [docker ce](https://docs.docker.com/engine/install/) and [post install linux](https://.docker.com/engine/install/linux-postinstall/)
  * [docker desktop](https://docs.docker.com/desktop/install/windows-install/) for Windows WSL
  * docker-compose <= 1.29
  * [nvidia-docker2](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#setting-up-nvidia-container-toolkit) (set as default docker runtime)

## Blurit archive

* blurit\_stack.yml
* .env
* Blurit-op.postman\_collection.json
* README.md
* licence.txt
* login-registry.txt
* install\_dependencies.sh

###


# Installation

{% content-ref url="/pages/XGRsi3LnCyZ37pzzDvji" %}
[Linux dependencies](/2.2.0/blurit-on-premise/installation/linux-dependencies)
{% endcontent-ref %}

{% content-ref url="/pages/u0NzVXfbZPsHjuBnJzJp" %}
[Windows dependencies (WSL)](/2.2.0/blurit-on-premise/installation/windows-dependencies-wsl)
{% endcontent-ref %}

{% content-ref url="/pages/33MB6VJhfv9yRtJwhgQf" %}
[Configuration](/2.2.0/blurit-on-premise/installation/configuration)
{% endcontent-ref %}

{% content-ref url="/pages/usinf50sM4HYGmrXTSW3" %}
[Run BlurIt OP](/2.2.0/blurit-on-premise/installation/run-blurit-op)
{% endcontent-ref %}

{% content-ref url="/pages/QyDYTQ2GDnrCXKq64Mpq" %}
[Multi-servers installation](/2.2.0/blurit-on-premise/installation/multi-servers-installation)
{% endcontent-ref %}

{% content-ref url="/pages/1j3QnV6qSF26ovSTpiXI" %}
[Post installation verifications](/2.2.0/blurit-on-premise/installation/post-installation-verifications)
{% endcontent-ref %}


# Linux dependencies

*Note: Don't follow this step if you plan to run BlurIt OP on Windows.* [*Go there*](/2.2.0/blurit-on-premise/installation/windows-dependencies-wsl) *instead.*

## Choice 1 : use our dependencies installation script (recommended)

#### Prerequisites Before Installation

Before starting the installation, ensure you have received the archive containing all necessary documents. This archive will be shared via a secured link protected by a password.

**Contents of the Archive**

**Main Archive**: `client_name_YYYYMMDD.tar.gz`

The archive will include the following files:

1. **License File**: `license_client_name_YYYYMMDD_YYYYMMDD`
   * The license file specifies the validity period (start and end dates).
2. **Registry Login**: `login_registry.txt`
   * Contains the credentials to access the registry.
3. **Installation Script**: `linux_installation_script`
   * A script compatible only with Linux systems.
4. **Custom Configuration File** (if applicable): `blurit_stack.yml`

This script will install the software requirements to run BlurIt On-Premise on your server. It will install Nvidia drivers, Docker CE, and Nvidia-docker on Ubuntu, Debian, and RHEL/CentOS. If you are installing BlurIt on an old server and want to maintain specific version dependencies, we don't recommend to use this script but rather to [manually install everything](#manual-dependencies-installation).

To begin, extract the BlurIt OP archive using the following command:

{% code lineNumbers="true" %}

```bash
tar -xzf filename.tar.gz
cd blurit-op
```

{% endcode %}

Replace "filename" with the actual name of the archive that was provided to you.

To start the script, execute the following command:

{% code lineNumbers="true" %}

```sh
sudo ./install_dependencies.sh
```

{% endcode %}

:rotating\_light: After execution of the script, please reboot the server to load the Nvidia drivers and go to the [Configuration](/2.2.0/blurit-on-premise/installation/configuration) page. :rotating\_light:

## Choice 2 : manual dependencies installation

### Nvidia drivers Installation

1. Download the NVIDIA driver >= 470 runfile from: <https://www.nvidia.com/Download/index.aspx?lang=en-us>
2. Open a terminal and navigate to the directory where the downloaded runfile is located.
3. `$ chmod +x <filename>.run` \
   Replace `<filename>` with the actual name of the downloaded runfile.
4. `$ sudo ./<filename>.run`&#x20;
5. `$ sudo reboot`&#x20;

### Docker Installation

The Docker installation documentation is [here](https://docs.docker.com/engine/install/).

{% tabs %}
{% tab title="Ubuntu" %}
{% code lineNumbers="true" fullWidth="false" %}

```bash
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
sudo install -m 0755 -d /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin
```

{% endcode %}
{% endtab %}

{% tab title="Debian" %}
{% code lineNumbers="true" %}

```bash
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
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
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

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
```

{% endcode %}
{% endtab %}

{% tab title="Centos" %}
{% code lineNumbers="true" %}

```bash
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl start docker
```

{% endcode %}
{% endtab %}

{% tab title="RHEL" %}
{% code lineNumbers="true" %}

```bash
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl start docker
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Post-install docker linux (required):&#x20;

{% code lineNumbers="true" %}

```bash
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
```

{% endcode %}

### Nvidia-docker installation

Nvidia-docker installation documentation is [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html).

{% tabs %}
{% tab title="Ubuntu / Debian" %}
{% code lineNumbers="true" %}

```bash
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/stable/deb/nvidia-container-toolkit.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
```

{% endcode %}
{% endtab %}

{% tab title="Centos / RHEL" %}
{% code lineNumbers="true" %}

```bash
curl -s -L https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo | \
  sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo

sudo yum clean expire-cache
sudo yum install -y nvidia-container-toolkit
```

{% endcode %}
{% endtab %}
{% endtabs %}

Configure the Docker daemon to recognize the NVIDIA Container Runtime:

{% code lineNumbers="true" %}

```bash
sudo nvidia-ctk runtime configure --runtime=docker
```

{% endcode %}

Restart the Docker daemon to complete the installation after setting the default runtime:

{% code lineNumbers="true" %}

```bash
sudo systemctl restart docker
```

{% endcode %}

Test if Nvidia-docker is installed:

{% code lineNumbers="true" %}

```bash
sudo docker run --rm --runtime=nvidia --gpus all nvidia/cuda:11.6.2-base-ubuntu20.04 nvidia-smi
```

{% endcode %}

This should result in a console output shown below:

```
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.51.06    Driver Version: 470.51.06    CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla T4            On   | 00000000:00:1E.0 Off |                    0 |
| N/A   34C    P8     9W /  70W |      0MiB / 15109MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
```

### Configuring daemon.json

Open `/etc/docker/daemon.json` with your favorite text editor.

Add `"default-runtime": "nvidia",`  to the json. Exemple:

{% code title="/etc/docker/daemon.json" lineNumbers="true" %}

```json
{
  "default-runtime": "nvidia",
  "runtimes": {
    "nvidia": {
      "args": [],
      "path": "nvidia-container-runtime
    }
  }
}
```

{% endcode %}

### Blurit CLI Installation

The **Blurit CLI** enables you to easily **configure**, **start**, and **interact** with Blurit. It provides a command-line interface to manage features and streamline platform usage.

Start these commands from WSL:

```bash
wget https://cloud.wassa.io/s/Kuj5MDgqkMCdjRv/download --output-document=blurit
chmod +x blurit
sudo mv blurit /usr/bin
```


# Windows dependencies (WSL)

*Don't follow this step if you plan to run BlurIt OP on Linux.* [*Go there*](/2.2.0/blurit-on-premise/installation/linux-dependencies) *instead.*

#### Prerequisites Before Installation

Before starting the installation, ensure you have received the archive containing all necessary documents. This archive will be shared via a secured link protected by a password.

**Contents of the Archive**

**Main Archive**: `client_name_YYYYMMDD.tar.gz`

The archive will include the following files:

1. **License File**: `license_client_name_YYYYMMDD_YYYYMMDD`
   * The license file specifies the validity period (start and end dates).
2. **Registry Login**: `login_registry.txt`
   * Contains the credentials to access the registry.
3. **Custom Configuration File** (if applicable): `blurit_stack.yml`

## Nvidia Driver installation

Download the NVIDIA driver >= 470 exe from: <https://www.nvidia.com/Download/index.aspx?lang=en-us>

You can also update the drivers using [Nvidia Geforce Experience](https://www.nvidia.com/fr-fr/geforce/geforce-experience/).

## Install WSL 2 (Windows Subsystem Linux)

To Check if WSL is installed, open PowerShell as administrator and run:

{% code lineNumbers="true" %}

```powershell
wsl -l –v
```

{% endcode %}

If WSL is not installed:

{% code lineNumbers="true" %}

```
wsl --install -d Ubuntu
```

{% endcode %}

Then reboot your machine.

It is possible to modify the resources allocated to WSL. For more information, you can refer to this link: <https://learn.microsoft.com/fr-fr/windows/wsl/wsl-config#wslconfig>.

## Docker installation

Instruction to install docker CE on windows with WSL 2 backend : <https://docs.docker.com/desktop/install/windows-install/>.

During the install don't forget to tick the Use **WSL 2 instead of Hyper-V** checkbox.

Additionally, if you want the BlurIt app to restart automatically when the machine restarts, check the box labeled 'Start Docker Desktop when you sign, in.'

<figure><img src="/files/JiXQpTr8CT9Rku5A0NcL" alt=""><figcaption></figcaption></figure>

## Nvidia-docker installation

To enter WSL, open PowerShell and type `wsl` followed by pressing Enter.

{% code lineNumbers="true" %}

```bash
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/stable/deb/nvidia-container-toolkit.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
```

{% endcode %}

Verify that Nvidia-Docker is installed:

{% code lineNumbers="true" %}

```bash
sudo docker run --rm --gpus all nvidia/cuda:11.6.2-base-ubuntu20.04 nvidia-smi -a
```

{% endcode %}

### Configuring Docker daemon

Append the following JSON content on the Docker Desktop config like this:

{% code lineNumbers="true" %}

```json
{
	... # current content
	"runtimes": {
		"nvidia": {
			"path": "/usr/bin/nvidia-container-runtime",
			"runtimeArgs": []
		}
	},
	"default-runtime": "nvidia"
}
```

{% endcode %}

<figure><img src="/files/aqY0dxHLB1qmTPwT1tUn" alt=""><figcaption></figcaption></figure>

Restart Docker for the change to take effect.

### Post-install docker linux on WSL (required):&#x20;

{% code lineNumbers="true" %}

```bash
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
```

{% endcode %}

### Blurit CLI Installation

The **Blurit CLI** enables you to easily **configure**, **start**, and **interact** with Blurit. It provides a command-line interface to manage features and streamline platform usage.

Start these commands from WSL:

```bash
wget https://cloud.wassa.io/s/Kuj5MDgqkMCdjRv/download --output-document=blurit
chmod +x blurit
sudo mv blurit /usr/bin
```


# Configuration

## Blurit CLI

The Blurit CLI is installed during the [Linux](/2.2.0/blurit-on-premise/installation/linux-dependencies) or [Windows](/2.2.0/blurit-on-premise/installation/windows-dependencies-wsl) dependencies installation process. This command will prompt you with several questions to assist in setting up your Blurit installation. If Blurit team send you a compose file, it's possible to pass it as argument.

```bash
blurit configure
```

For custom installations, if a `blurit_stack.yml` file is provided, include it as an argument when executing the relevant commands :<br>

```bash
blurit configure blurit_stack.yml
```

## Configuration explanation

The following section provides an explanation of the various questions asked during the configuration process.

### Model

During the configuration process, you'll be prompted to select the AI model version that best fits your performance and precision needs. BlurIt offers two options:

* **tiny**: This model is optimized for speed, processing images and videos faster. It is ideal for scenarios where performance is critical, although it comes with a very slight reduction in precision. This is the default option.
* **standard**: This version provides a balance between speed and precision. While still optimized for fast processing, it offers slightly higher accuracy compared to the tiny model, making it suitable for tasks where precision is more important.

### Web App Authentication

To secure access to the BlurIt web app, you’ll need to set up a username and password during the configuration process. This protects the web interface and ensures that only authorized users can manage files and access data.

1. **Username**: Create a unique username for accessing the web app.
2. **Password**: Set a strong password for added security. Store it securely for future access.

Alternatively, you may choose not to set a username and password for quicker access. However, please note that **disabling authentication** means the web app will be openly accessible, which may expose your data to unauthorized access. This choice comes with the user’s full responsibility for securing access to the application.

### **SSL Configuration**&#x20;

For enhanced security, you can enable SSL to encrypt communication between clients and the server. During the configuration process, you will be prompted to provide the following:

1. **Server Name**: Specify the domain name or IP address used to access your BlurIt web app.
2. **Path to SSL Certificate File (.pem)**: Provide the full path to your SSL certificate file. This file contains the public key and is required for establishing secure HTTPS connections.
3. **Path to SSL Private Key File (.pem)**: Provide the full path to your private key file. This file must correspond to the SSL certificate provided.

If you do not have an SSL certificate, you can use services like [Let's Encrypt](https://letsencrypt.org/) to generate one for free or use self-signed certificates for internal testing.

By enabling SSL and authentication, you ensure that your data and web app are protected against unauthorized access and interception.

### Local storage

These settings define the base directories where BlurIt OP will locate input files (to be processed) and where it will store the output files (blurred videos/images and detection JSONs) on the local server storage, i.e., on the server where BlurIt OP is running.

#### Accessing Windows Drives on WSL

If you are using Windows Subsystem for Linux (WSL), your Windows drives are accessible under the `/mnt/` directory. Each drive is mapped to its respective folder:

* **Drive C:** Located at `/mnt/c/`
* **Drive D:** Located at `/mnt/d/`, and so on.

For example, if you need to access a file located at `C:\Users\YourName\Documents`, you can find it in WSL at:

```bash
/mnt/c/Users/YourName/Documents
```

This mapping makes it easy to navigate between your Windows environment and the Linux subsystem.

The input and output directories will be assigned to the user with ID 1200.

**Why UID/GID 1200?**&#x20;

This choice ensures compatibility across different systems and avoids conflicts with system-reserved or commonly used IDs. It provides a dedicated user/group for these services, improving security and isolation.

### S3 storage

These settings allow the use of S3 storage for the input and output directories for media.

### GPU settings

Select the GPU you wish to use with Blurit.

### Max Threads number

This variable represents the maximum number of threads that the reencoding step will utilize on your CPU. Increasing this value can result in faster reencoding.&#x20;

However, it's important to note that you should reserve some threads for other processes.

Avoid using the maximum number of available threads on your server, as it may impact the performance of other applications.

#### Webhook (optional)

This setting is a configuration that defines a route or URL where a POST request can be sent. This endpoint is typically used to send JSON data to another system or service.

In this specific example, when the POST request is made to the "CUSTOM\_WEBHOOK\_ENDPOINT" route, the JSON payload being sent is as follows:

```json
{
  "status": "Succeeded",
  "task_id": "abc-123-456-789"
}
```

The JSON payload contains two key-value pairs:

* "status" with a value of "Succeeded"
* "task\_id" with a value of "abc-123-456-789"

The purpose of this webhook is to notify or provide information to the system or service listening at the specified endpoint about the status of a task or operation. The receiving system can then process this data according to its requirements.

### Jobs timeouts

This parameter represents the amount of time the application waits before changing the status of a task to "failed." By default, it is set to 43200000 milliseconds (equivalent to 12 hours).


# Run BlurIt OP

## Blurit CLI

The Blurit CLI is installed during the [Linux](/2.2.0/blurit-on-premise/installation/linux-dependencies) or [Windows](/2.2.0/blurit-on-premise/installation/windows-dependencies-wsl) dependencies installation process. This command will prompt you with several questions to assist in setting up your Blurit installation.

```bash
blurit start
```

The application will be available on ports **80** (HTTP) and **443** (HTTPS). The API can be accessed at the URL `/api`, and the Flower interface at `/flower`. The manager remains accessible via the standard URL (DNS or IP).


# Multi-servers installation

#### Add a worker node

🚨 This section pertains to clustering Blurit On-Premise. If you would like more information about it, please contact our customer services.🚨&#x20;

Before joining the manager machine, you need to open some ports:

* `TCP` port `2377` for cluster management communications
* `TCP` and `UDP` port `7946` for communication among nodes
* `UDP` port `4789` for overlay network traffic

Get Join-token on manager machine:

{% code lineNumbers="true" %}

```bash
docker swarm join-token worker
```

{% endcode %}

Replace `<worker-token>` with the actual token obtained from the previous command, and `<ip-of-manager-machine>` with the IP address or hostname of the manager machine. This command will join the worker machine to the swarm cluster.

Join the swarm cluster on the worker machine (<https://docs.docker.com/engine/reference/commandline/swarm\\_join/>):

{% code lineNumbers="true" %}

```bash
docker swarm join --token <worker-token> <ip-of-manager-machine>:2377
```

{% endcode %}

#### Add label to node

Add a label allow to chose the machine to deploy the workers. For multiple machine installation, it's mandatory for a smooth deployment.

This command display every node present on the swarm cluster:

{% code lineNumbers="true" %}

```bash
docker node ls
```

{% endcode %}

Add a label to a node:

{% code lineNumbers="true" %}

```bash
docker node update --label-add blurit-worker-<number of the machine> <node-name>
```

{% endcode %}

Replace `<machine-number>` with the appropriate number for the machine, and `<node-name>` with the name of the node. This command adds a label to the specified node, which will be used for deployment purposes.


# Post installation verifications

## Blurit CLI

The Blurit CLI is installed during the [Linux](/2.2.0/blurit-on-premise/installation/linux-dependencies) or [Windows](/2.2.0/blurit-on-premise/installation/windows-dependencies-wsl) dependencies installation process. This command will prompt you with several questions to assist in setting up your Blurit installation.

```bash
blurit status
```


# Usage

As said in the [Configuration](/2.2.0/blurit-on-premise/installation/configuration) section, BlurIt OP Web Manager or API works within the paths set in `LOCAL_STORAGE_INPUT_PATH` and `LOCAL_STORAGE_OUTPUT_PATH`. Every processed media will be stored in `LOCAL_STORAGE_OUTPUT_PATH`, while the original media will be processed from `LOCAL_STORAGE_INPUT_PATH`.

There are two ways to process files with BlurIt OP:

1. Manager Webapp: The web app manager provides a Graphical User Interface (GUI) accessible at `http://<host> or https://<host>`, where "host" refers to the IP address of the machine where BlurIt OP is deployed or the dns url configured. This interface allows non-developers to process files easily.
2. API: The API is accessible at `http://<host>/api or https://<host>/api`. It allows developers to integrate BlurIt OP file processing capabilities into their own applications or workflows programmatically. This allows for greater flexibility and automation.


# Manager Webapp

## Overview

The Manager is a web application that facilitate usage of BlurIt OP by providing a GUI to non-developer users. It also provide an history of taks processed by BlurIt OP, wether thoses tasks have been created from the Manager or from the API.

## Access

You can access the Manager by visiting `http://<HOST> or https://<HOST>`, where `HOST` is the IP address of the machine or the dns url configured in the [Configuration](/2.2.0/blurit-on-premise/installation/configuration) section.

## License activation

Before using BlurIt OP, you must activate the license.

&#x20;Once you're on the Manager, click on the "Update License" button located at the top right corner of your screen.

<figure><img src="/files/kAOEIxFRlsulzYnGslkC" alt=""><figcaption></figcaption></figure>

After navigating to the Account (`/account`) page, click on the "Edit license" button. Next, paste the license into the designated text area and confirm the changes by clicking on the "Update license" button.

{% embed url="<https://cloud.wassa.io/s/nhQZwaY8uPUs8xP/download>" %}

## Tasks

### Create a task

To start a task, go to Tasks page (`/tasks`) by clicking on side menu "Tasks" and click on the  "Anonymize" button.

<figure><img src="/files/xk9QDXgop0vcy2T6Fk9e" alt=""><figcaption></figcaption></figure>

You can now follow 3 simple steps to create a new task:

1. **Source**: Choose either a file from your PC or a whole folder to process from the local storage or S3.
   * To process a file from your PC, use the file selection option or simply drag and drop the file into the designated area.
   * To process a folder, enter its path in the field. The path you enter represents a subdirectory of the `LOCAL_STORAGE_INPUT_PATH` (or `STORAGE_S3_BUCKET` if you use S3 storage) set in the [Configuration](/2.2.0/blurit-on-premise/installation/configuration) section. Please ensure that the directory already exists and has some files in it. If you don't enter anything, BurIt OP will process files directly in `LOCAL_STORAGE_INPUT_PATH` (or `STORAGE_S3_BUCKET`)
2. **Blur options**: Select the desired task options from the following choices:
   * Face anonymisation
   * Plates anonymisation
   * Coordinates position
3. **Output path**: Specify the desired output location, whether it's local storage or S3. You can either change the name of the output file or create a new directory in the output to store your processed media. As for the source, the directory you enter here represents a subdirectory of `LOCAL_STORAGE_OUTPUT_PATH` (or `STORAGE_S3_BUCKET` if you use S3 storage). If you don't enter anything, BurIt OP will save processed files directly in `LOCAL_STORAGE_OUTPUT_PATH` (or `STORAGE_S3_BUCKET`)

<figure><img src="/files/c7XVFVRlFosavmkcIodz" alt=""><figcaption></figcaption></figure>

Click on the "Create" button and confirm to initiate the task.

{% embed url="<https://cloud.wassa.io/s/ryy3aFELs8xb8hT/download>" %}

### List tasks

The Tasks page list all the tasks that have been created in BlurIt OP (using the Manager or the API). For each task, the Manager displays:

* The date
* The type (Picture, Video or Archive)
* The file name
* The file size
* The task status (updated in real time)
* A button to download the processed file

The list can be filtered.

### Download processed files

From the Tasks page, click on the download icon located in the file column.

<figure><img src="/files/DqmiGikIcxr6XeeTYI9V" alt=""><figcaption></figcaption></figure>


# API

The BlurIt OP API offers several functionalities. It allows you to obtain the current license by using the GET method on the [`/api/license`](/2.2.0/blurit-on-premise/usage/api/license) endpoint. Additionally, you can add a new license by using the POST method on the same endpoint. If a license already exists, it will be replaced by the new license.

Furthermore, the API provides the capability to add a blur task to the queue by using the POST method on the [`/api/blur_it`](/2.2.0/blurit-on-premise/usage/api/tasks) endpoint. You can also add a blur task for a directory by using the POST method on the [`/api/blur_it/directory`](/2.2.0/blurit-on-premise/usage/api/tasks/process-a-directory) endpoint.

Moreover, the API allows you to retrieve the status of a task by using the GET method on the [`/api/task/{task_id}`](/2.2.0/blurit-on-premise/usage/api/tasks/get-the-status-of-a-task) endpoint, where "task\_id" is the task identifier.

\
The API documentation can be found at `http://<HOST>/api/docs`, where `HOST` is the IP address of the machine.

<table data-view="cards"><thead><tr><th></th><th></th><th></th><th data-hidden data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td></td><td>License</td><td></td><td><a href="/pages/fyzHZmNTxiZdMLer38C5">/pages/fyzHZmNTxiZdMLer38C5</a></td></tr><tr><td></td><td>Blur it</td><td></td><td><a href="/pages/o6O0IRb9m627GmtW8A4A">/pages/o6O0IRb9m627GmtW8A4A</a></td></tr><tr><td></td><td>Blur it directory</td><td></td><td><a href="/pages/WmpKlZGkMqQi7MBpanHf">/pages/WmpKlZGkMqQi7MBpanHf</a></td></tr><tr><td></td><td>Task</td><td></td><td><a href="/pages/epuVjx0DYx1XI0b1chXz">/pages/epuVjx0DYx1XI0b1chXz</a></td></tr></tbody></table>


# License

{% openapi src="/files/Xv4fZHf4yUvciw3wHbGb" path="/api/license" method="get" %}
[openapi.json](https://content.gitbook.com/content/xGECeRrP79g0K6HTksdl/blobs/sFTAVDrv2U6BPqRlPYQU/openapi.json)
{% endopenapi %}

{% openapi src="/files/Xv4fZHf4yUvciw3wHbGb" path="/api/license" method="post" %}
[openapi.json](https://content.gitbook.com/content/xGECeRrP79g0K6HTksdl/blobs/sFTAVDrv2U6BPqRlPYQU/openapi.json)
{% endopenapi %}


# Tasks

* [Process a directory](/2.2.0/blurit-on-premise/usage/api/tasks/process-a-directory)
* [Process a file](/2.2.0/blurit-on-premise/usage/api/tasks/process-a-file)
* [Get the status of a task](/2.2.0/blurit-on-premise/usage/api/tasks/get-the-status-of-a-task)


# Process a directory

{% openapi src="/files/Xv4fZHf4yUvciw3wHbGb" path="/api/blur\_it/directory" method="post" %}
[openapi.json](https://content.gitbook.com/content/xGECeRrP79g0K6HTksdl/blobs/sFTAVDrv2U6BPqRlPYQU/openapi.json)
{% endopenapi %}


# Process a file

{% openapi src="/files/Xv4fZHf4yUvciw3wHbGb" path="/api/blur\_it" method="post" %}
[openapi.json](https://content.gitbook.com/content/xGECeRrP79g0K6HTksdl/blobs/sFTAVDrv2U6BPqRlPYQU/openapi.json)
{% endopenapi %}


# Get the status of a task

{% openapi src="/files/Xv4fZHf4yUvciw3wHbGb" path="/api/task/{task\_id}" method="get" %}
[openapi.json](https://content.gitbook.com/content/xGECeRrP79g0K6HTksdl/blobs/sFTAVDrv2U6BPqRlPYQU/openapi.json)
{% endopenapi %}


# Command line interface

## Overview

The Blurit command line interface, this CLI lets you interact with Blurit On-Premise to perform various tasks related to media anonymization.

## CLI

The main Blurit CLI command.

```bash
blurit [OPTIONS] COMMAND [ARGS]...
```

### License

Manage Blurit licenses.

#### **info**

Displays all Blurit license information.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```shell
blurit license info
```

Response:

```
+------------+--------------------------+
| Property   | Value                    |
+============+==========================+
| Start Date | 2023-07-31T22:00:00.000Z |
+------------+--------------------------+
| End Date   | 2023-12-31T21:59:59.000Z |
+------------+--------------------------+
| License    | LICENSE                  |
+------------+--------------------------+
```

#### **add**

Upload or update a Blurit On-Premise license.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```shell
blurit license add LICENSE
```

Response:

```
+------------+--------------------------+
| Property   | Value                    |
+============+==========================+
| Start Date | 2023-06-27T22:00:00.000Z |
+------------+--------------------------+
| End Date   | 2023-09-30T21:59:59.000Z |
+------------+--------------------------+
| License    | LICENSE                  |
+------------+--------------------------+
```

### Tasks

Manage Blurit tasks.

#### **create**

Create a new Blurit task. Options vary depending on the input type (file, directory, S3 or s3-directory). File processing only needs input argument but output can be specified to store the exit media to a precise location.

options:

* \--input-file \[file|directory|s3|s3-directory] REQUIRED
* \--no-face-blur Disable face blur.&#x20;
* \--no-plate-blur Disable plate blur.&#x20;
* \--json-coord Use JSON coordinates.&#x20;
* \--auto-delete Auto deletion of input media&#x20;
* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json] Output format in JSON

```shell
blurit task create [OPTIONS] INPUT OUTPUT
```

Example: Create a task by specifying input and output directories:

```bash
blurit task create --input-type directory input output
```

Response:

```
job id: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
```

#### **status**

Get the status of a specific task using its ID.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

return:

* Succeeded
* Started
* Sent
* Failed
* Couldn't contact the Blurit server

```shell
blurit task status TASK_ID
```

Example:

```bash
blurit tasks status 31bc8405-4a56-4cb2-a67e-689797ad9a1a
```

Response:

```bash
Succeeded
```

#### **list**

List history call tasks.

options:

* \--page TEXT Specify the page number&#x20;
* \--count TEXT Specify the number of results per page&#x20;
* \--starting-date TEXT Specify the starting date&#x20;
* \--ending-date TEXT Specify the ending date&#x20;
* \--filetype \[picture|video|directory] Specify the file type
* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```bash
blurit list
```

Response:

```
+--------------------------+-------------------+-------------+--------------------------------------+---------------+-----------------------+---------------+
| Created At               | Processing Time   | File Type   | Job ID                               | File Name     | Output Media URL      | Task Status   |
+==========================+===================+=============+======================================+===============+=======================+===============+
| 2023-08-24T09:18:42.625Z | 05:42:50.70       | directory   | 31bc8405-4a56-4cb2-a67e-689797ad9a1a | 629d57_part_1 | 629d57_part_2_process | Succeeded     |
+--------------------------+-------------------+-------------+--------------------------------------+---------------+-----------------------+---------------+

```

### Configure

Configure the Blurit application, need to be done at least once before first deployment ('blurit start').

```
blurit configure
```

### Start

Start the Blurit server, CLI must be on the host machine.

```
blurit start
```

### Restart

Restart the Blurit server, CLI must be on the host machine.

```
blurit restart
```

### Stop

Stop the Blurit server, CLI must be on the host machine.

```
blurit stop
```

### Stats

Display total and period (month, day) statistics.

options:

* \--date-start TEXT Starting date with format: %Y-%m-%d&#x20;
* \--date-end TEXT Ending date with format: %Y-%m-%d&#x20;
* \--granularity \[day|month] Display statistics by month or days&#x20;
* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json] Output format in JSON&#x20;
* \--help Show this message and exit.

```
blurit stats
```

**Response:**

```
+------------------------------+-----------+
| Metric                       | Value     |
+==============================+===========+
| Total Videos API Calls       | 73        |
+------------------------------+-----------+
| Total Pictures API Calls     | 443       |
+------------------------------+-----------+
| Total Videos Consumption     | 3.33 GB   |
+------------------------------+-----------+
| Total Pictures Consumption   | 806.07 MB |
+------------------------------+-----------+
| Monthly Videos API Calls     | 4         |
+------------------------------+-----------+
| Monthly Pictures API Calls   | 8         |
+------------------------------+-----------+
| Monthly Videos Consumption   | 22.12 MB  |
+------------------------------+-----------+
| Monthly Pictures Consumption | 9.42 MB   |
+------------------------------+-----------+
```

### Doc

Display link to documentation.

options:

* -h, --host TEXT Specify the host&#x20;
* -p, --port INTEGER Specify the port&#x20;
* -o \[json]   Output format in JSON

```
blurit doc
```

response:

```
API Documentation:
Operation: https://doc-op.blurit.io
Local: http://127.0.0.1:8084/api/docs
```

### Uninstall

Uninstall the Blurit server, CLI must be on the host machine.

```
blurit uninstall
```

#### **Output Format**&#x20;

The Blurit CLI supports two output formats: text (default) and JSON. You can specify the output format using the -o or --output-format option. For example, to get JSON output, use -o json.

Example:

```
blurit tasks status 31bc8405-4a56-4cb2-a67e-689797ad9a1a -o json
```

Response:

```
{'task_id': '31bc8405-4a56-4cb2-a67e-689797ad9a1a', 'status': 'Succeeded', 'result': {'input_directory': {'protocol': 'file', 'path': 'input/629d57_part_2', 'auto_delete': False}, 'output_directory': {'protocol': 'file', 'path': 'output/629d57_part_2_process'}, 'size': {'VIDEO': 4979394177}, 'nb_files': {'VIDEO': 252}}}
```

#### **Support and Contribution**&#x20;

If you have any questions, issues, or would like to make a return of the Blurit CLI, please contact us at <support@blurit.io>. We hope this guide helps you effectively use the Blurit CLI to manage your media anonymization tasks.


# Monitoring With Flower

**Accessing the Flower Web Interface**

Once the installation of Blurit is complete, Flower's web interface is accessible at:

```arduino
http://<your-server-address>/flower
```

Use the **username** and **password** configured during the installation of Blurit to log in.

**Overview of the Interface**

The Flower interface provides an intuitive way to monitor and manage Celery tasks and workers in real-time. Below is a detailed breakdown of the key sections and columns in the interface.

## **Dashboard: Monitoring Workers Overview**

The **Dashboard** tab in Flower provides an overview of all Celery workers currently running. This page allows you to quickly monitor worker states and performance.

**Column Descriptions**

1. **Worker Name**
   * Displays the unique name of each worker. Typically, the name is prefixed with `celery@` followed by a unique identifier (often based on the hostname).
   * Example: `celery@18e5d5189283`.
2. **Status**
   * Indicates the current status of the worker.
   * **Online**: The worker is active and communicating with the broker.
   * **Offline**: The worker is not responding or has been stopped.
3. **Active**
   * The number of tasks currently being processed by this worker.
   * A high value here relative to the worker’s capacity could indicate overload.
4. **Processed**
   * The total number of tasks processed by the worker since it started.
5. **Failed**
   * The total number of tasks that have failed on this worker.
   * A high number may indicate recurring issues with specific tasks or code.
6. **Succeeded**
   * The total number of tasks successfully executed by the worker.
7. **Retried**
   * The number of tasks that were retried after encountering a temporary error.
8. **Load Average**
   * The system's average load (CPU, memory) for the container or machine running the worker.
   * Format: `1 min, 5 min, 15 min`.
   * Example: `0.19, 0.08, 0.08` indicates a low load across all three timeframes.

**Available Actions**

* **Search Bar**: Use the search bar in the top-right corner to filter workers by name or other attributes. This is helpful when managing many workers.
* **Refresh**: Click the **Refresh** button to update the data displayed on the dashboard.

<figure><img src="/files/k44bUJQI5XWAC0wZCwyy" alt=""><figcaption></figcaption></figure>

## **Tasks: Monitoring and Managing Individual Tasks**

The **Tasks** tab in Flower allows you to monitor the state and details of individual Celery tasks in real-time. This tab is especially useful for diagnosing specific issues or analyzing task performance.

**Column Descriptions**

1. **Name**
   * The name of the task, as defined in your Celery code.
   * Example: `blurit.image`.
   * This typically corresponds to a function or method in your application.
2. **UUID**
   * A unique identifier for each task, useful for debugging or referencing specific tasks.
   * Example: `c2e583bc-1dc9-4193-9df5-fe412aa0b180`.
3. **State**
   * The current state of the task.
   * Common states include:
     * **PENDING**: The task is waiting to be executed.
     * **STARTED**: The task is currently running.
     * **SUCCESS**: The task has completed successfully.
     * **FAILURE**: The task execution failed.
   * Example in the screenshot: **SUCCESS**.
4. **args**
   * The positional arguments passed to the task when it was executed.
   * Example: `()` (no positional arguments in this case).
5. **kwargs**
   * The keyword arguments (named parameters) passed to the task.
   * Example:

     ```json
     jsonCopier le code{
         "input_image": {"protocol": "file", "path": "input/1732010550292-480.jpg"},
         "output_image": {"protocol": "file", "path": "output/878ac326-2b6c-482e-9888-e4346d285ad0.jpg"},
         "lifespan": 3600
     }
     ```
6. **Result**
   * The result returned by the task after execution.
   * Example (summary):

     ```json
     jsonCopier le code{
         "input_image": {"protocol": "file", "path": "input/1732010550292-480.jpg"},
         "output_image": {"protocol": "file", "path": "output/878ac326-2b6c-482e-9888-e4346d285ad0.jpg"},
         "chronos": {"total": 2.219586, "childs": {...}}
     }
     ```
7. **Received**
   * The timestamp when the task was received by the worker.
   * Example: `2024-11-19 10:02:30.472`.
8. **Started**
   * The timestamp when the task started execution.
   * Example: `2024-11-19 10:02:30.478`.
9. **Runtime**
   * The total time the task took to execute, in seconds.
   * Example: `2.733`.
10. **Worker**
    * The Celery worker that executed the task.
    * Example: `celery@83b122840b58`.

<figure><img src="/files/49ljQW55RAL4qq2Ko6Gw" alt=""><figcaption></figcaption></figure>

## **Usage Tips**

1. **Search for Tasks**
   * Use the search bar to filter tasks by **UUID**, **Name**, or **State**. This is especially helpful when dealing with large numbers of tasks.
2. **Diagnose Failures**
   * For tasks in the **FAILURE** state, the `kwargs` and `Result` columns provide valuable details about what went wrong.
3. **Performance Optimization**
   * Use the `Runtime` column to identify tasks that take a long time to execute, which may need optimization.
4. **Input and Output Validation**
   * The `kwargs` and `Result` columns are also useful for verifying the input and output data of specific tasks.


# Release notes

## 2.2.0

### ✨ New Features & Improvements

* **Improved Detection**: Integration of a **new AI model** that significantly enhances the **accuracy and speed of face and license plate detection**. Reducing false positives.

## 2.1.0

### ✨ New Features & Improvements

* **Updated Torch-CUDA Version**: Upgraded `torch-cuda` to version **2.5.1+cu124** to ensure compatibility with the latest CUDA updates and improve performance.

## 2.0.9

**Permission Updates**: The following processes are now configured to use **UID 1200** and **GID 1200**:

* **Blur Worker**
* **Directory Worker**
* **Manager API**

### Technical Details

* These updates improve permission management and enhance security for service execution.
* **Why UID/GID 1200?** This choice ensures compatibility across different systems and avoids conflicts with system-reserved or commonly used IDs. It provides a dedicated user/group for these services, improving security and isolation.

## 2.0.8

### New Features & Improvements

* Added asynchronous CPU and GPU processing to improve performance.
* Introduced a new feature to clear the GPU cache for better resource management.

## 2.0.7

### ✨ New Feature: Intuitive Dashboard for Task & Consumption Tracking

We’ve added a **Dashboard** page to give you a clear overview of service usage and resource consumption.

#### 🔹 Key Features:

📊 **Service Usage** – Total API calls, daily & monthly breakdown\
📉 **Consumption Tracking** – Data usage (MB) per day & month\
📆 **Dynamic Charts** – Yearly & monthly trends for better insights

## 2.0.6

Starting from this version, custom port configuration has been removed. Applications are now accessible exclusively through the standard ports **80** (HTTP) and **443** (HTTPS). Use the dedicated paths `/api` and `/flower` to access the API and the Flower

## 2.0.2

### **New Features:**

* SSL configuration for cloud version

**Hotfixes:**

* **Web App:** Improved input validation to allow spaces in the input path.
* **BlurIt Model:** Resolved an issue with handling videos with low FPS.

## 2.0.1

### ✨ **New Features:**

* Added HTTP Basic Authentication for the web application, enhancing security.

## 2.0

### ✨ **New Features:**

* **High-Performance Algorithm** : This new algorithm delivers enhanced computing power and speed, resulting in better overall performance for your tasks.&#x20;
* **Lightweight Model :** In addition to the high-performance algorithm, we’ve introduced a smaller, more efficient model that uses **less GPU RAM**, making it ideal for environments with limited resources. Despite its compact size, it still provides robust results, ensuring you don't have to compromise on accuracy or efficiency.

## 1.1.0:

* CLI configuration all in one

## 1.0.0:

* installation script
* NEW CLI
* fix: not processing image or video with uppercase extension (e.g. image.PNG)


# Introduction

## AWS Quickstart

**BlurIt On-Premise Cloud Images** are an all-in-one solution designed to run BlurIt On-Premise on your favorite cloud providers. By leveraging our preconfigured cloud images available on the marketplaces, you can deploy the BlurIt On-Premise solution with complete autonomy.

**Important**: while you can autonomously create virtual servers with our images, you still need to contact us to obtain a valid license.&#x20;

## Supported providers

✅ [AWS](https://aws.amazon.com/marketplace/pp/prodview-khnd7pnhybcca?applicationId=AWS-Marketplace-Console\&ref_=beagle\&sr=0-5)

⏳ Azure (late October)

⏳ GCP (November)

## Supported servers

We highly recommend deploying BlurIt OP on virtual server with Nvidia GPU for better performance, although the software can be run on CPU only.

AMD GPU are not supported.

For a complete list of hardware requirements, please [see details here](/2.2.0/blurit-on-premise/requirements#hardware-requirements).


# AWS

This step-by-step guide will walk you through deploying a BlurIt OP instance using our preconfigured AMI on AWS.

## Step 1: Access the AWS Marketplace

1. Log in to your AWS account.
2. Go to the [AWS Marketplace](https://aws.amazon.com/marketplace).
3. In the search bar, type **BlurIt**.
4. Select the **BlurIt** image from the search results.

## Step 2: Launch the Instance

1. On the AMI BlurIt page, click **Continue to Subscribe**.
2. Review and accept the terms of use.
3. Click **Continue to Configuration**.
4. Choose the **AWS region** where you want to deploy the instance.
5. Under **Fulfillment Option**, select **AMI**.
6. Choose the recommended instance type (With Nvidia GPU).
7. Click **Continue to Launch**.

## Step 3: Configure Networking and Options

1. Select or create a **VPC** and a **Security Group** that allows SSH traffic and TCP ports 8080 to 8085 (these values may differ if you later don't use default values during the configuration process).
2. Launch the instance.

## Step 4: Connect to the Instance

1. Go to the **EC2 Console** to see your running instance.
2. Click on the instance to retrieve the public IP address or DNS name of the instance.
3. Use an SSH client to connect to the instance with the following command:

   ```bash
   ssh -i /path/to/your-key.pem ubuntu@your-instance-public-ip
   ```

## Step 5: Configure Blurit

1. Once connected, begin by configuring your BlurIt server and answering the prompts:

   ```bash
   blurit configure
   ```
2. Start your BlurIt server:

   ```bash
   blurit start
   ```
3. Activate your BlurIt server by adding your license:

   ```bash
   blurit license add <license>
   ```

Please consult [this page](/2.2.0/blurit-on-premise/installation/configuration) for full documentation.

## Step 6: Access the manager

Once connected, open your web browser and navigate to your instance's public IP address (or DNS name):

```
http://<your-instance-public-ip>:8084
```

## Step 7: Using the BlurIt API

The BlurIt API is available at the following endpoint on your instance:

```
http://<your-instance-public-ip>/api
```

Refer to the [API documentation](/2.2.0/blurit-on-premise/usage/api) for details on the available endpoints and how to integrate them into your workflows.


# Getting started

## Overview

The BlurIt On Premise version (aka BlurIt OP) provides a full offline and unlimited self hosted use of BlurIt by deploying the solution directly on your servers.

This guide will go through the installation process of a standard BlurIt OP setup. If you require custom settings related to the number of GPUs and/or the number of workers, please contact us at <contact@blurit.io>.

**If you want to install BlurIt OP on a cloud provider (AWS, Azure, GCP), please** [**follow instructions here**](/2.1.0/cloud-images/introduction)**.**

## Before you start

Before you start, be sure you have received from Wassa the BlurIt OP archive that contains the installation files.

BlurIt OPs runs in a dockerized environment on Linux or Windows, hence the installation of BlurIt OP requires basic knowledge of Linux/Windows and Docker usage.

If you need any help installing BlurIt OP, please contact us at <contact@blurit.io>.


# Requirements

## Hardware requirements

* CPU recommended: 3-4 threads as the base and 1-2 cores per worker on each machine.
* GPU Nvidia (consumer and professional) [computer capability](https://developer.nvidia.com/cuda-gpus) >= sm\_37 for optimal performance
* RAM GPU 4-6 GB for 1 worker depending of the resolution
* RAM > 16 GB
* 60 Go + local storage

## Software dependencies

* Linux Ubuntu >= 20.04 / CentOS >= 8 / Amazon Linux 2 Deep Learning AMI GPU&#x20;
* Windows 10 Pro, 11 Pro and server 2022 with Windows Subsystem for Linux (WSL)
* Install the following dependencies either using the provided script ([Linux](/2.1.0/blurit-on-premise/installation/linux-dependencies) only) or manually ([Linux](/2.1.0/blurit-on-premise/installation/linux-dependencies) or [Windows](/2.1.0/blurit-on-premise/installation/windows-dependencies-wsl)):
  * [nvidia drivers](https://www.nvidia.com/download/index.aspx) recommended >= 470
  * [docker ce](https://docs.docker.com/engine/install/) and [post install linux](https://.docker.com/engine/install/linux-postinstall/)
  * [docker desktop](https://docs.docker.com/desktop/install/windows-install/) for Windows WSL
  * docker-compose <= 1.29
  * [nvidia-docker2](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html#setting-up-nvidia-container-toolkit) (set as default docker runtime)

## Blurit archive

* blurit\_stack.yml
* .env
* Blurit-op.postman\_collection.json
* README.md
* licence.txt
* login-registry.txt
* install\_dependencies.sh

###


# Installation

{% content-ref url="/pages/XGRsi3LnCyZ37pzzDvji" %}
[Linux dependencies](/2.1.0/blurit-on-premise/installation/linux-dependencies)
{% endcontent-ref %}

{% content-ref url="/pages/u0NzVXfbZPsHjuBnJzJp" %}
[Windows dependencies (WSL)](/2.1.0/blurit-on-premise/installation/windows-dependencies-wsl)
{% endcontent-ref %}

{% content-ref url="/pages/33MB6VJhfv9yRtJwhgQf" %}
[Configuration](/2.1.0/blurit-on-premise/installation/configuration)
{% endcontent-ref %}

{% content-ref url="/pages/usinf50sM4HYGmrXTSW3" %}
[Run BlurIt OP](/2.1.0/blurit-on-premise/installation/run-blurit-op)
{% endcontent-ref %}

{% content-ref url="/pages/QyDYTQ2GDnrCXKq64Mpq" %}
[Multi-servers installation](/2.1.0/blurit-on-premise/installation/multi-servers-installation)
{% endcontent-ref %}

{% content-ref url="/pages/1j3QnV6qSF26ovSTpiXI" %}
[Post installation verifications](/2.1.0/blurit-on-premise/installation/post-installation-verifications)
{% endcontent-ref %}


# Linux dependencies

*Note: Don't follow this step if you plan to run BlurIt OP on Windows.* [*Go there*](/2.1.0/blurit-on-premise/installation/windows-dependencies-wsl) *instead.*

## Choice 1 : use our dependencies installation script (recommended)

#### Prerequisites Before Installation

Before starting the installation, ensure you have received the archive containing all necessary documents. This archive will be shared via a secured link protected by a password.

**Contents of the Archive**

**Main Archive**: `client_name_YYYYMMDD.tar.gz`

The archive will include the following files:

1. **License File**: `license_client_name_YYYYMMDD_YYYYMMDD`
   * The license file specifies the validity period (start and end dates).
2. **Registry Login**: `login_registry.txt`
   * Contains the credentials to access the registry.
3. **Installation Script**: `linux_installation_script`
   * A script compatible only with Linux systems.
4. **Custom Configuration File** (if applicable): `blurit_stack.yml`

This script will install the software requirements to run BlurIt On-Premise on your server. It will install Nvidia drivers, Docker CE, and Nvidia-docker on Ubuntu, Debian, and RHEL/CentOS. If you are installing BlurIt on an old server and want to maintain specific version dependencies, we don't recommend to use this script but rather to [manually install everything](#manual-dependencies-installation).

To begin, extract the BlurIt OP archive using the following command:

{% code lineNumbers="true" %}

```bash
tar -xzf filename.tar.gz
cd blurit-op
```

{% endcode %}

Replace "filename" with the actual name of the archive that was provided to you.

To start the script, execute the following command:

{% code lineNumbers="true" %}

```sh
sudo ./install_dependencies.sh
```

{% endcode %}

:rotating\_light: After execution of the script, please reboot the server to load the Nvidia drivers and go to the [Configuration](/2.1.0/blurit-on-premise/installation/configuration) page. :rotating\_light:

## Choice 2 : manual dependencies installation

### Nvidia drivers Installation

1. Download the NVIDIA driver >= 470 runfile from: <https://www.nvidia.com/Download/index.aspx?lang=en-us>
2. Open a terminal and navigate to the directory where the downloaded runfile is located.
3. `$ chmod +x <filename>.run` \
   Replace `<filename>` with the actual name of the downloaded runfile.
4. `$ sudo ./<filename>.run`&#x20;
5. `$ sudo reboot`&#x20;

### Docker Installation

The Docker installation documentation is [here](https://docs.docker.com/engine/install/).

{% tabs %}
{% tab title="Ubuntu" %}
{% code lineNumbers="true" fullWidth="false" %}

```bash
sudo apt-get update
sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
sudo install -m 0755 -d /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
sudo chmod a+r /etc/apt/keyrings/docker.gpg
echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin
```

{% endcode %}
{% endtab %}

{% tab title="Debian" %}
{% code lineNumbers="true" %}

```bash
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg
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
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

sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin
```

{% endcode %}
{% endtab %}

{% tab title="Centos" %}
{% code lineNumbers="true" %}

```bash
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl start docker
```

{% endcode %}
{% endtab %}

{% tab title="RHEL" %}
{% code lineNumbers="true" %}

```bash
sudo yum install -y yum-utils
sudo yum-config-manager --add-repo https://download.docker.com/linux/rhel/docker-ce.repo
sudo yum install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
sudo systemctl start docker
```

{% endcode %}
{% endtab %}
{% endtabs %}

#### Post-install docker linux (required):&#x20;

{% code lineNumbers="true" %}

```bash
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
```

{% endcode %}

### Nvidia-docker installation

Nvidia-docker installation documentation is [here](https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html).

{% tabs %}
{% tab title="Ubuntu / Debian" %}
{% code lineNumbers="true" %}

```bash
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/stable/deb/nvidia-container-toolkit.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
```

{% endcode %}
{% endtab %}

{% tab title="Centos / RHEL" %}
{% code lineNumbers="true" %}

```bash
curl -s -L https://nvidia.github.io/libnvidia-container/stable/rpm/nvidia-container-toolkit.repo | \
  sudo tee /etc/yum.repos.d/nvidia-container-toolkit.repo

sudo yum clean expire-cache
sudo yum install -y nvidia-container-toolkit
```

{% endcode %}
{% endtab %}
{% endtabs %}

Configure the Docker daemon to recognize the NVIDIA Container Runtime:

{% code lineNumbers="true" %}

```bash
sudo nvidia-ctk runtime configure --runtime=docker
```

{% endcode %}

Restart the Docker daemon to complete the installation after setting the default runtime:

{% code lineNumbers="true" %}

```bash
sudo systemctl restart docker
```

{% endcode %}

Test if Nvidia-docker is installed:

{% code lineNumbers="true" %}

```bash
sudo docker run --rm --runtime=nvidia --gpus all nvidia/cuda:11.6.2-base-ubuntu20.04 nvidia-smi
```

{% endcode %}

This should result in a console output shown below:

```
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 470.51.06    Driver Version: 470.51.06    CUDA Version: 11.0     |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|                               |                      |               MIG M. |
|===============================+======================+======================|
|   0  Tesla T4            On   | 00000000:00:1E.0 Off |                    0 |
| N/A   34C    P8     9W /  70W |      0MiB / 15109MiB |      0%      Default |
|                               |                      |                  N/A |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                                  |
|  GPU   GI   CI        PID   Type   Process name                  GPU Memory |
|        ID   ID                                                   Usage      |
|=============================================================================|
|  No running processes found                                                 |
+-----------------------------------------------------------------------------+
```

### Configuring daemon.json

Open `/etc/docker/daemon.json` with your favorite text editor.

Add `"default-runtime": "nvidia",`  to the json. Exemple:

{% code title="/etc/docker/daemon.json" lineNumbers="true" %}

```json
{
  "default-runtime": "nvidia",
  "runtimes": {
    "nvidia": {
      "args": [],
      "path": "nvidia-container-runtime
    }
  }
}
```

{% endcode %}

### Blurit CLI Installation

The **Blurit CLI** enables you to easily **configure**, **start**, and **interact** with Blurit. It provides a command-line interface to manage features and streamline platform usage.

Start these commands from WSL:

```bash
wget https://cloud.wassa.io/s/Kuj5MDgqkMCdjRv/download --output-document=blurit
chmod +x blurit
sudo mv blurit /usr/bin
```


# Windows dependencies (WSL)

*Don't follow this step if you plan to run BlurIt OP on Linux.* [*Go there*](/2.1.0/blurit-on-premise/installation/linux-dependencies) *instead.*

#### Prerequisites Before Installation

Before starting the installation, ensure you have received the archive containing all necessary documents. This archive will be shared via a secured link protected by a password.

**Contents of the Archive**

**Main Archive**: `client_name_YYYYMMDD.tar.gz`

The archive will include the following files:

1. **License File**: `license_client_name_YYYYMMDD_YYYYMMDD`
   * The license file specifies the validity period (start and end dates).
2. **Registry Login**: `login_registry.txt`
   * Contains the credentials to access the registry.
3. **Custom Configuration File** (if applicable): `blurit_stack.yml`

## Nvidia Driver installation

Download the NVIDIA driver >= 470 exe from: <https://www.nvidia.com/Download/index.aspx?lang=en-us>

You can also update the drivers using [Nvidia Geforce Experience](https://www.nvidia.com/fr-fr/geforce/geforce-experience/).

## Install WSL 2 (Windows Subsystem Linux)

To Check if WSL is installed, open PowerShell as administrator and run:

{% code lineNumbers="true" %}

```powershell
wsl -l –v
```

{% endcode %}

If WSL is not installed:

{% code lineNumbers="true" %}

```
wsl --install -d Ubuntu
```

{% endcode %}

Then reboot your machine.

It is possible to modify the resources allocated to WSL. For more information, you can refer to this link: <https://learn.microsoft.com/fr-fr/windows/wsl/wsl-config#wslconfig>.

## Docker installation

Instruction to install docker CE on windows with WSL 2 backend : <https://docs.docker.com/desktop/install/windows-install/>.

During the install don't forget to tick the Use **WSL 2 instead of Hyper-V** checkbox.

Additionally, if you want the BlurIt app to restart automatically when the machine restarts, check the box labeled 'Start Docker Desktop when you sign, in.'

<figure><img src="/files/JiXQpTr8CT9Rku5A0NcL" alt=""><figcaption></figcaption></figure>

## Nvidia-docker installation

To enter WSL, open PowerShell and type `wsl` followed by pressing Enter.

{% code lineNumbers="true" %}

```bash
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/stable/deb/nvidia-container-toolkit.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
```

{% endcode %}

Verify that Nvidia-Docker is installed:

{% code lineNumbers="true" %}

```bash
sudo docker run --rm --gpus all nvidia/cuda:11.6.2-base-ubuntu20.04 nvidia-smi -a
```

{% endcode %}

### Configuring Docker daemon

Append the following JSON content on the Docker Desktop config like this:

{% code lineNumbers="true" %}

```json
{
	... # current content
	"runtimes": {
		"nvidia": {
			"path": "/usr/bin/nvidia-container-runtime",
			"runtimeArgs": []
		}
	},
	"default-runtime": "nvidia"
}
```

{% endcode %}

<figure><img src="/files/aqY0dxHLB1qmTPwT1tUn" alt=""><figcaption></figcaption></figure>

Restart Docker for the change to take effect.

### Post-install docker linux on WSL (required):&#x20;

{% code lineNumbers="true" %}

```bash
sudo groupadd docker
sudo usermod -aG docker $USER
newgrp docker
```

{% endcode %}

### Blurit CLI Installation

The **Blurit CLI** enables you to easily **configure**, **start**, and **interact** with Blurit. It provides a command-line interface to manage features and streamline platform usage.

Start these commands from WSL:

```bash
wget https://cloud.wassa.io/s/Kuj5MDgqkMCdjRv/download --output-document=blurit
chmod +x blurit
sudo mv blurit /usr/bin
```


# Configuration

## Blurit CLI

The Blurit CLI is installed during the [Linux](/2.1.0/blurit-on-premise/installation/linux-dependencies) or [Windows](/2.1.0/blurit-on-premise/installation/windows-dependencies-wsl) dependencies installation process. This command will prompt you with several questions to assist in setting up your Blurit installation. If Blurit team send you a compose file, it's possible to pass it as argument.

```bash
blurit configure
```

For custom installations, if a `blurit_stack.yml` file is provided, include it as an argument when executing the relevant commands :<br>

```bash
blurit configure blurit_stack.yml
```

## Configuration explanation

The following section provides an explanation of the various questions asked during the configuration process.

### Model

During the configuration process, you'll be prompted to select the AI model version that best fits your performance and precision needs. BlurIt offers two options:

* **tiny**: This model is optimized for speed, processing images and videos faster. It is ideal for scenarios where performance is critical, although it comes with a very slight reduction in precision. This is the default option.
* **standard**: This version provides a balance between speed and precision. While still optimized for fast processing, it offers slightly higher accuracy compared to the tiny model, making it suitable for tasks where precision is more important.

### Web App Authentication

To secure access to the BlurIt web app, you’ll need to set up a username and password during the configuration process. This protects the web interface and ensures that only authorized users can manage files and access data.

1. **Username**: Create a unique username for accessing the web app.
2. **Password**: Set a strong password for added security. Store it securely for future access.

Alternatively, you may choose not to set a username and password for quicker access. However, please note that **disabling authentication** means the web app will be openly accessible, which may expose your data to unauthorized access. This choice comes with the user’s full responsibility for securing access to the application.

### **SSL Configuration**&#x20;

For enhanced security, you can enable SSL to encrypt communication between clients and the server. During the configuration process, you will be prompted to provide the following:

1. **Server Name**: Specify the domain name or IP address used to access your BlurIt web app.
2. **Path to SSL Certificate File (.pem)**: Provide the full path to your SSL certificate file. This file contains the public key and is required for establishing secure HTTPS connections.
3. **Path to SSL Private Key File (.pem)**: Provide the full path to your private key file. This file must correspond to the SSL certificate provided.

If you do not have an SSL certificate, you can use services like [Let's Encrypt](https://letsencrypt.org/) to generate one for free or use self-signed certificates for internal testing.

By enabling SSL and authentication, you ensure that your data and web app are protected against unauthorized access and interception.

### Local storage

These settings define the base directories where BlurIt OP will locate input files (to be processed) and where it will store the output files (blurred videos/images and detection JSONs) on the local server storage, i.e., on the server where BlurIt OP is running.

#### Accessing Windows Drives on WSL

If you are using Windows Subsystem for Linux (WSL), your Windows drives are accessible under the `/mnt/` directory. Each drive is mapped to its respective folder:

* **Drive C:** Located at `/mnt/c/`
* **Drive D:** Located at `/mnt/d/`, and so on.

For example, if you need to access a file located at `C:\Users\YourName\Documents`, you can find it in WSL at:

```bash
/mnt/c/Users/YourName/Documents
```

This mapping makes it easy to navigate between your Windows environment and the Linux subsystem.

The input and output directories will be assigned to the user with ID 1200.

**Why UID/GID 1200?**&#x20;

This choice ensures compatibility across different systems and avoids conflicts with system-reserved or commonly used IDs. It provides a dedicated user/group for these services, improving security and isolation.

### S3 storage

These settings allow the use of S3 storage for the input and output directories for media.

### GPU settings

Select the GPU you wish to use with Blurit.

### Max Threads number

This variable represents the maximum number of threads that the reencoding step will utilize on your CPU. Increasing this value can result in faster reencoding.&#x20;

However, it's important to note that you should reserve some threads for other processes.

Avoid using the maximum number of available threads on your server, as it may impact the performance of other applications.

#### Webhook (optional)

This setting is a configuration that defines a route or URL where a POST request can be sent. This endpoint is typically used to send JSON data to another system or service.

In this specific example, when the POST request is made to the "CUSTOM\_WEBHOOK\_ENDPOINT" route, the JSON payload being sent is as follows:

```json
{
  "status": "Succeeded",
  "task_id": "abc-123-456-789"
}
```

The JSON payload contains two key-value pairs:

* "status" with a value of "Succeeded"
* "task\_id" with a value of "abc-123-456-789"

The purpose of this webhook is to notify or provide information to the system or service listening at the specified endpoint about the status of a task or operation. The receiving system can then process this data according to its requirements.

### Jobs timeouts

This parameter represents the amount of time the application waits before changing the status of a task to "failed." By default, it is set to 43200000 milliseconds (equivalent to 12 hours).




---

[Next Page](/llms-full.txt/1)

