This repository has been archived by the owner on Aug 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
94 lines (82 loc) · 3.2 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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
# Pull LTS version of linux.
FROM ubuntu:20.04
RUN echo 'root:root' | chpasswd
# Install software dependencies, like MongoDB and Angular,
# according to the required versions. It also registers the corresponding
# repository to install NodeJS version 16. Due to the deprecation state
# of NodeJS 16, this step shows a warning during installation and delays
# the process by 60 seconds, after which the installation continues on.
RUN apt-get update \
&& apt-get -y dist-upgrade \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
apt-utils \
build-essential \
ca-certificates \
curl \
git \
gnupg \
less \
mongodb \
mongo-tools \
patch \
python3-pip \
texlive-base \
texlive-latex-base \
texlive-xetex \
&& curl -fsSL https://deb.nodesource.com/setup_16.x | bash - \
&& apt-get update -yq \
&& DEBIAN_FRONTEND=noninteractive apt-get install -yq \
nodejs \
&& npm install -g @angular/[email protected] \
&& npm install -g typescript
# install python dependencies
RUN pip install deepdiff
RUN pip install requests
# Create a working directory and access into it.
RUN mkdir -p /home/repro_project
WORKDIR /home/repro_project
# Clone the JSONSchemaDiscovery repository and reset its HEAD to
# the latest commit close to the date of the current reproduction experiment:
# January 5th, 2024.
RUN git clone https://github.com/gbd-ufsc/JSONSchemaDiscovery.git
WORKDIR /home/repro_project/JSONSchemaDiscovery
# The c70f4ab commit dates back to January 29th, 2023.
RUN git reset --hard c70f4ab
# Copy and apply code patches.
RUN mkdir -p ./patches
COPY patches ./patches
RUN patch < patches/package.json.diff package.json
RUN patch < patches/angular.json.diff angular.json
RUN patch < patches/proxy.conf.json.diff proxy.conf.json
RUN patch < patches/user.ts.diff server/models/user/user.ts
RUN patch < patches/app.ts.diff server/app.ts
RUN patch < patches/rawSchemaBatch.ts.diff server/controllers/rawSchema/rawSchemaBatch.ts
RUN patch -R < patches/.env.diff .env
RUN patch -R < patches/rawSchemaUnorderedResult.diff server/controllers/rawSchema/rawSchemaUnorderedResult.ts
RUN rm -rf patches
# Install code dependencies.
RUN npm install -f
RUN npm install -f @types/[email protected]
RUN npm install -f --save dotenv
# Copy doAll.sh script and helpers
COPY scripts .
RUN chmod +x doAll.sh
RUN chmod +x main_experiment.py
RUN chmod +x json_deepdiff.py
# Clone repository for source data for experiments
RUN git clone https://github.com/mmathioudakis/geotopics.git
WORKDIR /home/repro_project/JSONSchemaDiscovery/geotopics
# The 51ac0a8 commit dates back to June 15th, 2016.
RUN git reset --hard 51ac0a8
# Move data files to a dedicated location and delete cloned repository
WORKDIR /home/repro_project/JSONSchemaDiscovery
RUN mkdir ./data_source
RUN mv ./geotopics/data/* ./data_source
RUN rm -rf geotopics/
# Set experiment directory
RUN mkdir ./experiment
COPY schema_reference/firenze_checkins_reference_schema.json ./experiment/firenze_checkins_reference_schema.json
# Clone LaTeX report repository
RUN git clone https://github.com/EdgarYepez/RepSchemaDiscovery-Report.git
RUN mv RepSchemaDiscovery-Report/ report
EXPOSE 4200