11
11
# SCHEDULE_RUN_TIME default should be set to 00:00
12
12
# need to mount backup dir to POSTGRES_DUMP_PATH
13
13
FROM ubuntu:20.04 AS transform
14
-
15
14
RUN apt-get update && apt-get install -y wget openjdk-8-jdk gnupg
16
15
RUN apt-get update && apt-get install curl -y
17
-
18
16
RUN echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | tee -a /etc/apt/sources.list.d/sbt.list
19
17
RUN curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | apt-key add
20
18
# RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 2EE0EA64E40A89B84B2DF73499E82A75642AC823
21
19
RUN apt-get update && apt-get install -y sbt
22
20
COPY ["map-pipeline" , "map-pipeline" ]
23
21
WORKDIR map-pipeline
24
22
RUN sbt assembly
25
-
26
23
FROM ubuntu:20.04
27
-
28
24
RUN apt-get update && apt-get install -y wget curl
29
-
30
25
RUN curl -sSL https://get.haskellstack.org/ | sh
31
26
COPY ["map-pipeline-schema" , "map-pipeline-schema" ]
32
27
WORKDIR map-pipeline-schema
33
28
RUN stack build
34
-
35
29
WORKDIR /
36
30
RUN mkdir data
37
-
38
31
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y wget gnupg git tzdata
39
-
40
- RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ bionic-pgdg main" | tee -a /etc/apt/sources.list.d/pgdg.list
41
-
32
+ RUN echo "deb http://apt.postgresql.org/pub/repos/apt/ focal-pgdg main" | tee -a /etc/apt/sources.list.d/pgdg.list
42
33
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
43
-
44
- RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip wget openjdk-8-jdk postgresql-client-11 libmemcached-dev
45
-
46
-
34
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y python3-pip
35
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y wget
36
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y openjdk-8-jdk
37
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y postgresql-client-11
38
+ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y libmemcached-dev
47
39
RUN apt-get install pkg-config libicu-dev -y
48
40
RUN pip3 install --no-binary=:pyicu: pyicu
49
41
RUN pip3 install csvkit
50
-
51
42
RUN pip3 install schedule pandas psycopg2-binary requests flask flask-cors redis rq oslash==0.5.1
52
43
RUN pip3 install git+https://github.com/vaidik/sherlock.git@77742ba91a24f75ee62e1895809901bde018654f
53
-
54
44
RUN wget https://archive.apache.org/dist/spark/spark-2.4.8/spark-2.4.8-bin-hadoop2.7.tgz
45
+ # ######################### IGNORE BELOW ##################################################
55
46
# RUN wget https://apache.claz.org/spark/spark-2.4.8/spark-2.4.8-bin-hadoop2.7.tgz
56
47
# https://apache.claz.org/spark/spark-2.4.7/spark-2.4.7-bin-hadoop2.7.tgz
57
48
# && echo "0F5455672045F6110B030CE343C049855B7BA86C0ECB5E39A075FF9D093C7F648DA55DED12E72FFE65D84C32DCD5418A6D764F2D6295A3F894A4286CC80EF478 spark-2.4.7-bin-hadoop2.7.tgz" | sha512sum -c -
58
-
59
49
# RUN wget http://apache.spinellicreations.com/spark/spark-2.4.7/spark-2.4.7-bin-hadoop2.7.tgz && echo "0F5455672045F6110B030CE343C049855B7BA86C0ECB5E39A075FF9D093C7F648DA55DED12E72FFE65D84C32DCD5418A6D764F2D6295A3F894A4286CC80EF478 spark-2.4.7-bin-hadoop2.7.tgz" | sha512sum -c -
60
-
50
+ # ######################### IGNORE ABOVE ##################################################
61
51
RUN tar zxvf spark-2.4.8-bin-hadoop2.7.tgz
62
52
ENV PATH="/spark-2.4.8-bin-hadoop2.7/bin:${PATH}"
63
53
# set to 1 to reload data from redcap database
@@ -73,14 +63,10 @@ ENV INSERT_DATA=0
73
63
ENV SERVER=0
74
64
# set time zone
75
65
ENV TZ=America/New_York
76
-
77
66
COPY --from=transform ["map-pipeline/target/scala-2.11/TIC preprocessing-assembly-0.2.0.jar" , "TIC preprocessing-assembly.jar" ]
78
-
79
67
COPY ["reload.py" , "reload.py" ]
80
68
COPY ["server.py" , "server.py" ]
81
69
COPY ["application.py" , "application.py" ]
82
70
COPY ["utils.py" , "utils.py" ]
83
71
# COPY ["test_data.json", "test_data.json"]
84
-
85
- ENTRYPOINT ["python3" , "application.py" ]
86
-
72
+ ENTRYPOINT ["python3" , "application.py" ]
0 commit comments