File size: 1,301 Bytes
4e13f35
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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

# See also https://numpy.org/devdocs/docs/howto_build_docs.html

FROM ubuntu:18.04 AS numpy-docs-build

LABEL maintainer="unknownue <unknownue@outlook.com>"
LABEL description="An docker environment to build offline Numpy Docs"
LABEL numpy-version="1.18.1"
LABEL python-version="3.6.x"
LABEL license="MIT"

ARG NUMPY_VERSION=1.18.1

ENV DEBIAN_FRONTEND=noninteractive

WORKDIR /root/

ENV PATH "/root/usr/bin:${PATH}"

RUN apt update && apt upgrade -y && \
    apt install -y --no-install-recommends git wget build-essential ca-certificates && \
    apt clean

# Install Python 3.6 and corresponding pip
RUN apt install -y --no-install-recommends python3.6 python3-distutils && \
    wget https://bootstrap.pypa.io/get-pip.py && python3.6 get-pip.py && \
    apt clean && \
    ln -sf python3.6 /usr/bin/python && ln -sf pip3 /usr/bin/pip && \
    pip3 install --upgrade pip && \
    pip install --no-cache-dir numpy==$NUMPY_VERSION sphinx==2.4.2 scipy==1.4.1 ipython Matplotlib numpydoc

# install latex
RUN apt install -y --no-install-recommends latexmk && \
    apt install -y --no-install-recommends texlive-latex-extra

RUN git clone https://github.com/numpy/numpy.git && cd numpy && \
    git checkout tags/v$NUMPY_VERSION && \
    git submodule init && \
    git submodule update

CMD ["bash"]