# Docker installation and maintenance

## System requirements

<span class="text-big">The docker runs on Linux Ubuntu 22.04 or later. </span>

## Installing docker software on the server

<span class="text-big">**UBUNTU Server**</span>

**Copy and paste the following lines to the server terminal window, then execute them**

```php
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin
```

<span class="text-big">**Red Hat Linux**</span>

**copy and paste the following lines to the server terminal window, then execute them**

```php
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-compose-plugin
sudo systemctl enable docker.service
sudo systemctl start docker.service
```

## Installing Emotion Logic docker

<span class="text-big">**copy and paste the following lines to the server terminal window, then execute them**</span>

```php
docker run -d --restart unless-stopped -p 80:8080 -p 2259:2259 --name nms-server nemesysco/on_premises
```

<span class="text-big">The docker will listen on port 80 for offline file analysis, and on port 2259 for real-time analysis</span>

![](https://nms-documentation-images.s3.amazonaws.com/1a475c51-2109-47c2-b16b-c140fb9f21b3.png)

## Activating the docker

<span class="text-big">Activating the docker is done by setting the API Key and API Key Password. Both are generated on the applications page</span>

1. <span class="text-big">Open the docker dashboard: http://\[docker-ip\]/</span>
2. <span class="text-big"> On the docker dashboard set the API key and password and click “Activate”. This will</span>  
    <span class="text-big">connect the docker to your account on the platform and get the license.</span>
3. <span class="text-big">The docker will renew its license on a daily basis. Please make sure it has internal</span>  
    <span class="text-big">access.</span>
4. <span class="text-big">Now you can start sending audio for analysis</span>


## Updating docker version

<span class="text-big">The docker periodically checks for new versions and will perform an automatic upgrade for mandatory versions.</span>

You can manually check for mandatory and recommended updates by clicking the "Check Updates" button.

## Docker Management

# Docker installation and maintenance

## System requirements

<span class="text-big">The docker runs on Linux Ubuntu 22.04 or later. </span>

## Installing docker software on the server

<span class="text-big">**UBUNTU Server**</span>

**Copy and paste the following lines to the server terminal window, then execute them**

```php
sudo apt-get update
sudo apt-get install ca-certificates curl gnupg lsb-release
sudo mkdir -p /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin

```

<span class="text-big">**Red Hat Linux**</span>

**copy and paste the following lines to the server terminal window, then execute them**

```php
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-compose-plugin
sudo systemctl enable docker.service
sudo systemctl start docker.service
```

## Installing Emotion Logic docker

<span class="text-big">**copy and paste the following lines to the server terminal window, then execute them**</span>

```php
docker run -d --restart unless-stopped -p 80:8080 -p 2259:2259 --name nms-server nemesysco/on_premises
```

<span class="text-big">The docker will listen on port 80 for offline file analysis, and on port 2259 for real-time analysis</span>

![](https://nms-documentation-images.s3.amazonaws.com/1a475c51-2109-47c2-b16b-c140fb9f21b3.png)

## Activating the docker

<span class="text-big">Activating the docker is done by setting the API Key and API Key Password. Both are generated on the applications page</span>

1. <span class="text-big">Open the docker dashboard: http://\[docker-ip\]/</span>
2. <span class="text-big"> On the docker dashboard set the API key and password and click “Activate”. This will</span>  
    <span class="text-big">connect the docker to your account on the platform and get the license.</span>
3. <span class="text-big">The docker will renew its license on a daily basis. Please make sure it has internal</span>  
    <span class="text-big">access.</span>
4. <span class="text-big">Now you can start sending audio for analysis</span>


## Updating docker version

<span class="text-big">The docker periodically checks for new versions and will perform an automatic upgrade for mandatory versions.</span>

You can manually check for mandatory and recommended updates by clicking the "Check Updates" button.

![](https://nms-documentation-images.s3.amazonaws.com/1a475c51-2109-47c2-b16b-c140fb9f21b3.png)

Docker conducts regular checks for new versions and will automatically upgrade when mandatory versions are available. However, it does not initiate automatic upgrades for non-mandatory versions. You have the option to manually check for mandatory and recommended updates by clicking the 'Check Updates' button

### Removing EMLO docker image

Sometimes it is required to completely remove EMLO docker. In order to do that, it is required to first delete the container, then the image

**remove the container**

1\. list all containers

```javascript
sudo docker container ls
```

  
2\. stop the container

```javascript
sudo docker stop [CONTAINER_ID]
```

  
3\. delete the container

```javascript
sudo docker rm [CONTAINER_ID]
```

**remove the image**

1\. list the images

```javascript
sudo docker image ls
```

  
2\. delete the docker

```javascript
sudo docker image rm  [IMAGE_ID]
```

**Remove All**

Stop all containers on the server, than delete all containers and images

```javascript
docker stop $(docker ps -q) && docker rm -f $(docker ps -aq) && docker rmi -f $(docker images -q)
```

Stop/Start EMLO docker image  
Sometimes it is required to stop or restart EMLO docker. In order to do that, it is required to stop the container

**Stop the container**

1\. list all containers

```javascript
sudo docker container ls
```

2\. stop the container

```javascript
sudo docker stop [CONTAINER_ID]
```

**Start the container**

1\. list all containers

```javascript
sudo docker container ls
```

2\. start the container

```javascript
sudo docker start [CONTAINER_ID]
```

# Emotion Logic analysis docker version history

<table border="1" id="bkmrk-version-release-date"><colgroup><col></col><col></col><col></col><col></col></colgroup><tbody><tr><td>**Version**</td><td>**Release date**</td><td>**Mandatory for**</td><td>**Whats new?**</td></tr><tr><td><div><div><div><div><div><div>1.6.38</div></div></div></div></div></div></td><td>2024-08-15

</td><td>Not Mandatory

</td><td>- Allows max audio file of 600MB

</td></tr><tr><td><div><div><div><div><div><div>1.6.37</div></div></div></div></div></div></td><td>2024-07-22

</td><td>Not Mandatory

</td><td>- Added Speechmatics integration support

</td></tr><tr><td><div><div><div><div><div><div>1.6.36</div></div></div></div></div></div></td><td>2024-06-11

</td><td>Not Mandatory

</td><td>- Added licence renew logs
- Handle crush when invalid audio file sent for analysis

</td></tr><tr><td><div><div><div><div><div><div>1.6.18</div></div></div></div></div></div></td><td>2024-03-18

</td><td>Not Madatory

</td><td>- Objective Risk Formula Optimization:
- Fine-tuned Objective (OZ) risk formulas to better account for inaccuracy indicators, improving the nuance in risk assessments.
- Modest recalibration of risk scores to flag a broader range of risk indicators and inaccuracies.
- Option to revert to the previous version's risk evaluation by setting sensitivity: bwc1 for backward compatibility.

- Introduction of Final Risk Score:
- Added a new "Final Risk" score to risk summaries, merging objective and subjective evaluations for a comprehensive risk overview.
- Final Risk score adjusts to reflect either singular or combined risk assessments, with updated calculation methods in Topics and Questions for improved accuracy.

- Personality Assessment Enhancement:
- Questionnaire API now allows for personality assessments at the question level, with isPersonality: true for personality evaluation and isPersonality: false for risk assessment.
- Questions with non-zero weight contribute to both personality and risk assessments; set weight: 0 to exclude a question from risk evaluation.

- Important Update Regarding isPersonality Setting:
- isPersonality defaults to True in this release for smooth transition and backward compatibility, with a note that this default behavior will change in the future.
- Users are urged to review and adjust questionnaire settings for accurate core competencies values analysis, considering only questions marked with isPersonality: true.

- Bug Fixes:
- Corrected an issue affecting real-time values on Emotion Diamond for channel 1, ensuring accurate representation of emotional insights.


</td></tr><tr><td><div><div><div><div><div><div>1.6.14</div></div></div></div></div></div></td><td>2024-01-16

</td><td>Not Madatory

</td><td>- Fix bug when calculationg emotional styles

</td></tr><tr><td><div><div><div><div><div><div>1.6.11</div></div></div></div></div></div></td><td>2024-01-01

</td><td>Not Madatory

</td><td>- Fix bug when docker build segments from STT service

</td></tr><tr><td><div><div><div><div><div><div>1.6.10</div></div></div></div></div></div></td><td>2023-12-31

</td><td>Not Madatory

</td><td>- Improved call-classification tags

</td></tr><tr><td><div><div><div><div><div><div>1.6.03</div></div></div></div></div></div></td><td>2023-12-13

</td><td>Not Madatory

</td><td>- Fix an "ENOENT: no such file or directory" error messag when sending large batch audio
- Set defaiult max file to 300mb

</td></tr><tr><td><div><div><div><div><div><div>1.6.01</div></div></div></div></div></div></td><td>2023-12-08

</td><td>Not Madatory

</td><td>- Added DistressPriority for call call priority field. Modification for FeelGPT standard output

</td></tr><tr><td><div><div><div><div><div><div>1.5.14</div></div></div></div></div></div></td><td>2023-12-06

</td><td>Not Madatory

</td><td>- Fix problem when analysis streaming

</td></tr><tr><td><div><div><div><div><div><div>1.5.7</div></div></div></div></div></div></td><td>2023-11-14

</td><td>Not Madatory

</td><td>- Fine-tune "Confidance"
- Fix a bug with "dummyResponse" when max daily analyzes count exceeded
- Improve the background-noise, too-high-volume, too-low-volume recognision mechanism

</td></tr><tr><td><div><div><div><div><div><div>1.5.4</div></div></div></div></div></div></td><td>2023-11-07

</td><td>Not Madatory

</td><td>- Added noise-clean service on cloud

</td></tr><tr><td><div><div><div><div><div><div>1.5.3</div></div></div></div></div></div></td><td>2023-11-02

</td><td>Not Madatory

</td><td>- FeelGPT fine tuning
- Mental effort Efficiency bug fix
- Emotional Diamond fine tuning
- Emotional Copgnitive Ration highest value is now 500 (was 5000 before)
- Dissatisfaction fine tune
- Fine tume objective risk formula (riskOZ)
- The Risk assessment formulas were updated to take into account extreme emotional distress situations
- Fix bug where log files older than 14 days were not deleted

</td></tr><tr><td><div><div><div><div><div><div>1.5.01</div></div></div></div></div></div></td><td>2023-10-26

</td><td>Not Mandatory

</td><td>- Emotional player values are per-channel now
- Allow to bo back-and-forward with the analysis library
- Fix bug to auto-delete log files after 14 days

</td></tr><tr><td><div><div><div><div><div><div>1.4.25</div></div></div></div></div></div></td><td>2023-10-17

</td><td>Not Mandatory

</td><td>- Added "sensitivity" param to the API (see documentation)
- Better handleing of the Emotional Diamond
- Remove from FeelGPT the "tired" param, and added "agitate" and "frantic"
- Allow upgrade process for dockers that ware manually acivated

</td></tr><tr><td><div><div><div><div><div><div>1.4.22</div></div></div></div></div></div></td><td>2023-09-15

</td><td>Not Mandatory

</td><td>- Improved error messages
- Improved FellGPT protocol

</td></tr><tr><td><div><div><div><div><div><div>1.4.17</div></div></div></div></div></div></td><td>2023-09-04

</td><td>Not Mandatory

</td><td>- Analyze questionnaires even when some of the audio file are corrupted
- Fix bug on sample rates 44000 and 44100
- Allow speach-to-text integration with DeepGram (bring your own API Key)

</td></tr><tr><td><div><div><div><div><div><div>1.4.12</div></div></div></div></div></div></td><td>2023-08-14

</td><td>Not Mandatory

</td><td>- Improved handling of final segment in a stream
- Fix bug with backgroundNoise &lt; 1000 on sreaming service
- Improvemets on feelGPT
- Add onlineLVS analysis on CCC plug

</td></tr><tr><td><div><div><div><div><div><div>1.4.06</div></div></div></div></div></div></td><td>2023-08-01

</td><td>1.3.92 and up

</td><td>- Improve handling segments provided by the client or STT service
- Improve license-renew after the docker was down for a long period

</td></tr><tr><td><div><div><div><div><div><div>1.4.01</div></div></div></div></div></div></td><td>2023-07-26

</td><td></td><td>- Improve segmentation

</td></tr><tr><td><div><div><div><div><div><div>1.3.92</div></div></div></div></div></div></td><td>2023-07-05

</td><td>Not Mandatory

</td><td>- Fix bug with 2 channels streaming results
- Added 16000 sample rate on streaming

</td></tr><tr><td><div><div><div><div><div><div>1.3.87</div></div></div></div></div></div></td><td>2023-06-07

</td><td>Not Mandatory</td><td>- Not rejecting audio files with too-high volume.

</td></tr><tr><td><div><div><div><div><div><div>1.3.85</div></div></div></div></div></div></td><td>2023-06-05

</td><td>Not Mandatory</td><td>- Fix bug with "dummyResponse" flag

</td></tr><tr><td><div><div><div><div><div><div>1.3.83</div></div></div></div></div></div></td><td>2023-05-31

</td><td>Not Mandatory</td><td>- Improved analysis algorithm for Agent Priority
- Improved analysis algorithm for Call Priority
- Improved analysis algorithm for Human Resource
- Improved docker logs

</td></tr><tr><td><div><div><div><div><div><div>1.3.81</div></div></div></div></div></div></td><td>2023-05-22

</td><td>Not mandatory</td><td>- Improved auto-background level calculation

</td></tr><tr><td><div><div><div><div>1.3.80</div></div></div></div></td><td>2023-05-08

</td><td>Not mandatory</td><td>- Fix misspellings in the response
- Added "requesteId" parameter

</td></tr><tr><td><div><div><div><div>1.3.77</div></div></div></div></td><td>2023-04-27</td><td>Not mandatory</td><td>- Added warning on "analyzeTest" route when one or more of the questions failed to be analyzed
- Add 44100 Hz support

</td></tr><tr><td><div><div><div><div>1.3.75</div></div></div></div></td><td>2023-04-18</td><td>Not mandatory</td><td>- Fix a crash when passing audio with a very high volume for analysis

</td></tr><tr><td><div><div>1.3.73</div></div></td><td>2023-04-17</td><td>Not mandatory</td><td>- Added "mentalEfficiency" analysis on the channel-profile report
- Offline LVA analysis fixes

</td></tr></tbody></table>