-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
64 lines (51 loc) · 1.53 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Debian + python 3.6 + data science essentials
FROM valeuriad/pythonds
MAINTAINER Nicolas Greffard "[email protected]"
ENV DEBIAN_FRONTEND noninteractive
# System deps
RUN apt-get -y -q update && \
apt-get -y install \
libcurl3 \
libssl-dev \
libcurl4-openssl-dev \
libicu-dev \
libxml2-dev \
sudo \
nano \
supervisor \
r-base \
libpython-dev
# Python deps/libs
RUN pip install sklearn pandas flask flask-cors virtualenv
# R deps/libs
RUN R -e "install.packages(c(\
'R6','tensorflow','plumber','shiny'),\
repos = 'http://cran.us.r-project.org');\
library(tensorflow);install_tensorflow();"
# Install nodejs
RUN curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
RUN apt-get install -y nodejs
# Install Angular
RUN npm install -g @angular/cli
# Bundle UI sources & deps
COPY pacman-ai /pacman-ai
COPY run_front.sh /
WORKDIR pacman-ai
RUN npm install
WORKDIR /
# Flask endpoint
RUN export FLASK_APP=app_ruler.py
# UI Port, R port & Python port
EXPOSE 4200
EXPOSE 4242
EXPOSE 5000
# Bundle game logic sources & data
COPY game_logic/src/* /
COPY game_logic/data /data
# Supervisor will keep all 3 services up & running
COPY supervisord.conf /etc/
# Train a new ruler : surprises are to be expected :)
RUN python train_ruler.py
# Start supervisor
# it runs ng serve on the UI, R on the bot engine & python on the rule engine
CMD /usr/bin/supervisord