@@ -14,17 +14,21 @@ ENV PYTHON_VERSION_36 3.6.12
14
14
ENV PYTHON_VERSION_37 3.7.9
15
15
ENV PYTHON_VERSION_38 3.8.6
16
16
ENV PYTHON_VERSION_39 3.9.1
17
+ ENV PYTHON_VERSION_310 3.10.0b4
17
18
ENV PYPY_VERSION_35 pypy3.5-7.0.0
18
- # Note: 4.7.12.1 drastically increases memory usage
19
- ENV CONDA_VERSION 4.6.14
19
+ # Latest miniconda version is Miniconda3-py39_4.10.1, but it's not available for x86_64
20
+ ENV CONDA_PYTHON_VERSION py39
21
+ ENV CONDA_VERSION 4.9.2
20
22
LABEL python.version_27=$PYTHON_VERSION_27
21
23
LABEL python.version_35=$PYTHON_VERSION_35
22
24
LABEL python.version_36=$PYTHON_VERSION_36
23
25
LABEL python.version_37=$PYTHON_VERSION_37
24
26
LABEL python.version_38=$PYTHON_VERSION_38
25
27
LABEL python.version_39=$PYTHON_VERSION_39
28
+ LABEL python.version_310=$PYTHON_VERSION_310
26
29
LABEL pypy.version_35=$PYPY_VERSION_35
27
30
LABEL conda.version=$CONDA_VERSION
31
+ LABEL conda.python_version=$CONDA_PYTHON_VERSION
28
32
29
33
# System dependencies
30
34
RUN apt-get -y update
@@ -75,6 +79,7 @@ RUN apt-get install -y \
75
79
libncurses5-dev \
76
80
libncursesw5-dev \
77
81
libssl-dev \
82
+ libxmlsec1-dev \
78
83
llvm \
79
84
make \
80
85
python-openssl \
@@ -141,14 +146,6 @@ RUN apt-get -y install \
141
146
auxlib \
142
147
virtualenv==$RTD_VIRTUALENV_VERSION
143
148
144
- # sphinx-js dependencies: jsdoc and typedoc (TypeScript support)
145
- RUN apt-get -y install \
146
- nodejs \
147
- npm \
148
- && npm install --global \
149
- jsdoc \
150
- typedoc
151
-
152
149
# UID and GID from readthedocs/user
153
150
RUN groupadd --gid 205 docs
154
151
RUN useradd -m --uid 1005 --gid 205 docs
@@ -157,10 +154,10 @@ USER docs
157
154
WORKDIR /home/docs
158
155
159
156
# Install Conda
160
- RUN curl -L -O https://repo.continuum.io/miniconda/Miniconda2-${CONDA_VERSION}-Linux-x86_64.sh
161
- RUN bash Miniconda2-${CONDA_VERSION}-Linux-x86_64.sh -b -p /home/docs/.conda/
157
+ RUN curl -L -O https://repo.continuum.io/miniconda/Miniconda3-${CONDA_PYTHON_VERSION}_${CONDA_VERSION}-Linux-x86_64.sh && \
158
+ bash Miniconda3-${CONDA_PYTHON_VERSION}_${CONDA_VERSION}-Linux-x86_64.sh -b -p /home/docs/.conda/ && \
159
+ rm -f Miniconda3-${CONDA_PYTHON_VERSION}_${CONDA_VERSION}-Linux-x86_64.sh
162
160
ENV PATH $PATH:/home/docs/.conda/bin
163
- RUN rm -f Miniconda2-${CONDA_VERSION}-Linux-x86_64.sh
164
161
165
162
# Install Rust
166
163
ENV RTD_RUST_VERSION 1.46.0
@@ -177,6 +174,7 @@ ENV PATH /home/docs/.pyenv/shims:$PATH:/home/docs/.pyenv/bin
177
174
178
175
# Install supported Python versions
179
176
RUN pyenv install $PYTHON_VERSION_27 && \
177
+ pyenv install $PYTHON_VERSION_310 && \
180
178
pyenv install $PYTHON_VERSION_39 && \
181
179
pyenv install $PYTHON_VERSION_38 && \
182
180
pyenv install $PYTHON_VERSION_37 && \
@@ -185,6 +183,7 @@ RUN pyenv install $PYTHON_VERSION_27 && \
185
183
pyenv install $PYPY_VERSION_35 && \
186
184
pyenv global \
187
185
$PYTHON_VERSION_27 \
186
+ $PYTHON_VERSION_310 \
188
187
$PYTHON_VERSION_39 \
189
188
$PYTHON_VERSION_38 \
190
189
$PYTHON_VERSION_37 \
@@ -202,6 +201,13 @@ RUN pyenv local $PYTHON_VERSION_27 && \
202
201
203
202
ENV RTD_PIP_VERSION 20.0.2
204
203
ENV RTD_SETUPTOOLS_VERSION 45.2.0
204
+
205
+ # NOTE: numpy is not installed by default because it's not built for Python 3.10 yet
206
+ RUN pyenv local $PYTHON_VERSION_310 && \
207
+ pyenv exec pip install --no-cache-dir -U pip==$RTD_PIP_VERSION && \
208
+ pyenv exec pip install --no-cache-dir -U setuptools==$RTD_SETUPTOOLS_VERSION && \
209
+ pyenv exec pip install --no-cache-dir virtualenv==$RTD_VIRTUALENV_VERSION
210
+
205
211
RUN pyenv local $PYTHON_VERSION_39 && \
206
212
pyenv exec pip install --no-cache-dir -U pip==$RTD_PIP_VERSION && \
207
213
pyenv exec pip install --no-cache-dir -U setuptools==$RTD_SETUPTOOLS_VERSION && \
@@ -238,6 +244,22 @@ RUN pyenv local $PYPY_VERSION_35 && \
238
244
pyenv exec pip install --no-cache-dir -U setuptools==$RTD_SETUPTOOLS_VERSION && \
239
245
pyenv exec pip install --no-cache-dir virtualenv==$RTD_VIRTUALENV_VERSION
240
246
247
+ # NOTE: this is moved to the bottom because apt-get finds some incompatibilities
248
+ # between packages and uninstall them:
249
+ # The following packages will be REMOVED:
250
+ # libmysqlclient-dev libssl-dev libxmlsec1-dev
251
+ # As libssl-dev and libxmlsec1-dev are required to build Python with pyenv,
252
+ # we first build Python versions and then install these packages
253
+ # sphinx-js dependencies: jsdoc and typedoc (TypeScript support)
254
+ USER root
255
+ RUN apt-get -y install \
256
+ nodejs \
257
+ npm \
258
+ && npm install --global \
259
+
260
+
261
+
262
+ USER docs
241
263
WORKDIR /
242
264
243
265
CMD ["/bin/bash" ]
0 commit comments