<commit_before># AlarmDecoder Webapp Dockerfile

## Summary
This is an official Dockerfile for setting up the AlarmDecoder Webapp on your own Raspberry Pi

## Instructions

### Flash Raspbian to your SD Card (Jessie recommended)

### Boot your Raspberry Pi

### Disable Serial Console: 

<p>sudo systemctl disable serial-getty@ttyAMA0.service</p>

### Enable uart: 

<p>add "enable_uart=1" to /boot/config.txt</p>

### Disable serial console from boot:  

<p>sudo sed -i 's/console=serial0,115200/ /g' /boot/cmdline.txt</p>

<p>sudo sed -i 's/kgdboc=ttyAMA0,115200/ /g' /boot/cmdline.txt

<p>sudo apt-get update</p>

<p>sudo apt-get install rpi-update</p>

<p>sudo rpi-update</p>

<p>sudo echo "alarmdecoder" > /etc/hostname</p>

<p>sudo reboot</p>

### Install Docker as per Docker Instructions:

<p>sudo apt-get update</p>

<p>sudo apt-get install apt-transport-https ca-certificates</p>

<p>sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys <KEY></p>

<p>sudo echo "dep https://apt.dockerproject.org/repo raspbian-jessie main" > /etc/apt/sources.list.d/docker.list</p>

<p>sudo apt-get update</p>

<p>sudo apt-get install docker-engine</p>

<p>sudo systemctl enable docker.service</p>

<p>sudo service docker start</p>

<p>sudo groupadd docker</p>

<p>sudo gpasswd -a ${USER} docker</p>

<p>sudo service docker restart</p>

### Build docker container: 

<p>docker build -t alarmdecoder alarmdecoder</p>

### Run your container: 

<p>docker run --restart unless-stopped --net="host" --privileged -d -ti -e "container=docker" -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 80:80 -p 443:443 -p 5000:5000 -p 10000:10000 --device=/dev/ttyAMA0 alarmdecoder /sbin/init</p>
<commit_msg>Update to ttyS0 instead of AMA0 as device passing in for newer releases<commit_after># AlarmDecoder Webapp Dockerfile

## Summary
This is an official Dockerfile for setting up the AlarmDecoder Webapp on your own Raspberry Pi

## Instructions

### Flash Raspbian to your SD Card (Jessie recommended)

### Boot your Raspberry Pi

### Disable Serial Console: 

<p>sudo systemctl disable <EMAIL></p>

### Enable uart: 

<p>add "enable_uart=1" to /boot/config.txt</p>

### Disable serial console from boot:  

<p>sudo sed -i 's/console=serial0,115200/ /g' /boot/cmdline.txt</p>

<p>sudo sed -i 's/kgdboc=ttyAMA0,115200/ /g' /boot/cmdline.txt

<p>sudo apt-get update</p>

<p>sudo apt-get install rpi-update</p>

<p>sudo rpi-update</p>

<p>sudo echo "alarmdecoder" > /etc/hostname</p>

<p>sudo reboot</p>

### Install Docker as per Docker Instructions:

<p>sudo apt-get update</p>

<p>sudo apt-get install apt-transport-https ca-certificates</p>

<p>sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys <KEY></p>

<p>sudo echo "dep https://apt.dockerproject.org/repo raspbian-jessie main" > /etc/apt/sources.list.d/docker.list</p>

<p>sudo apt-get update</p>

<p>sudo apt-get install docker-engine</p>

<p>sudo systemctl enable docker.service</p>

<p>sudo service docker start</p>

<p>sudo groupadd docker</p>

<p>sudo gpasswd -a ${USER} docker</p>

<p>sudo service docker restart</p>

### Build docker container: 

<p>docker build -t alarmdecoder alarmdecoder</p>

### Run your container: 

<p>docker run --restart unless-stopped --net="host" --privileged -d -ti -e "container=docker" -v /sys/fs/cgroup:/sys/fs/cgroup:ro -p 80:80 -p 443:443 -p 5000:5000 -p 10000:10000 --device=/dev/ttyS0 alarmdecoder /sbin/init</p>

{'fraction_non_alphanumeric': 0.15915042187954612, 'fraction_numerical': 0.028804189700320046, 'mean_word_length': 4.169924812030075, 'pattern_counts': {'":': 0, '<': 92, '<?xml version=': 0, '>': 96, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 1, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5574111', 'n_tokens_mistral': 1445, 'n_tokens_neox': 1276, 'n_words': 348}