---
# System prepended metadata

title: 'Install LEAI DAU Side:'

---

# Install LEAI DAU Side:

## Prerequisite
* **Enterprise bot with user_id,password and token.** 
	- @companyadmin:lalepass.lale.im 
* **AF db access (db server ip, db user, db password, db name)**
* **open port 5000 (at least for intranet)**

## 1. Install anaconda 
* Download and install anaconda (python env manager)
```
Mkdir anaconda-master
Cd anaconda-master
Curl -O https://repo.anaconda.com/archive/Anaconda3-2021.05-Linux-x86_64.sh
Bash Anaconda3-2021.05-Linux-x86_64.sh
```

* *Download and install anaconda (WINDOWS)*

download: `https://repo.anaconda.com/archive/Anaconda3-2021.05-Windows-x86_64.exe`

After finish, restart cmd.

* activate conda
```
Source ~/.bashrc
Conda info
```

## 2. Create python env for LEIA DAU 

* Go to directory where LEIA-DAU wants to be installed
```
Mkdir leia-dau-5000
cd leia-dau-5000
```
* create conda virtual env
```
conda create --name leia-dau python=3.8
```

## 3. Upload LEIA-DAU side to the server 
- **Upload LEIA-DAU to the enterprise machine**
- Activate virtual env. 
```
Activate conda: conda activate leia-dau
```
- Install requirements
```
Pip install -r requirements.txt
```
- Edit the config file (`site_config.py`)
You may need: 
    - database information (SQL server)
    - Bot ID credentials

## 4 . Run LEIA-DAU 

- Install screen : 
```
sudo yum -y install screen
or 
sudo apt install screen 
```
- Create screen : 
```
screen -S leia-dau-screen
```
- Activate conda env in screen: 
```
conda activate leia-dau
```

- Run : 
```
python startup.py
```
- Exit screen : 
```
ctrl + A + D 
```

- To attach screen (Optional): 
```
screen -r leia-dau-screen
```
* Done 