1
1
# Pull base image.
2
- FROM ubuntu:bionic-20210416
2
+ FROM ubuntu:focal-20230412
3
3
4
4
COPY . /opt/Empirical
5
5
@@ -8,6 +8,7 @@ SHELL ["/bin/bash", "-c"]
8
8
# Prevent interactive time zone config.
9
9
# adapted from https://askubuntu.com/a/1013396
10
10
ENV DEBIAN_FRONTEND=noninteractive
11
+ ENV SPHINXBUILD="python3.10 -m sphinx"
11
12
12
13
RUN \
13
14
echo 'Acquire::http::Timeout "60";' >> "/etc/apt/apt.conf.d/99timeout" \
@@ -31,22 +32,21 @@ RUN \
31
32
&& \
32
33
rm -rf /var/lib/apt/lists/* \
33
34
&& \
34
- find /etc/apt -type f -name '*.list' -exec sed -i 's/\( ^deb.*-backports.*\) /#\1 /; s/\( ^deb.*-updates.*\) /#\1 /; s/\( ^deb.*-proposed.*\) /#\1 /; s/\( ^deb.*-security.*\) /#\1 /' {} + \
35
- && \
36
35
apt-get update -y \
37
36
&& \
38
- apt-get install -y software-properties-common=0.96.24.32.1 \
37
+ apt-get install -y software-properties-common \
39
38
&& \
40
39
add-apt-repository -y ppa:ubuntu-toolchain-r/test \
41
40
&& \
41
+ add-apt-repository -y ppa:deadsnakes/ppa \
42
+ && \
42
43
apt-get update -y \
43
44
&& \
44
45
apt-get install --no-install-recommends --allow-downgrades -y \
45
- dpkg-dev \
46
- libc6=2.27-3ubuntu1 \
47
- libc6-dev \
48
- libc6-dbg \
49
46
build-essential \
47
+ dpkg-dev \
48
+ g++-11 \
49
+ libc6 \
50
50
xvfb \
51
51
x11vnc \
52
52
x11-xkb-utils \
@@ -60,21 +60,14 @@ RUN \
60
60
libnss3 \
61
61
lsb-release \
62
62
xdg-utils \
63
- g++-8=8-20180414-1ubuntu2 \
64
- gcc-8-base=8-20180414-1ubuntu2 \
65
- cpp-8=8-20180414-1ubuntu2 \
66
- gcc-8=8-20180414-1ubuntu2 \
67
- gcc-8-base=8-20180414-1ubuntu2 \
68
- libgcc-8-dev \
69
- libstdc++-8-dev \
70
63
cmake \
71
- python-virtualenv \
72
- python-pip-whl \
73
- python-pip \
74
- python-setuptools \
64
+ python3-distutils \
75
65
python3-setuptools \
76
66
python3-virtualenv \
77
67
python3-pip \
68
+ 'python3\. 10' \
69
+ 'python3\. 10-distutils' \
70
+ 'python3\. 10-venv' \
78
71
nodejs \
79
72
npm \
80
73
tar \
84
77
doxygen \
85
78
curl \
86
79
perl \
87
- perl-base=5.26.1-6 \
80
+ perl-base \
88
81
git \
89
82
htop \
90
83
man \
@@ -162,25 +155,47 @@ ENV DISPLAY :99
162
155
RUN echo 'kernel.unprivileged_userns_clone=1' > /etc/sysctl.d/userns.conf
163
156
164
157
RUN \
165
- update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90 \
158
+ update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 90 \
166
159
&& \
167
160
npm install -g n \
168
161
&& \
169
162
n 14.17 \
170
163
&& \
164
+ hash -r \
165
+ && \
171
166
export python="/usr/bin/python3" \
172
167
&& \
173
168
npm install source-map \
174
169
&& \
175
170
echo "finalized set up dependency versions"
176
171
177
172
RUN \
178
- pip install wheel==0.30.0 \
173
+ curl -sS https://bootstrap.pypa.io/get-pip.py | python3 \
174
+ && \
175
+ curl -sS https://bootstrap.pypa.io/get-pip.py | python3.10 \
176
+ && \
177
+ pip install --upgrade --force-reinstall pip virtualenv \
178
+ && \
179
+ pip3 install --upgrade --force-reinstall pip virtualenv \
180
+ && \
181
+ python3.10 -m pip install --upgrade --force-reinstall pip virtualenv \
179
182
&& \
180
- pip3 install wheel==0.30.0 \
183
+ python3 -m pip install --upgrade --force-reinstall pip virtualenv \
184
+ && \
185
+ pip install wheel==0.30.0 six==1.16.0 \
186
+ && \
187
+ pip3 install wheel==0.30.0 six==1.16.0 \
188
+ && \
189
+ python3.10 -m pip install wheel==0.30.0 six==1.16.0 \
190
+ && \
191
+ python3 -m pip install wheel==0.30.0 six==1.16.0 \
181
192
&& \
182
193
pip3 install -r /opt/Empirical/doc/requirements.txt \
183
194
&& \
195
+ python3.10 -m pip install -r /opt/Empirical/doc/requirements.txt \
196
+ && \
197
+ python3 -m pip install -r /opt/Empirical/doc/requirements.txt \
198
+ && \
184
199
echo "installed documentation build requirements"
185
200
186
201
RUN \
@@ -190,13 +205,19 @@ RUN \
190
205
&& \
191
206
git submodule init \
192
207
&& \
193
- git submodule update -f \
208
+ echo "nameserver 8.8.8.8" > /etc/resolv.conf \
209
+ && \
210
+ n=0; until [ $n -ge 3 ]; do git submodule update -f && break || ((n++)); sleep 5; done; if [ $n -eq 3 ]; then echo "Update failed after 3 attempts." ; else echo "Update successful!" ; fi \
194
211
&& \
195
212
echo "initialized submodules"
196
213
197
214
RUN \
198
215
cd /opt/Empirical \
199
216
&& \
217
+ curl -sS https://bootstrap.pypa.io/get-pip.py | python3 \
218
+ && \
219
+ python3 -m pip install virtualenv \
220
+ && \
200
221
make install-test-dependencies \
201
222
&& \
202
223
echo "installed test dependencies"
0 commit comments