-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
50 lines (40 loc) · 1.84 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
FROM ubuntu:20.04
#FROM python:3
#RUN apt-get update
#RUN apt-get install -y python3 python3-pip build-essential python3-dev octave octave-statistics r-base r-cran-randomfields
#RUN apt-get install -y --fix-missing python3 python3-pip octave octave-statistics r-base r-cran-randomfields
#RUN apt-get install -y octave octave-statistics r-base r-cran-randomfields
RUN apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y python3 python3-pip python3-numpy python3-scipy python3-pandas python3-sklearn build-essential python3-dev octave octave-statistics r-base r-cran-randomfields
RUN mkdir /monitoring
WORKDIR /monitoring
COPY requirements.txt /monitoring/requirements.txt
#RUN python3 -m pip install --upgrade pip && python3 -m pip install -r /monitoring/requirements.txt --use-deprecated=legacy-resolver
RUN python3 -m pip install -r /monitoring/requirements.txt
RUN R -e "install.packages('geoR')"
# copy folders
COPY static /monitoring/static/
COPY html /monitoring/html
COPY ngsi_ld /monitoring/ngsi_ld
COPY other /monitoring/other
COPY datasets /monitoring/datasets
COPY fault_detection /monitoring/fault_detection
COPY fault_recovery /monitoring/fault_recovery
# copy files
COPY config.ini /monitoring/config.ini
COPY configuration.py /monitoring/configuration.py
COPY main.py /monitoring/main.py
COPY sensor.py /monitoring/sensor.py
COPY datasource_manager.py /monitoring/datasource_manager.py
WORKDIR /monitoring/datasets/Smartcitizen
RUN python3 prepare.py
WORKDIR /monitoring
ENV NGSI_ADDRESS http://155.54.95.248:9090
ENV FD_HOST 0.0.0.0
ENV FD_PORT 8082
ENV FD_CALLBACK https://mobcom.ecs.hs-osnabrueck.de/faultdetection/callback
ENV VS_CREATER_ADDRESS http://staging.vs-creator.iotcrawler.eu
#ENV RECOVERY_METHOD MCMC
ENV RECOVERY_METHOD BME
EXPOSE $FD_PORT
#ADD config.ini configuration.py datasource_manager.py main.py /
CMD python3 main.py