Skip to content

Commit

Permalink
Added docker installation routine and instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
iurii-milovanov committed Nov 20, 2017
1 parent 9b935cc commit 2431bd6
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Dockerfile
.gitignore
.git
.ipynb_checkpoints
.DS_Store
31 changes: 31 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
FROM rocker/shiny

# Add application codebase
ADD ./ /srv/shiny-server/anomaly_detection
RUN chmod a+rwx -R /srv/shiny-server/anomaly_detection

# Temporal fix for RStan package
# http://discourse.mc-stan.org/t/error-when-installing-rstan-2-16-2/1730
# https://github.com/stan-dev/rstan/wiki/Installing-RStan-on-Mac-or-Linux
RUN echo "\nCXXFLAGS=-O3 -mtune=native -march=native -Wno-unused-variable -Wno-unused-function" >> /etc/R/Makeconf
RUN echo "\nCXXFLAGS+=-DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION" >> /etc/R/Makeconf
RUN echo "\nCPPFLAGS+=-DBOOST_PHOENIX_NO_VARIADIC_EXPRESSION" >> /etc/R/Makeconf

# Install additional Ubuntu packages
RUN sudo apt-get update && sudo apt-get -y install libssl-dev

# Install additional R packages
RUN R -e "install.packages('DT')"
RUN R -e "install.packages('shinyjs')"
RUN R -e "install.packages('shinydashboard')"
RUN R -e "install.packages('shinyBS')"
RUN R -e "install.packages('hiny')"
RUN R -e "install.packages('hinyBS')"
RUN R -e "install.packages('hinydashboard')"
RUN R -e "install.packages('dygraphs')"
RUN R -e "install.packages('plotly')"
RUN R -e "install.packages('smoother')"
RUN R -e "install.packages('prophet')"
RUN R -e "install.packages('Rssa')"
RUN R -e "install.packages('tringr')"
RUN R -e "install.packages('parallel')"
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
# Anomaly detection demo for AWS

This repository contains code from the old anomaly detection project, transformed into R Shiny application with remote (AWS) deployment support.

## Docker install ##

1. Get application source code:
```bash
git clone https://github.com/SoftServeSAG/aws_anomaly_detection
cd aws_anomaly_detection/
```

2. Build docker image:
```bash
docker build --rm --force-rm -t anomaly_detection .
```

3. Run docker image:
```bash
docker run --rm -p 3838:3838 anomaly_detection
```

4. Open your favorite browser and navigate to the `http://127.0.0.1:3838/anomaly_detection/`

0 comments on commit 2431bd6

Please sign in to comment.