-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
186 lines (173 loc) · 5.76 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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
# ======= USAGE =======
# Run interactively:
# docker run -it --entrypoint bash <IMAGE TAG>
# To build image locally (instead of pulling from dockerhub)
# docker build /PATH/TO/GPTP-2021-Exploration-Of-Exploration/
# Pull a base image
FROM ubuntu:20.04
COPY . /opt/GPTP-2021-Exploration-Of-Exploration
# To make installs not ask questions about timezones
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=America/New_York
########################################################
# install base dependencies, add repo -lgfortran GL/gl.h
# - all of the extra dev libraries + fortran(??!!) + cargo are for the R environment... :(
########################################################
RUN \
apt-get update \
&& \
apt-get install -y -qq --no-install-recommends \
software-properties-common \
curl \
g++-10 \
make=4.2.1-1.2 \
cmake=3.16.3-1ubuntu1 \
python3=3.8.2-0ubuntu2 \
python3-pip \
python3-virtualenv \
git=1:2.25.1-1ubuntu3 \
dirmngr \
gpg-agent \
pandoc \
pandoc-citeproc \
texlive-base \
texlive-latex-extra \
lmodern \
&& \
echo "installed base dependencies"
# alias wire g++-10 up to g++ ln -s gcc-10 gcc &&
RUN cd /usr/bin/ && ln -s g++-10 g++ && cd /
########################################################
# install project python dependencies (listed in requirements.txt)
########################################################
RUN \
pip3 install -r /opt/GPTP-2021-Exploration-Of-Exploration/experiments/requirements.txt \
&& \
pip3 install osfclient \
&& \
echo "installed python dependencies"
########################################################
# download data, put into expected directories
########################################################
RUN \
export OSF_PROJECT=xpjft \
&& \
export PROJECT_PATH=/opt/GPTP-2021-Exploration-Of-Exploration \
&& \
cd ${PROJECT_PATH} \
&& \
export EXP_TAG=2021-05-27-cardinality \
&& \
./download_data.sh \
&& \
export EXP_TAG=2021-05-27-tournament \
&& \
./download_data.sh \
&& \
export EXP_TAG=2021-05-28-downsampled \
&& \
./download_data.sh \
&& \
export EXP_TAG=2021-05-28-epsilon \
&& \
./download_data.sh \
&& \
export EXP_TAG=2021-06-01-cohort \
&& \
./download_data.sh \
&& \
export EXP_TAG=2021-06-01-novelty \
&& \
./download_data.sh \
&& \
export EXP_TAG=2021-06-03-cardinality-pop-size \
&& \
./download_data.sh \
&& \
export EXP_TAG=2021-06-05-downsample-vs-cohort \
&& \
./download_data.sh \
&& \
export EXP_TAG=2021-06-14-downsampled-pop-size \
&& \
./download_data.sh \
&& \
export EXP_TAG=2021-06-14-cohort-pop-size \
&& \
./download_data.sh \
&& \
echo "downloaded experiment data"
# ########################################################
# # install r + r dependencies
# # - https://rtask.thinkr.fr/installation-of-r-4-0-on-ubuntu-20-04-lts-and-tips-for-spatial-packages/
# ########################################################
RUN \
gpg --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 \
&& \
gpg -a --export E298A3A825C0D65DFD57CBB651716619E084DAB9 | apt-key add - \
&& \
apt update \
&& \
add-apt-repository 'deb https://cloud.r-project.org/bin/linux/ubuntu focal-cran40/' \
&& \
apt-get install -y -q --no-install-recommends \
r-base \
r-base-dev \
libssl-dev \
libcurl4-openssl-dev \
libfreetype6-dev \
libmagick++-dev \
libxml2-dev \
libfontconfig1-dev \
cargo \
&& \
R -e "install.packages('rmarkdown', dependencies=NA, repos='http://cran.rstudio.com/')" \
&& \
R -e "install.packages('knitr', dependencies=NA, repos='http://cran.rstudio.com/')" \
&& \
R -e "install.packages('bookdown', dependencies=NA, repos='http://cran.rstudio.com/')" \
&& \
R -e "install.packages('tidyverse', dependencies=NA, repos='http://cran.rstudio.com/')" \
&& \
R -e "install.packages('cowplot', dependencies=NA, repos='http://cran.rstudio.com/')" \
&& \
R -e "install.packages('plyr', dependencies=NA, repos='http://cran.rstudio.com/')" \
&& \
R -e "install.packages('Hmisc', dependencies=NA, repos='http://cran.rstudio.com/')" \
&& \
R -e "install.packages('boot', dependencies=NA, repos='http://cran.rstudio.com/')" \
&& \
R -e "install.packages('fmsb', dependencies=NA, repos='http://cran.rstudio.com/')" \
&& \
R -e "install.packages('rstatix', dependencies=NA, repos='http://cran.rstudio.com/')" \
&& \
R -e "install.packages('ggsignif', dependencies=NA, repos='http://cran.rstudio.com/')" \
&& \
R -e "install.packages('kableExtra', dependencies=NA, repos='http://cran.rstudio.com/')" \
&& \
echo "installed r and configured r environment"
########################################################
# download Empirical @ appropriate commit
########################################################
RUN \
git clone https://github.com/amlalejini/Empirical.git /opt/Empirical && \
cd /opt/Empirical && \
git checkout b5c0d06d6fb765ac7fedd18e91ecbc2c054f51ff && \
git submodule init && \
git submodule update && \
echo "download Empirical"
########################################################
# compile experiment code
########################################################
RUN \
cd /opt/GPTP-2021-Exploration-Of-Exploration && \
make native && \
echo "finished compiling experiments"
# ########################################################
# # build supplemental material (will run analyses)
# ########################################################
RUN \
cd /opt/GPTP-2021-Exploration-Of-Exploration && \
./build_book.sh && \
echo "finished running data analyses and building the supplemental material"
WORKDIR /opt/GPTP-2021-Exploration-Of-Exploration