Skip to content

Commit 9449495

Browse files
committed
Add new beta image using pyenv for all Python versions
Instead of only installing two versions of Python, *install them all!*
1 parent 314ff14 commit 9449495

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed

beta/Dockerfile

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Read the Docs - Environment base
2+
FROM ubuntu:16.04
3+
MAINTAINER Read the Docs <[email protected]>
4+
5+
ENV DEBIAN_FRONTEND noninteractive
6+
ENV APPDIR /app
7+
ENV LANG C.UTF-8
8+
9+
# System dependencies
10+
RUN apt-get -y update
11+
RUN apt-get -y install vim software-properties-common
12+
13+
# Install requirements
14+
RUN apt-get -y install \
15+
bzr subversion git-core mercurial libpq-dev libxml2-dev libxslt-dev \
16+
libxslt1-dev build-essential postgresql-client libmysqlclient-dev curl \
17+
doxygen g++ graphviz-dev libfreetype6 libbz2-dev libcairo2-dev \
18+
libenchant1c2a libevent-dev libffi-dev libfreetype6-dev \
19+
libgraphviz-dev libjpeg-dev libjpeg8-dev liblcms2-dev libreadline-dev \
20+
libsqlite3-dev libtiff5-dev libwebp-dev pandoc pkg-config zlib1g-dev
21+
22+
# LaTeX -- split to reduce image layer size
23+
RUN apt-get -y install texlive-fonts-extra
24+
RUN apt-get -y install texlive-latex-extra-doc texlive-publishers-doc \
25+
texlive-pictures-doc
26+
RUN apt-get -y install texlive-lang-english texlive-lang-japanese
27+
RUN apt-get -y install texlive-full
28+
RUN apt-get -y install \
29+
texlive-fonts-recommended latex-cjk-chinese-arphic-bkai00mp \
30+
latex-cjk-chinese-arphic-gbsn00lp latex-cjk-chinese-arphic-gkai00mp
31+
32+
# Install Python tools/libs
33+
RUN apt-get -y install python-pip && pip install -U virtualenv auxlib
34+
35+
# Install Conda
36+
RUN curl -O https://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh && \
37+
bash Miniconda2-latest-Linux-x86_64.sh -b -p /usr/local/miniconda/ && \
38+
ln -s /usr/local/miniconda/bin/conda /usr/local/bin/conda
39+
40+
# UID and GID from readthedocs/user
41+
RUN groupadd --gid 205 docs
42+
RUN useradd -m --uid 1005 --gid 205 docs
43+
44+
USER docs
45+
46+
# Install pyenv
47+
RUN git clone --depth 1 https://github.com/yyuu/pyenv.git ~docs/.pyenv
48+
ENV PYENV_ROOT /home/docs/.pyenv
49+
ENV PATH /home/docs/.pyenv/shims:$PATH:/home/docs/.pyenv/bin
50+
51+
# Install supported Python versions
52+
RUN pyenv install 2.7.13 && \
53+
pyenv install 3.6.0 && \
54+
pyenv install 3.5.2 && \
55+
pyenv install 3.4.5 && \
56+
pyenv install 3.3.6 && \
57+
pyenv global 2.7.13 3.6.0 3.5.2 3.4.5 3.3.6
58+
59+
WORKDIR /tmp
60+
61+
RUN pyenv local 2.7.13 && \
62+
pyenv exec pip install -U pip && \
63+
pyenv exec pip install --only-binary numpy,scipy numpy scipy && \
64+
pyenv exec pip install pandas matplotlib virtualenv
65+
66+
RUN pyenv local 3.6.0 && \
67+
pyenv exec pip install -U pip && \
68+
pyenv exec pip install --only-binary numpy,scipy numpy scipy && \
69+
pyenv exec pip install pandas matplotlib virtualenv
70+
71+
RUN pyenv local 3.5.2 && \
72+
pyenv exec pip install -U pip && \
73+
pyenv exec pip install --only-binary numpy,scipy numpy scipy && \
74+
pyenv exec pip install pandas matplotlib virtualenv
75+
76+
RUN pyenv local 3.4.5 && \
77+
pyenv exec pip install -U pip && \
78+
pyenv exec pip install --only-binary numpy,scipy numpy scipy && \
79+
pyenv exec pip install pandas matplotlib virtualenv
80+
81+
RUN pyenv local 3.3.6 && \
82+
pyenv exec pip install -U pip && \
83+
pyenv exec pip install --only-binary numpy,scipy numpy scipy && \
84+
pyenv exec pip install "pandas<0.18" "matplotlib<1.5" virtualenv && \
85+
pyenv local --unset
86+
87+
WORKDIR /
88+
89+
CMD ["/bin/bash"]

0 commit comments

Comments
 (0)